#include <ObjectIter.h>
Inherits ObjectIterator.
Public Member Functions | |
| SimpleObjectIterator () | |
| Object * | first () |
| reset iterator and return first item (or null if iter is empty) | |
| Object * | next () |
| advance and return next item (or null if no more to iterate) | |
| Object * | firstWithNumeric (Real *num=NULL) |
| Object * | nextWithNumeric (Real *num=NULL) |
| void | makeEmpty () |
| void | insert (Object *obj, Real numeric=0.0f) |
| void | sort (IterOrderType order) |
| Int | getCount () |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Additional Inherited Members | |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
A basic implementation of ObjectIterator, with (hidden) extensions to allow for sorting by a numeric field.
Definition at line 91 of file ObjectIter.h.
| SimpleObjectIterator::SimpleObjectIterator | ( | ) |
Definition at line 59 of file SimpleObjectIterator.cpp.
|
inlinevirtual |
reset iterator and return first item (or null if iter is empty)
Implements ObjectIterator.
Definition at line 127 of file ObjectIter.h.
Definition at line 130 of file ObjectIter.h.
|
inline |
return the total number of objects in the iterator.
Definition at line 156 of file ObjectIter.h.
insert an object at the head of the iterator. the given numeric value (typically, dist-squared) is used only for subsequent sort() calls; if you aren't going to sort, pass 0.0f.
Definition at line 73 of file SimpleObjectIterator.cpp.
| void SimpleObjectIterator::makeEmpty | ( | ) |
throw away all contents of the iterator.
Definition at line 113 of file SimpleObjectIterator.cpp.
|
inlinevirtual |
advance and return next item (or null if no more to iterate)
Implements ObjectIterator.
Definition at line 128 of file ObjectIter.h.
Definition at line 89 of file SimpleObjectIterator.cpp.
| void SimpleObjectIterator::sort | ( | IterOrderType | order | ) |
sort the iterator based on the numeric values for objects and the order given. Note that some orders (ITER_FASTEST) do nothing!
Definition at line 130 of file SimpleObjectIterator.cpp.