PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

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

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