Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9671 in orxonox.OLD for trunk/src/lib/lang/new_object_list.cc


Ignore:
Timestamp:
Aug 21, 2006, 4:14:57 PM (18 years ago)
Author:
bensch
Message:

trunk: just realized, that polimorphism again is the evil part of classes.
Classes, that derive say from PNode and Element2D force that Element2D is registered after PNode, which means, that Element2D is interpretet as being derived from PNode in my implmentational idea…
hmm… now go for some new approach, this cannot and will not be the end of this…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/new_object_list.cc

    r9664 r9671  
    2424{
    2525  if (NewObjectListBase::_classes == NULL)
    26     NewObjectListBase::_classes = new cList;
     26    NewObjectListBase::_classes = new cSet;
     27
     28
    2729  assert(!NewObjectListBase::classNameExists(className) && "Classes should not be included once, and no two classes should have the same name (key value)");
    2830
     
    3739
    3840int NewObjectListBase::_idCounter = 0;
    39 NewObjectListBase::cList* NewObjectListBase::_classes = NULL;
     41NewObjectListBase::cSet* NewObjectListBase::_classes = NULL;
    4042
    4143
     
    4850bool NewObjectListBase::classNameExists(const std::string& name)
    4951{
    50   cList::iterator it;
     52  cSet::iterator it;
    5153  for (it = NewObjectListBase::_classes->begin(); it != NewObjectListBase::_classes->end(); it++)
    5254    if(*it != NULL && (*it)->name() != name)
Note: See TracChangeset for help on using the changeset viewer.