Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 4 and Version 5 of code/doc/ObjectListIterator


Ignore:
Timestamp:
Sep 28, 2008, 7:33:35 PM (12 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/ObjectListIterator

    v4 v5  
    88'''Important''': Always use !ObjectListIterator instead of Iterator if you know which class you want to iterate through.
    99
     10== Notation ==
     11There are two equivalent notations:
     12{{{
     13ObjectListIterator<T>
     14}}}
     15and
     16{{{
     17ObjectList<T>::iterator
     18}}}
     19Use whatever you like. '''Important''': The second notation needs !ObjectList.h, while the first notation works already with a forward declaration. So if you need the iterator in a header-file, you should prefer the first notation.
     20
    1021== Examples ==
    1122{{{
    12 for (ObjectListIterator<myClass> it = ObjectList<myClass>::begin();
     23for (ObjectList<myClass>::iterator it = ObjectList<myClass>::begin();
    1324                                 it != ObjectList<myClass>::end(); ++it)
    1425{
     
    3344
    3445int count = 0;
    35 for (ObjectListIterator<BaseObject> it = ObjectList<BaseObject>::begin();
    36                                     it != ObjectList<BaseObject>::end(); ++it)
     46for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin();
     47                                      it != ObjectList<BaseObject>::end(); ++it)
    3748{
    3849  count++;
     
    4152
    4253count = 0;
    43 for (ObjectListIterator<A1> it = ObjectList<A1>::begin();
    44                             it != ObjectList<A1>::end(); ++it)
     54for (ObjectList<A1>::iterator it = ObjectList<A1>::begin();
     55                              it != ObjectList<A1>::end(); ++it)
    4556{
    4657  count++;
     
    4960
    5061count = 0;
    51 for (ObjectListIterator<A3B1> it = ObjectList<A3B1>::begin();
    52                               it != ObjectList<A3B1>::end(); ++it)
     62for (ObjectList<A3B1>::iterator it = ObjectList<A3B1>::begin();
     63                                it != ObjectList<A3B1>::end(); ++it)
    5364{
    5465  count++;