Warning, /sdk/rust-qt-binding-generator/demo/rust/src/implementation/demo.rs is written in an unsupported language. File is not indexed.
0001 // Copyright 2017 Jos van den Oever <jos@vandenoever.info> 0002 // 0003 // This program is free software; you can redistribute it and/or 0004 // modify it under the terms of the GNU General Public License as 0005 // published by the Free Software Foundation; either version 2 of 0006 // the License or (at your option) version 3 or any later version 0007 // accepted by the membership of KDE e.V. (or its successor approved 0008 // by the membership of KDE e.V.), which shall act as a proxy 0009 // defined in Section 14 of version 3 of the license. 0010 // 0011 // This program is distributed in the hope that it will be useful, 0012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 // GNU General Public License for more details. 0015 // 0016 // You should have received a copy of the GNU General Public License 0017 // along with this program. If not, see <http://www.gnu.org/licenses/>. 0018 0019 use interface::*; 0020 use super::*; 0021 0022 pub struct Demo { 0023 emit: DemoEmitter, 0024 fibonacci: Fibonacci, 0025 fibonacci_list: FibonacciList, 0026 file_system_tree: FileSystemTree, 0027 processes: Processes, 0028 time_series: TimeSeries 0029 } 0030 0031 impl DemoTrait for Demo { 0032 fn new(emit: DemoEmitter, 0033 fibonacci: Fibonacci, 0034 fibonacci_list: FibonacciList, 0035 file_system_tree: FileSystemTree, 0036 processes: Processes, 0037 time_series: TimeSeries) -> Self { 0038 Demo { 0039 emit, 0040 fibonacci, 0041 fibonacci_list, 0042 file_system_tree, 0043 processes, 0044 time_series 0045 } 0046 } 0047 fn emit(&mut self) -> &mut DemoEmitter { 0048 &mut self.emit 0049 } 0050 fn fibonacci(&self) -> &Fibonacci { 0051 &self.fibonacci 0052 } 0053 fn fibonacci_mut(&mut self) -> &mut Fibonacci { 0054 &mut self.fibonacci 0055 } 0056 fn fibonacci_list(&self) -> &FibonacciList { 0057 &self.fibonacci_list 0058 } 0059 fn fibonacci_list_mut(&mut self) -> &mut FibonacciList { 0060 &mut self.fibonacci_list 0061 } 0062 fn file_system_tree(&self) -> &FileSystemTree { 0063 &self.file_system_tree 0064 } 0065 fn file_system_tree_mut(&mut self) -> &mut FileSystemTree { 0066 &mut self.file_system_tree 0067 } 0068 fn processes(&self) -> &Processes { 0069 &self.processes 0070 } 0071 fn processes_mut(&mut self) -> &mut Processes { 0072 &mut self.processes 0073 } 0074 fn time_series(&self) -> &TimeSeries { 0075 &self.time_series 0076 } 0077 fn time_series_mut(&mut self) -> &mut TimeSeries { 0078 &mut self.time_series 0079 } 0080 }