GCGlib
0.04.228
GCG Graphics Engine
|
Generic abstract class to allow iterations over the several GCGlib data structures. The gcgITERATOR::next() returns the next object until it is NULL. The returned object type depends on the data structure and commonly is a specialization of gcgORDEREDNODE, gcgDOUBLELINK or gcgLINK classes. While iteration is being done, the original data structure must not be changed by insertions, removals or moves. Iterators copies all needed information to iterate over the nodes and are not allowed to change its associated data structure. A data structure can have several gcgITERATOR instances working at a time. The gcgITERATOR object must be deleted after use. More...
#include <gcg.h>
Public Member Functions | |
virtual | ~gcgITERATOR () |
Destroys the iterator object and releases all of its resources. The iterated data structure does not change. Destruction is dependent on the underlying data structure. More... | |
virtual gcgDATA * | next ()=0 |
Gets the next object from the data structure. While iterating, the underlying data structure must not be changed by insertions, removals or moves. The returned pointer is guaranteed to not being accessed again by the iterator. More... | |
Public Member Functions inherited from gcgCLASS | |
void * | operator new (size_t size) |
Defines a new operator to be used by instatiations of GCGlib classes instead the global one. More... | |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
Defines a new operator to be used by instantiations of GCGlib classes instead the global one. Returns a NULL pointer instead of throwing an exception if an error occurs. More... | |
void * | operator new[] (size_t size) |
Defines a new operator to be used by GCGlib array allocations instead the global one. More... | |
void * | operator new[] (size_t size, const std::nothrow_t &) throw () |
Defines a new operator to be used by vector allocations instead the global one. More... | |
void | operator delete (void *p) |
Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More... | |
void | operator delete (void *p, const std::nothrow_t &) throw () |
Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More... | |
void | operator delete[] (void *p) |
Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More... | |
void | operator delete[] (void *p, const std::nothrow_t &) throw () |
Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More... | |
Generic abstract class to allow iterations over the several GCGlib data structures. The gcgITERATOR::next() returns the next object until it is NULL. The returned object type depends on the data structure and commonly is a specialization of gcgORDEREDNODE, gcgDOUBLELINK or gcgLINK classes. While iteration is being done, the original data structure must not be changed by insertions, removals or moves. Iterators copies all needed information to iterate over the nodes and are not allowed to change its associated data structure. A data structure can have several gcgITERATOR instances working at a time. The gcgITERATOR object must be deleted after use.
|
virtual |
Destroys the iterator object and releases all of its resources. The iterated data structure does not change. Destruction is dependent on the underlying data structure.
|
pure virtual |
Gets the next object from the data structure. While iterating, the underlying data structure must not be changed by insertions, removals or moves. The returned pointer is guaranteed to not being accessed again by the iterator.