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/CoreIncludes.h

    r792 r805  
    4444// All needed header-files
    4545#include "Identifier.h"
     46#include "ClassManager.h"
    4647#include "Factory.h"
    4748#include "ClassFactory.h"
     
    5758*/
    5859#define InternRegisterObject(ClassName, bRootClass) \
    59     this->setIdentifier(orxonox::ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \
     60    this->setIdentifier(orxonox::ClassManager<ClassName>::getIdentifier(#ClassName)->registerClass(this->getParents(), #ClassName, bRootClass)); \
    6061    if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \
    6162        this->getParents()->add(this->getIdentifier()); \
    62     orxonox::ClassIdentifier<ClassName>::addObject(this)
     63    orxonox::ClassManager<ClassName>::getIdentifier(#ClassName)->addObject(this)
    6364
    6465/**
     
    111112*/
    112113#define Class(ClassName) \
    113     ClassIdentifier<ClassName>::getIdentifier()
     114    ClassManager<ClassName>::getIdentifier(#ClassName)
    114115
    115116/**
Note: See TracChangeset for help on using the changeset viewer.