Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 25, 2007, 5:21:53 PM (16 years ago)
Author:
landauf
Message:

reimplementation of the factory and parts of the class-hierarchy-generating-algorithm. interfaces with protected constructors are now allowed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchie/src/Factory.h

    r219 r244  
    77namespace orxonox
    88{
     9    class BaseObject;
    910    class Identifier;
    10     class BaseObject;
    1111
    12     class ClassFactory
     12    // ###############################
     13    // ###         Factory         ###
     14    // ###############################
     15    class Factory
    1316    {
    1417        public:
    15             static BaseObject* fabricate(const std::string& name);
     18            static Identifier* getIdentifier(const std::string& name);
    1619            static void add(const std::string& name, Identifier* identifier);
    1720
    1821        private:
    19             ClassFactory() {}
    20             ClassFactory(const ClassFactory& factory) {}
    21             ~ClassFactory() {}
     22            Factory() {}
     23            Factory(const Factory& factory) {}
     24            ~Factory() {}
    2225
    23             static ClassFactory* pointer_s;
     26            static Factory* pointer_s;
    2427            std::map<std::string, Identifier*> identifierMap_;
     28    };
     29
     30    // ###############################
     31    // ###       BaseFactory       ###
     32    // ###############################
     33    class BaseFactory
     34    {
     35        public:
     36            virtual BaseObject* fabricate() = 0;
    2537    };
    2638}
Note: See TracChangeset for help on using the changeset viewer.