Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2007, 4:24:56 AM (16 years ago)
Author:
landauf
Message:

added comments

File:
1 edited

Legend:

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

    r362 r365  
     1/*!
     2    @file Factory.h
     3    @brief Definition of the Factory and the BaseFactory class.
     4
     5    The Factory is a singleton, containing two maps to map either the name or the networkID
     6    of a class with the corresponding Identifier.
     7
     8    Usage:
     9    ID(classname) or ID(networkID) returns the corresponding Identifier.
     10
     11
     12    BaseObject is the parent of ClassFactory which is defined in ClassFactory.h.
     13    It can't be defined in ClassFactory.h, because of circular dependencies.
     14*/
     15
    116#ifndef _Factory_H__
    217#define _Factory_H__
     
    722namespace orxonox
    823{
    9     class BaseObject;
    10     class Identifier;
     24    class BaseObject; // Forward declaration
     25    class Identifier; // Forward declaration
    1126
    1227    // ###############################
    1328    // ###         Factory         ###
    1429    // ###############################
     30    //! The Factory is used to map name or networkID of a class with its Identifier.
    1531    class Factory
    1632    {
     
    2238
    2339        private:
    24             Factory() {}
    25             Factory(const Factory& factory) {}
    26             ~Factory() {}
     40            Factory() {}                        // don't create
     41            Factory(const Factory& factory) {}  // don't copy
     42            ~Factory() {}                       // don't delete
    2743
    28             static Factory* pointer_s;
    29             std::map<std::string, Identifier*> identifierStringMap_;
    30             std::map<unsigned int, Identifier*> identifierNetworkIDMap_;
     44            static Factory* pointer_s;                                          //!< The pointer to the singleton
     45            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map mapping string with Identifier
     46            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map mapping networkID with Identifier
    3147    };
    3248
     
    3450    // ###       BaseFactory       ###
    3551    // ###############################
     52    //! Base-class of ClassFactory. Has to be defined separate because of circular dependencies.
    3653    class BaseFactory
    3754    {
Note: See TracChangeset for help on using the changeset viewer.