Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Initial Version and Version 1 of code/doc/CoreIncludes


Ignore:
Timestamp:
Feb 26, 2008, 11:06:28 PM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/CoreIncludes

    v1 v1  
     1= Core includes =
     2
     3== Description ==
     4
     5[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.
     6
     7== Macros ==
     8
     9 * '''Identifier''':
     10   * '''!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].
     11   * '''!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].
     12   * '''Class('''''!ClassName''''')''': Returns the [wiki:ClassIdentifier] of the given class.
     13   * '''!CreateFactory('''''!ClassName''''')''': Creates the entry in the [wiki:Factory] for the given class and adds a [wiki:ClassFactory] to the corresponding [wiki:Identifier].
     14   * '''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)).
     15
     16 * '''Config-values''':
     17   * '''!SetConfigValue('''''varname''''', '''''defvalue''''')''': Defines a [wiki:ConfigValueContainer configurable] variable with a default-value that can be changed in the config-file.
     18   * '''!ResetConfigValue('''''varname''''')''': Sets the given config-value back to the default-value (see !SetConfigValue(varname, defvalue)).