Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 27, 2009, 12:09:08 AM (14 years ago)
Author:
rgrieder
Message:

Fixed bug that caused derived classes to list the base class's config values as well.
Introduced a new "ClassByObjecType" function that accepts a 'this' pointer and returns the correct identifier (not this→getIdentifier()!).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/CoreIncludes.h

    r5929 r6423  
    125125        return Identifier::getIdentifierByID(id);
    126126    }
     127
     128    /**
     129        @brief Returns the Identifier with a given 'this' pointer.
     130        @note This of course only works with OrxonoxClasses.
     131              The only use is in conjunction with macros that don't know the class type.
     132        @param Pointer to an OrxonoxClass
     133    */
     134    template <class T>
     135    inline Identifier* ClassByObjectType(const T* object)
     136    {
     137        return ClassIdentifier<T>::getIdentifier();
     138    }
    127139}
    128140
Note: See TracChangeset for help on using the changeset viewer.