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/libraries
Files:
20 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}
Note: See TracChangeset for help on using the changeset viewer.