Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2009, 8:14:46 PM (16 years ago)
Author:
rgrieder
Message:

Removed three macros: Two (ClassByString and ClassByID) by replacing them with an equivalent inline function and the other one by moving some macro-code to an actual function. Most of what RegisterObject() does can simply be done within a template function in the ClassIdentifier.
Also removed some mysterious public functions of OrxonoxClass (WorldEntity::getParents() doesn't exactly do what you would expect) that only served internal purposes. Instead the ClassIdentifier became a friend of OrxonoxClass and now does the necessary work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/OrxonoxClass.h

    r3223 r3224  
    6363            inline Identifier* getIdentifier() const { return this->identifier_; }
    6464
    65             /** @brief Sets the Identifier of the object. Used by the RegisterObject-macro. */
    66             inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }
    67 
    68             /** @brief Returns the list of all parents of the object. @return The list */
    69             inline std::set<const Identifier*>* getParents() const { return this->parents_; }
    70 
    71             /** @brief Creates the parents-list. */
    72             inline void createParents() { this->parents_ = new std::set<const Identifier*>(); }
    73 
    74             /** @brief Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. @return The list */
    75             inline MetaObjectList& getMetaList() { return (*this->metaList_); }
    76 
    77 
    7865            bool isA(const Identifier* identifier);
    7966            bool isExactlyA(const Identifier* identifier);
Note: See TracChangeset for help on using the changeset viewer.