Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 13, 2009, 5:05:17 PM (15 years ago)
Author:
dafrick
Message:

Hopefully merged trunk successfully into pickup branch.

Location:
code/branches/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup

  • code/branches/pickup/src/libraries/core/CoreIncludes.h

    r5781 r5935  
    2929/**
    3030    @file
    31     @brief Definition of macros for Identifier and Factory.
     31    @brief Definition of macros for Identifiers
    3232
    3333    Every class needs the RegisterObject(class) macro in its constructor. If the class is an interface
     
    4545#include "util/Debug.h"
    4646#include "Identifier.h"
    47 #include "Factory.h"
     47#include "SubclassIdentifier.h"
    4848#include "ClassFactory.h"
    4949#include "ObjectList.h"
     
    7676
    7777/**
    78     @brief Creates the entry in the Factory.
     78    @brief Creates the Factory.
    7979    @param ClassName The name of the class
    8080*/
    8181#define CreateFactory(ClassName) \
    82     bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, true)
     82    Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName, true)
    8383
    8484/**
    85     @brief Creates the entry in the Factory for classes which should not be loaded through XML.
     85    @brief Creates the Factory for classes which should not be loaded through XML.
    8686    @param ClassName The name of the class
    8787*/
    8888#define CreateUnloadableFactory(ClassName) \
    89     bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, false)
     89    Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName, false)
    9090
    9191/**
     
    100100{
    101101    /**
    102         @brief Returns the Identifier with a given name through the factory.
     102        @brief Returns the Identifier with a given name.
    103103        @param String The name of the class
    104104    */
    105105    inline Identifier* ClassByString(const std::string& name)
    106106    {
    107         return Factory::getIdentifier(name);
     107        return Identifier::getIdentifierByString(name);
    108108    }
    109109
    110110    /**
    111         @brief Returns the Identifier with a given network ID through the factory.
     111        @brief Returns the Identifier with a given lowercase name.
     112        @param String The lowercase name of the class
     113    */
     114    inline Identifier* ClassByLowercaseString(const std::string& name)
     115    {
     116        return Identifier::getIdentifierByLowercaseString(name);
     117    }
     118
     119    /**
     120        @brief Returns the Identifier with a given network ID.
    112121        @param networkID The network ID of the class
    113122    */
    114123    inline Identifier* ClassByID(uint32_t id)
    115124    {
    116         return Factory::getIdentifier(id);
     125        return Identifier::getIdentifierByID(id);
    117126    }
    118127}
Note: See TracChangeset for help on using the changeset viewer.