Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 28, 2008, 11:50:53 PM (16 years ago)
Author:
landauf
Message:

a first test-version of my super-macro
tested with a testfunction in Projectile, just shoot to test
no idea if this works on other compilers (namely MSVC)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/core/Identifier.h

    r1610 r1676  
    6262#include "MetaObjectList.h"
    6363#include "Iterator.h"
     64#undef SUPER_INTRUSIVE
     65#include "Super.h"
    6466#include "util/Debug.h"
    6567#include "util/String.h"
     
    224226            static Identifier* getIdentifierSingleton(const std::string& name, Identifier* proposal);
    225227
     228            virtual void createSuperFunctionCaller() const = 0;
     229
    226230            /** @brief Returns the map that stores all Identifiers. @return The map */
    227231            static std::map<std::string, Identifier*>& getIdentifierMapIntern();
     
    229233            static std::map<std::string, Identifier*>& getLowercaseIdentifierMapIntern();
    230234
    231             bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
    232             ObjectListBase* objects_;                                      //!< The list of all objects of this class
    233 
    234         private:
    235235            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
    236236            inline std::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); }
     
    238238            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
    239239
     240            bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
     241            ObjectListBase* objects_;                                      //!< The list of all objects of this class
     242
     243        private:
    240244            /**
    241245                @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
     
    295299    class ClassIdentifier : public Identifier
    296300    {
     301        #define SUPER_INTRUSIVE_DECLARATION
     302        #include "Super.h"
     303
    297304        public:
    298305            static ClassIdentifier<T> *getIdentifier();
     
    311318
    312319        private:
    313             ClassIdentifier() {}
     320            ClassIdentifier()
     321            {
     322                #define SUPER_INTRUSIVE_CONSTRUCTOR
     323                #include "Super.h"
     324            }
    314325            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
    315326            ~ClassIdentifier() {}                                       // don't delete
Note: See TracChangeset for help on using the changeset viewer.