5 #ifndef PDFTRON_H_CPPCommonIterator
6 #define PDFTRON_H_CPPCommonIterator
9 #include <C/Common/TRN_Types.h>
10 #include <C/Common/TRN_Iterator.h>
25 DREX(mp_impl, TRN_IteratorDestroy(mp_impl));
33 REX(TRN_IteratorDestroy(mp_impl));
42 BASE_ASSERT(mp_impl,
"Null Iterator");
43 REX(TRN_IteratorNext(mp_impl));
51 BASE_ASSERT(mp_impl,
"Null Iterator");
53 REX(TRN_IteratorCurrent(mp_impl,&result));
62 BASE_ASSERT(mp_impl,
"Null Iterator");
64 REX(TRN_IteratorHasNext(mp_impl,&result));
72 REX(TRN_IteratorAssign(c.mp_impl,&mp_impl));
79 REX(TRN_IteratorAssign(other.mp_impl,&mp_impl));
85 inline Iterator(TRN_Iterator impl) : mp_impl(impl) {}
105 DREX(mp_impl, TRN_IteratorDestroy(mp_impl));
113 REX(TRN_IteratorDestroy(mp_impl));
119 BASE_ASSERT(mp_impl,
"Null Iterator");
120 REX(TRN_IteratorNext(mp_impl));
125 BASE_ASSERT(mp_impl,
"Null Iterator");
127 REX(TRN_IteratorCurrent(mp_impl,&result));
128 return *((
int*)result);
133 BASE_ASSERT(mp_impl,
"Null Iterator");
135 REX(TRN_IteratorHasNext(mp_impl,&result));
136 return TBToB(result);
141 BASE_ASSERT(other.mp_impl,
"Null Iterator");
142 REX(TRN_IteratorAssign(other.mp_impl,&mp_impl));
149 BASE_ASSERT(c.mp_impl,
"Null Iterator");
150 REX(TRN_IteratorAssign(c.mp_impl,&mp_impl));
155 TRN_Iterator mp_impl;
164 #endif // PDFTRON_H_CPPCommonIterator
Iterator(TRN_Iterator impl)
Iterator< int > & operator=(const Iterator< int > &other)
#define DREX(impl, destroy_action)
Iterator(const Iterator &c)
Iterator< T > & operator=(const Iterator< T > &other)
Iterator(const Iterator< int > &c)