= !CoreIncludes = == 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. * '''Factory''': * '''!CreateFactory('''''!ClassName''''')''': Creates the entry in the [wiki:Factory] for the given class and adds a [wiki:ClassFactory] to the corresponding [wiki:Identifier]. This macro has to be used outside the class-functions as a static call. * '''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. ''varname'' must be a member-variable of a class and the macro should only be used in the setConfigValues() function of this class to allow ingame-changes of the values. Read the Wiki-page of [wiki:ConfigValueContainer] for further informations. * '''!ResetConfigValue('''''varname''''')''': Sets the given config-value back to the default value (see !SetConfigValue(varname, defvalue)).