Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 24, 2006, 11:26:48 PM (18 years ago)
Author:
bensch
Message:

some more DEBUG-functionality to the ObjectList… something is not quite right… i wonder, what this might be…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/lang/base_object.cc

    r9806 r9807  
    3232  this->objectName = objectName;
    3333  this->xmlElem = NULL;
     34  this->registerObject(this, BaseObject::_objectList);
    3435}
    3536
     
    4041{
    4142  /// Remove from the ObjectLists
    42   ClassList::iterator it;
     43  ClassEntries::iterator it;
     44  printf("Deleting Object of type %s::%s\n", this->getClassCName(), getCName());
    4345  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    4446  {
     47    assert((*it)._objectList->checkIteratorInList((*it)._iterator) || (*it)._objectList->checkObjectInList(this));
    4548    (*it)._objectList->unregisterObject((*it)._iterator);
    4649    delete (*it)._iterator;
     
    8790bool BaseObject::isA(const ObjectListBase& objectList) const
    8891{
    89   ClassList::const_iterator it;
     92  ClassEntries::const_iterator it;
    9093  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    9194    if ((*it)._objectList == &objectList)
     
    102105bool BaseObject::isA(const ClassID& classID) const
    103106{
    104   ClassList::const_iterator it;
     107  ClassEntries::const_iterator it;
    105108  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    106109    if (*(*it)._objectList == classID)
     
    116119bool BaseObject::isA(int classID) const
    117120{
    118   ClassList::const_iterator it;
     121  ClassEntries::const_iterator it;
    119122  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    120123    if (*(*it)._objectList == classID)
     124
    121125      return true;
    122126  return false;
     
    130134bool BaseObject::isA(const std::string& className) const
    131135{
    132   ClassList::const_iterator it;
     136  ClassEntries::const_iterator it;
    133137  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    134138    if (*(*it)._objectList == className)
     
    146150{
    147151  PRINT(0)("Listing inheritance diagram for %s::%s: ", getClassCName(), getCName());
    148   ClassList::const_iterator it;
     152  ClassEntries::const_iterator it;
    149153  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    150154    PRINT(0)(" -> %s(id:%d)", (*it)._objectList->name().c_str(), (*it)._objectList->id());
Note: See TracChangeset for help on using the changeset viewer.