#include <CollectionIterator.h>
Inheritance diagram for Core::CollectionIterator:
Public Member Functions | |
CollectionIterator (const Collection *coll) | |
virtual String * | className (void) const |
Answer receiver class name. | |
virtual Object * | value (void) |
virtual long | position (void) |
virtual void | position (long pos) |
virtual bool | finished (void) |
virtual void | next (void) |
Protected Attributes | |
const Collection * | collection |
Object * | item |
int | index |
|
Definition at line 28 of file CollectionIterator.cc. References collection, index, item, next(), and nil. 00029 { 00030 collection = coll; 00031 item = nil; 00032 index = -1; 00033 next(); 00034 }
|
|
Answer receiver class name. Because there isn't any standard way to obtain class name this method comes to place. Every class should rewrite this method but many didn't (yet). Reimplemented from Core::Object. Reimplemented in Core::KeysAndValuesIterator. Definition at line 37 of file CollectionIterator.cc. 00038 { 00039 return new String("CollectionIterator"); 00040 }
|
|
Reimplemented from Core::Iterator. Definition at line 59 of file CollectionIterator.cc. References Core::Collection::capacity(), collection, and index. Referenced by Tools::Configuration::keys(), next(), and Tools::Configuration::reloadAll(). 00060 { 00061 return index >= collection->capacity(); 00062 }
|
|
Reimplemented from Core::Iterator. Definition at line 65 of file CollectionIterator.cc. References collection, finished(), index, item, nil, and Core::Collection::privNextForIterator(). Referenced by CollectionIterator(), Tools::Configuration::keys(), and Tools::Configuration::reloadAll(). 00066 { 00067 index++; 00068 if (!finished()) item = collection->privNextForIterator(this); 00069 else item = nil; 00070 }
|
|
Definition at line 53 of file CollectionIterator.cc. References index. 00054 { 00055 index = pos; 00056 }
|
|
Definition at line 48 of file CollectionIterator.cc. References index. Referenced by Core::Set::privNextForIterator(), Core::SequenceableCollection::privNextForIterator(), and Core::Array::privNextForIterator(). 00049 { 00050 return index; 00051 }
|
|
Reimplemented from Core::Iterator. Reimplemented in Core::KeysAndValuesIterator. Definition at line 43 of file CollectionIterator.cc. References item. 00044 { 00045 return item; 00046 }
|
|
Definition at line 36 of file CollectionIterator.h. Referenced by CollectionIterator(), finished(), and next(). |
|
Definition at line 38 of file CollectionIterator.h. Referenced by CollectionIterator(), finished(), next(), and position(). |
|
Definition at line 37 of file CollectionIterator.h. Referenced by CollectionIterator(), Core::KeysAndValuesIterator::key(), next(), Core::KeysAndValuesIterator::value(), and value(). |