Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

removed RegisterRootObject (replaced by RegisterObject)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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/**
Note: See TracChangeset for help on using the changeset viewer.