Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 5, 2009, 9:22:22 PM (14 years ago)
Author:
rgrieder
Message:

Synchronised sandbox with current code trunk. There should be a few bug fixes.

Location:
sandbox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox

  • sandbox/src/libraries/core/CoreIncludes.h

    r5782 r6038  
    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"
    4847#include "ClassFactory.h"
    4948#include "ObjectList.h"
     
    7675
    7776/**
    78     @brief Creates the entry in the Factory.
     77    @brief Creates the Factory.
    7978    @param ClassName The name of the class
    8079*/
    8180#define CreateFactory(ClassName) \
    82     bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
     81    Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName)
    8382
    8483/**
     
    9392{
    9493    /**
    95         @brief Returns the Identifier with a given name through the factory.
     94        @brief Returns the Identifier with a given name.
    9695        @param String The name of the class
    9796    */
    9897    inline Identifier* ClassByString(const std::string& name)
    9998    {
    100         return Factory::getIdentifier(name);
     99        return Identifier::getIdentifierByString(name);
    101100    }
    102101
    103102    /**
    104         @brief Returns the Identifier with a given network ID through the factory.
    105         @param networkID The network ID of the class
     103        @brief Returns the Identifier with a given lowercase name.
     104        @param String The lowercase name of the class
    106105    */
    107     inline Identifier* ClassByID(uint32_t id)
     106    inline Identifier* ClassByLowercaseString(const std::string& name)
    108107    {
    109         return Factory::getIdentifier(id);
     108        return Identifier::getIdentifierByLowercaseString(name);
    110109    }
    111110}
Note: See TracChangeset for help on using the changeset viewer.