Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 29, 2008, 4:15:03 AM (16 years ago)
Author:
landauf
Message:
  • some small adjustments in identifier and co.
  • renamed GetIdentifier to ClassByName and ClassByID
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/CoreIncludes.h

    r1789 r1856  
    9494
    9595/**
     96    @brief Creates the entry in the Factory.
     97    @param ClassName The name of the class
     98*/
     99#define CreateFactory(ClassName) \
     100    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
     101
     102/**
    96103    @brief Returns the Identifier of the given class.
    97104    @param ClassName The name of the class
     
    101108
    102109/**
    103     @brief Creates the entry in the Factory.
    104     @param ClassName The name of the class
     110    @brief Returns the Identifier with a given name through the factory.
     111    @param String The name of the class
    105112*/
    106 #define CreateFactory(ClassName) \
    107     bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
     113#define ClassByName(String) \
     114    orxonox::Factory::getIdentifier(String)
    108115
    109116/**
    110     @brief Returns the Identifier with either a given name or a given network ID through the factory.
    111     @param StringOrInt The name or the network ID of the class
     117    @brief Returns the Identifier with a given network ID through the factory.
     118    @param networkID The network ID of the class
    112119*/
    113 #define GetIdentifier(StringOrInt) \
    114     orxonox::Factory::getIdentifier(StringOrInt)
     120#define ClassByID(networkID) \
     121    orxonox::Factory::getIdentifier(networkID)
    115122
    116123#endif /* _CoreIncludes_H__ */
Note: See TracChangeset for help on using the changeset viewer.