/src/wrappers/glib/partially-implemented/g_reference_array_iterator.e
http://github.com/tybor/Liberty · Specman e · 75 lines · 59 code · 14 blank · 2 comment · 5 complexity · 4676fe3dffdffa74d4b55f6334e5f6cd MD5 · raw file
- indexing
- description: "."
- copyright: "[
- Copyright (C) 2007 $EWLC_developer, $original_copyright_holder
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- as published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This library is distributed in the hopeOA that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA
- ]"
- class G_REFERENCE_ARRAY_ITERATOR [ITEM->C_STRUCT]
- inherit
- ITERATOR[ITEM]
- WRAPPER_HANDLER
- insert
- WRAPPER_FACTORY [ITEM]
- SHARED_WRAPPERS_DICTIONARY
- G_PTR_ARRAY_EXTERNALS
- creation make
- feature {} -- Creation
- make (an_array: G_REFERENCE_ARRAY [ITEM]) is
- require array_not_void: an_array/=Void
- do
- array:=an_array
- end
-
- feature {ANY}
- start is
- do
- i:=array.lower
- end
- is_off: BOOLEAN is
- -- Returns True when there are no more objects in the
- -- sequence.
- do
- Result := i>upper
- end
- item: ITEM is
- local p: POINTER; npa: NATIVE_ARRAY[POINTER]
- do
- npa := npa.from_pointer(get_pdata(handle))
- p := npa.item(index)
- if p.is_not_null then
- if wrappers.has(p) then Result::=wrappers.item(p)
- else print_wrapper_factory_notice
- end
- end
- end
- next is
- do
- i:=i+1
- end
- feature {} -- Implementation
- array: G_REFERENCE_ARRAY [ITEM]
-
- end --class G_REFERENCE_ARRAY_ITERATOR