Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 18, 2013, 4:57:51 PM (11 years ago)
Author:
landauf
Message:

removed RegisterRootObject (replaced by RegisterObject)

Location:
code/branches/core6/src
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/BaseObject.cc

    r9638 r9659  
    5757    BaseObject::BaseObject(Context* context) : bInitialized_(false)
    5858    {
    59         RegisterRootObject(BaseObject);
     59        RegisterObject(BaseObject);
    6060
    6161        this->bInitialized_ = true;
  • code/branches/core6/src/libraries/core/Core.cc

    r9658 r9659  
    179179        // Do this soon after the ConfigFileManager has been created to open up the
    180180        // possibility to configure everything below here
    181         RegisterRootObject(Core);
     181        RegisterObject(Core);
    182182        orxout(internal_info) << "configuring Core" << endl;
    183183        this->setConfigValues();
     
    516516    DevModeListener::DevModeListener()
    517517    {
    518         RegisterRootObject(DevModeListener);
     518        RegisterObject(DevModeListener);
    519519    }
    520520}
  • code/branches/core6/src/libraries/core/CoreIncludes.h

    r9646 r9659  
    3737    @brief Defines several very important macros used to register objects, register classes, and to work with identifiers.
    3838
    39     Every class needs the @c RegisterObject(class) macro in its constructor. If the class is an interface
    40     or the @c BaseObject itself, it needs the macro @c RegisterRootObject(class) instead.
     39    Every class needs the @c RegisterObject(class) macro in its constructor.
    4140
    4241    To register @a class in the class-hierarchy, use the @c RegisterClass(class) macro outside of the class implementation,
    4342    so it gets executed statically before @c main(). If you don't want @a class to be loadable, but still register it, call
    4443    @c RegisterUnloadableClass(class).
     44
     45    Abstract classes are registered with @c RegisterAbstractClass(class). For abstract classes, the inheritance must be
     46    defined manually with @c RegisterAbstractClass(class).inheritsFrom(Class(parent)). Multiple parent classes can be defined
     47    by chaining the above command.
    4548
    4649    Example:
     
    125128
    126129/**
    127     @brief Intern macro, containing the common parts of @c RegisterObject and @c RegisterRootObject.
    128     @param ClassName The name of the class
    129     @param bRootClass True if the class is directly derived from orxonox::OrxonoxClass
    130 */
    131 #define InternRegisterObject(ClassName) \
     130    @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName.
     131    @param ClassName The name of the class
     132*/
     133#define RegisterObject(ClassName) \
    132134    if (ClassIdentifier<ClassName>::getIdentifier(#ClassName)->initializeObject(this)) \
    133135        return; \
    134136    else \
    135137        ((void)0)
    136 
    137 /**
    138     @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName.
    139     @param ClassName The name of the class
    140 */
    141 #define RegisterObject(ClassName) \
    142     InternRegisterObject(ClassName)
    143 
    144 /**
    145     @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName.
    146     @param ClassName The name of the class
    147 
    148     In contrast to RegisterObject, this is used for classes that inherit directly from
    149     orxonox::OrxonoxClass, namely all interfaces and orxonox::BaseObject.
    150 */
    151 #define RegisterRootObject(ClassName) \
    152     InternRegisterObject(ClassName)
    153138
    154139/**
  • code/branches/core6/src/libraries/core/GUIManager.cc

    r9558 r9659  
    256256        , destructionHelper_(this)
    257257    {
    258         RegisterRootObject(GUIManager);
     258        RegisterObject(GUIManager);
    259259
    260260        orxout(internal_status) << "initializing GUIManager..." << endl;
  • code/branches/core6/src/libraries/core/Game.cc

    r9560 r9659  
    112112
    113113        // Do this after the Core creation!
    114         RegisterRootObject(Game);
     114        RegisterObject(Game);
    115115        this->setConfigValues();
    116116
  • code/branches/core6/src/libraries/core/ViewportEventListener.cc

    r9656 r9659  
    3636    ViewportEventListener::ViewportEventListener()
    3737    {
    38         RegisterRootObject(ViewportEventListener);
     38        RegisterObject(ViewportEventListener);
    3939    }
    4040}
  • code/branches/core6/src/libraries/core/WindowEventListener.cc

    r9656 r9659  
    3939    WindowEventListener::WindowEventListener()
    4040    {
    41         RegisterRootObject(WindowEventListener);
     41        RegisterObject(WindowEventListener);
    4242    }
    4343
  • code/branches/core6/src/libraries/core/XMLNameListener.cc

    r9656 r9659  
    3636    XMLNameListener::XMLNameListener()
    3737    {
    38         RegisterRootObject(XMLNameListener);
     38        RegisterObject(XMLNameListener);
    3939    }
    4040}
  • code/branches/core6/src/libraries/core/command/Shell.cc

    r9658 r9659  
    6868        , bScrollable_(bScrollable)
    6969    {
    70         RegisterRootObject(Shell);
     70        RegisterObject(Shell);
    7171
    7272        OutputManager::getInstance().registerListener(this);
  • code/branches/core6/src/libraries/core/input/InputBuffer.cc

    r9658 r9659  
    3939    InputBuffer::InputBuffer()
    4040    {
    41         RegisterRootObject(InputBuffer);
     41        RegisterObject(InputBuffer);
    4242
    4343        this->cursor_ = 0;
     
    5959    InputBuffer::InputBuffer(const std::string& allowedChars)
    6060    {
    61         RegisterRootObject(InputBuffer);
     61        RegisterObject(InputBuffer);
    6262
    6363        this->maxLength_ = 1024;
  • code/branches/core6/src/libraries/core/input/InputManager.cc

    r9589 r9659  
    9898        , calibratorCallbackHandler_(0)
    9999    {
    100         RegisterRootObject(InputManager);
     100        RegisterObject(InputManager);
    101101
    102102        orxout(internal_status, context::input) << "InputManager: Constructing..." << endl;
  • code/branches/core6/src/libraries/core/input/JoyStick.cc

    r9559 r9659  
    5151        : super(id, oisInputManager)
    5252    {
    53         RegisterRootObject(JoyStick);
     53        RegisterObject(JoyStick);
    5454        this->setConfigValues();
    5555        // Initialise POV and Slider states
  • code/branches/core6/src/libraries/core/input/KeyBinder.cc

    r9559 r9659  
    5858        mousePosition_[1] = 0.0;
    5959
    60         RegisterRootObject(KeyBinder);
     60        RegisterObject(KeyBinder);
    6161
    6262        // initialise all buttons and half axes to avoid creating everything with 'new'
  • code/branches/core6/src/libraries/core/input/Mouse.cc

    r8729 r9659  
    5454        : super(id, oisInputManager)
    5555    {
    56         RegisterRootObject(Mouse);
     56        RegisterObject(Mouse);
    5757        this->windowResized(this->getWindowWidth(), this->getWindowHeight());
    5858
  • code/branches/core6/src/libraries/network/ClientConnectionListener.cc

    r9656 r9659  
    3939    ClientConnectionListener::ClientConnectionListener()
    4040    {
    41         RegisterRootObject(ClientConnectionListener);
     41        RegisterObject(ClientConnectionListener);
    4242    }
    4343
  • code/branches/core6/src/libraries/network/Host.cc

    r9557 r9659  
    145145  NetworkChatListener::NetworkChatListener()
    146146  {
    147       RegisterRootObject(NetworkChatListener);
     147      RegisterObject(NetworkChatListener);
    148148  }
    149149
  • code/branches/core6/src/libraries/network/NetworkFunction.cc

    r9658 r9659  
    4444  NetworkFunctionBase::NetworkFunctionBase(const std::string& name)
    4545  {
    46     RegisterRootObject(NetworkFunctionBase);
     46      RegisterObject(NetworkFunctionBase);
    4747
    4848    static uint32_t networkID = 0;
  • code/branches/core6/src/libraries/network/synchronisable/Synchronisable.cc

    r9656 r9659  
    5353  Synchronisable::Synchronisable(Context* context)
    5454  {
    55     RegisterRootObject(Synchronisable);
     55      RegisterObject(Synchronisable);
    5656    static uint32_t idCounter=0;
    5757    objectMode_=0x1; // by default do not send data to server
  • code/branches/core6/src/libraries/tools/Timer.cc

    r9658 r9659  
    140140    {
    141141        this->init();
    142         RegisterRootObject(Timer);
     142        RegisterObject(Timer);
    143143    }
    144144
     
    153153    {
    154154        this->init();
    155         RegisterRootObject(Timer);
     155        RegisterObject(Timer);
    156156
    157157        this->setTimer(interval, bLoop, executor, bKillAfterCall);
  • code/branches/core6/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc

    r9656 r9659  
    5050    TimeFactorListener::TimeFactorListener()
    5151    {
    52         RegisterRootObject(TimeFactorListener);
     52        RegisterObject(TimeFactorListener);
    5353    }
    5454
     
    7474    Tickable::Tickable()
    7575    {
    76         RegisterRootObject(Tickable);
     76        RegisterObject(Tickable);
    7777    }
    7878}
  • code/branches/core6/src/modules/designtools/ScreenshotManager.cc

    r9579 r9659  
    6969    ScreenshotManager::ScreenshotManager() : finalPicturePB_(NULL), data_(NULL)
    7070    {
    71         RegisterRootObject(ScreenshotManager);
     71        RegisterObject(ScreenshotManager);
    7272       
    7373        this->setConfigValues();
  • code/branches/core6/src/modules/designtools/SkyboxGenerator.cc

    r9558 r9659  
    6868    SkyboxGenerator::SkyboxGenerator()
    6969    {
    70         RegisterRootObject(SkyboxGenerator);
     70        RegisterObject(SkyboxGenerator);
    7171
    7272        this->setConfigValues();
  • code/branches/core6/src/modules/notifications/NotificationManager.cc

    r8858 r9659  
    5555    NotificationManager::NotificationManager()
    5656    {
    57         RegisterRootObject(NotificationManager);
     57        RegisterObject(NotificationManager);
    5858
    5959        orxout(internal_info, context::notifications) << "NotificatioManager created." << endl;
  • code/branches/core6/src/modules/weapons/projectiles/BasicProjectile.cc

    r9657 r9659  
    5050    BasicProjectile::BasicProjectile()
    5151    {
    52         RegisterRootObject(BasicProjectile);// Register the BasicProjectile class to the core
     52        RegisterObject(BasicProjectile);// Register the BasicProjectile class to the core
    5353
    5454        this->bDestroy_ = false;
  • code/branches/core6/src/orxonox/LevelManager.cc

    r9560 r9659  
    5959    LevelManager::LevelManager()
    6060    {
    61         RegisterRootObject(LevelManager);
     61        RegisterObject(LevelManager);
    6262        this->setConfigValues();
    6363
  • code/branches/core6/src/orxonox/MoodManager.cc

    r9558 r9659  
    4343    MoodManager::MoodManager()
    4444    {
    45         RegisterRootObject(MoodManager);
     45        RegisterObject(MoodManager);
    4646        this->setConfigValues();
    4747
     
    9595    MoodListener::MoodListener()
    9696    {
    97         RegisterRootObject(MoodListener);
     97        RegisterObject(MoodListener);
    9898    }
    9999
  • code/branches/core6/src/orxonox/PawnManager.cc

    r8351 r9659  
    3939    PawnManager::PawnManager()
    4040    {
    41         RegisterRootObject(PawnManager);
     41        RegisterObject(PawnManager);
    4242    }
    4343
  • code/branches/core6/src/orxonox/PlayerManager.cc

    r8858 r9659  
    4343    PlayerManager::PlayerManager()
    4444    {
    45         RegisterRootObject(PlayerManager);
     45        RegisterObject(PlayerManager);
    4646
    4747//         this->getConnectedClients();
  • code/branches/core6/src/orxonox/chat/ChatManager.cc

    r9657 r9659  
    117117    ChatListener::ChatListener()
    118118    {
    119         RegisterRootObject(ChatListener);
     119        RegisterObject(ChatListener);
    120120    }
    121121}
  • code/branches/core6/src/orxonox/gamestates/GSMainMenu.cc

    r9558 r9659  
    6666        : GameState(info)
    6767    {
    68         RegisterRootObject(GSMainMenu);
     68        RegisterObject(GSMainMenu);
    6969
    7070        InputManager::getInstance().createInputState("MainMenuHackery", true, true)->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
  • code/branches/core6/src/orxonox/interfaces/InterfaceCompilation.cc

    r9656 r9659  
    5454    GametypeMessageListener::GametypeMessageListener()
    5555    {
    56         RegisterRootObject(GametypeMessageListener);
     56        RegisterObject(GametypeMessageListener);
    5757    }
    5858
     
    6464    PlayerTrigger::PlayerTrigger()
    6565    {
    66         RegisterRootObject(PlayerTrigger);
     66        RegisterObject(PlayerTrigger);
    6767
    6868        this->isForPlayer_ = false;
     
    8484    RadarListener::RadarListener()
    8585    {
    86         RegisterRootObject(RadarListener);
     86        RegisterObject(RadarListener);
    8787    }
    8888
     
    9494    TeamColourable::TeamColourable()
    9595    {
    96         RegisterRootObject(TeamColourable);
     96        RegisterObject(TeamColourable);
    9797    }
    9898
     
    104104    Rewardable::Rewardable()
    105105    {
    106         RegisterRootObject(Rewardable);
     106        RegisterObject(Rewardable);
    107107    }
    108108}
  • code/branches/core6/src/orxonox/interfaces/NotificationListener.cc

    r8706 r9659  
    5353    NotificationListener::NotificationListener()
    5454    {
    55         RegisterRootObject(NotificationListener);
     55        RegisterObject(NotificationListener);
    5656    }
    5757
  • code/branches/core6/src/orxonox/interfaces/PickupCarrier.cc

    r9656 r9659  
    4949    PickupCarrier::PickupCarrier()
    5050    {
    51         RegisterRootObject(PickupCarrier);
     51        RegisterObject(PickupCarrier);
    5252    }
    5353
  • code/branches/core6/src/orxonox/interfaces/PickupListener.cc

    r8351 r9659  
    4747    PickupListener::PickupListener()
    4848    {
    49         RegisterRootObject(PickupListener);
     49        RegisterObject(PickupListener);
    5050    }
    5151
  • code/branches/core6/src/orxonox/interfaces/Pickupable.cc

    r9656 r9659  
    5454    Pickupable::Pickupable() : used_(false), pickedUp_(false)
    5555    {
    56         RegisterRootObject(Pickupable);
     56        RegisterObject(Pickupable);
    5757
    5858        this->carrier_ = NULL;
  • code/branches/core6/src/orxonox/interfaces/RadarViewable.cc

    r9656 r9659  
    5353        , scale_(1.0f)
    5454    {
    55         RegisterRootObject(RadarViewable);
     55        RegisterObject(RadarViewable);
    5656
    5757        this->uniqueId_=getUniqueNumberString();
  • code/branches/core6/src/orxonox/sound/BaseSound.cc

    r9657 r9659  
    5252        , pitch_ (1.0)
    5353    {
    54         RegisterRootObject(BaseSound);
     54        RegisterObject(BaseSound);
    5555
    5656        // Initialise audioSource_ to a value that is not a source
  • code/branches/core6/src/orxonox/sound/SoundManager.cc

    r9558 r9659  
    6969        : effectsPoolSize_(0)
    7070    {
    71         RegisterRootObject(SoundManager);
     71        RegisterObject(SoundManager);
    7272
    7373        orxout(user_status) << "Loading sound" << endl;
Note: See TracChangeset for help on using the changeset viewer.