= Core includes = == Description == [wiki:CoreIncludes CoreIncludes.h] is a header-file, declaring several easy-to-use macros providing functionalities of the [wiki:Core core library] like [wiki:Identifier Identifiers], the [wiki:Factory], [wiki:ConfigValueContainer config-values] and others. == Macros == * '''Identifier''': * '''!RegisterObject('''''!ClassName''''')''': This macro is used by classes that want to have an [wiki:Identifier]. Use the macro at the beginning of the constructor. It adds new objects of this class to the corresponding [wiki:ObjectList] and helps building up the [wiki:Identifier class hierarchy]. * '''!RegisterRootObject('''''!ClassName''''')''': This is the same as !RegisterObject(!ClassName), but for root-classes like Interfaces ([wiki:Tickable], [wiki:Synchronisable] and others) and the [wiki:BaseObject]. * '''Class('''''!ClassName''''')''': Returns the [wiki:ClassIdentifier] of the given class. * '''!CreateFactory('''''!ClassName''''')''': Creates the entry in the [wiki:Factory] for the given class and adds a [wiki:ClassFactory] to the corresponding [wiki:Identifier]. * '''ID('''''!StringOrInt''''')''': Returns the [wiki:Identifier] of the class with the given name or the given network ID if the entry in the [wiki:Factory] exists (see !CreateFactory(!ClassName)). * '''Config-values''': * '''!SetConfigValue('''''varname''''', '''''defvalue''''')''': Defines a [wiki:ConfigValueContainer configurable] variable with a default-value that can be changed in the config-file. * '''!ResetConfigValue('''''varname''''')''': Sets the given config-value back to the default-value (see !SetConfigValue(varname, defvalue)).