Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2007, 1:11:28 AM (16 years ago)
Author:
landauf
Message:

removed stupid hack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/core/Factory.h

    r551 r552  
    4242            Factory(const Factory& factory) {}      // don't copy
    4343            ~Factory() {}                           // don't delete
    44             static void checkPointer();
    4544
    46             static Factory* pointer1_s;                                         //!< The 1st pointer to the singleton
    47             static Factory* pointer2_s;                                         //!< The 2nd pointer to the singleton
    48             static Factory* pointer3_s;                                         //!< The 3rd pointer to the singleton
    49             static Factory* pointer4_s;                                         //!< The 4th pointer to the singleton
    50             static Factory* pointer5_s;                                         //!< The 5th pointer to the singleton
     45            /**
     46                @brief Checks if the pointer to the only Factory-object exists and creates it, if not.
     47            */
     48            inline static void checkPointer()
     49            {
     50                if (!pointer_s)
     51                    pointer_s = new Factory;
     52            }
     53
     54            static Factory* pointer_s;                                          //!< The pointer to the singleton
    5155            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
    5256            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
Note: See TracChangeset for help on using the changeset viewer.