navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 14 (modified by landauf, 5 years ago) (diff)




CoreIncludes.h is a header-file in the core library, declaring several macros for Identifiers and the Factory.


Object Registration

  • RegisterObject(ClassName): This macro is used by classes that want to have an Identifier. Use the macro at the beginning of the constructor. It adds new instances of this class to the corresponding ObjectListBase and helps building the class hierarchy.
  • RegisterRootObject(ClassName): This is the same as RegisterObject(ClassName), but for root-classes like Interfaces (Tickable, network/Synchronisable and others) and the BaseObject.

Class Registration

  • RegisterClass(ClassName): Registers the given class in the framework and adds a ClassFactory to the corresponding Identifier. This macro has to be used outside the class-functions as a static call (preferably just before the constructor).


  • Class(ClassName): Returns the ClassIdentifier of the given class.
  • ClassByString(String): Returns the Identifier of the class with the given name if the entry in the Factory exists
  • ClassByID(NetworkID): Returns the Identifier of the class with the given networkID if the entry in the Factory exists


// Create the factory for MyClass

// Constructor:
    // Register the object in the Identifier of MyClass
// Assigns the Identifier of MyClass
Identifier* identifier = Class(MyClass);
// Assigns the Identifier of a class named "MyClass"
Identifier* identifier = ClassByString("MyClass");