PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/llvm/library/iterators/iterator_over_module_functions.e

http://github.com/tybor/Liberty
Specman e | 96 lines | 42 code | 17 blank | 37 comment | 0 complexity | 791e27ad893fe74ff9a86dd008bf3c55 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4class ITERATOR_OVER_MODULE_FUNCTIONS
 5
 6inherit
 7   BIDIRECTIONAL_ITERATOR[LLVM_FUNCTION]
 8   LLVM_FUNCTION_FACTORY
 9
10insert
11   CORE_EXTERNALS
12
13create {ANY}
14   from_module
15
16feature {LLVM_MODULE}
17   from_module (a_module: LLVM_MODULE)
18      require
19         a_module /= Void
20      do
21         module := a_module
22      end
23
24feature {ANY}
25   module: LLVM_MODULE
26
27   start
28      do
29         item := function_wrapper_or_void(llvmget_first_function(module.handle))
30      end
31
32   finish
33      do
34         item := function_wrapper_or_void(llvmget_last_function(module.handle))
35      end
36
37   next
38      do
39         item := function_wrapper_or_void(llvmget_next_function(module.handle))
40      end
41
42   previous
43      do
44         item := function_wrapper_or_void(llvmget_previous_function(module.handle))
45      end
46
47   is_off: BOOLEAN
48      do
49         Result:=(item=Void)
50      end
51
52   item: LLVM_FUNCTION
53
54   generation, iterable_generation: INTEGER is 0
55
56invariant
57   module /= Void
58
59end -- class ITERATOR_OVER_MODULE_FUNCTIONS
60
61--
62-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
63--
64-- Permission is hereby granted, free of charge, to any person obtaining a copy
65-- of this software and associated documentation files (the "Software"), to deal
66-- in the Software without restriction, including without limitation the rights
67-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
68-- copies of the Software, and to permit persons to whom the Software is
69-- furnished to do so, subject to the following conditions:
70--
71-- The above copyright notice and this permission notice shall be included in
72-- all copies or substantial portions of the Software.
73--
74-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
75-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
76-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
77-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
80-- THE SOFTWARE.
81
82
83-- This file is part of LLVM wrappers for Liberty Eiffel.
84--
85-- This library is free software: you can redistribute it and/or modify
86-- it under the terms of the GNU Lesser General Public License as published by
87-- the Free Software Foundation, version 3 of the License.
88--
89-- Liberty Eiffel is distributed in the hope that it will be useful,
90-- but WITHOUT ANY WARRANTY; without even the implied warranty of
91-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
92-- GNU General Public License for more details.
93--
94-- You should have received a copy of the GNU General Public License
95-- along with Liberty Eiffel.  If not, see <http://www.gnu.org/licenses/>.
96--