Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 12, 2008, 4:24:14 PM (16 years ago)
Author:
landauf
Message:

Added two new classes:

  • ClassManager, a helper class for ClassIdentifier
  • IdentifierDistributor, a class that hopefully allows unique ClassIdentifiers even with several libraries

In a first try it seemed to work, but it needs more testing. At least it solved a problem I discovered yesterday with multiple Identifiers for the type "BaseObject" on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core/src/orxonox/core/ClassTreeMask.cc

    r804 r805  
    156156    ClassTreeMask::ClassTreeMask()
    157157    {
    158         this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
     158        this->root_ = new ClassTreeMaskNode(ClassManager<BaseObject>::getIdentifier("BaseObject"), true);
    159159    }
    160160
     
    227227    {
    228228        delete this->root_;
    229         this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
     229        this->root_ = new ClassTreeMaskNode(ClassManager<BaseObject>::getIdentifier("BaseObject"), true);
    230230    }
    231231
     
    237237    bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const
    238238    {
    239 std::cout << "1_0: " << ClassIdentifier<BaseObject>::getIdentifier() << std::endl;
    240239std::cout << "1_1: " << subclass->getName() << " (" << subclass << ") / " << node->getClass()->getName() << " (" << node->getClass() << ")" << std::endl;
    241240        // Check if the searched subclass is of the same type as the class in the current node or a derivative
Note: See TracChangeset for help on using the changeset viewer.