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)

Location:
code/branches/core3/src/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/core/ConfigFileManager.cc

    r1658 r1676  
    327327        file.close();
    328328
    329         COUT(3) << "Loaded config file \"" << this->filename_ << "\"." << std::endl;
     329        COUT(0) << "Loaded config file \"" << this->filename_ << "\"." << std::endl;
    330330
    331331        // Save the file in case something changed (like stripped whitespaces)
  • code/branches/core3/src/core/Factory.cc

    r1586 r1676  
    9898        }
    9999        (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy();
     100/*
     101        for (it = Identifier::getIdentifierMapIntern().begin(); it != Identifier::getIdentifierMapIntern().end(); ++it)
     102            (*it).second->createSuperFunctionCaller();
     103*/
    100104        COUT(3) << "*** Factory: Finished class-hierarchy creation" << std::endl;
    101105    }
  • code/branches/core3/src/core/Identifier.cc

    r1610 r1676  
    145145                // Tell the parent we're one of it's direct children
    146146                (*it)->getDirectChildrenIntern().insert((*it)->getDirectChildrenIntern().end(), this);
     147
     148                // Create the super-function dependencies
     149                (*it)->createSuperFunctionCaller();
    147150            }
    148151        }
  • 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.