Changes between Version 6 and Version 7 of code/doc/OrxonoxClass
- Timestamp:
- Sep 27, 2008, 2:43:32 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/doc/OrxonoxClass
v6 v7 4 4 == Description == 5 5 6 OrxonoxClass is the base class of all objects and interfaces having [wiki:Identifier Identifiers]. Therefore OrxonoxClass is the direct parent of BaseObject and several interfaces like [wiki:Tickable] or [wiki:Synchronisable].6 !OrxonoxClass is the base class of all objects and interfaces in the class hierarchy. Therefore !OrxonoxClass is the direct parent of [wiki:BaseObject] and several interfaces like [wiki:Tickable] or [wiki:network/Synchronisable Synchronisable]. 7 7 8 OrxonoxClass itself isn't of any use to the game-logic. All functions and variables are only there to create a common base for [wiki:Identifier Identifiers]. Some functions are used in macros (see CoreIncludes).8 !OrxonoxClass itself isn't of any use for the game-logic. All functions and variables are only there to create a common base for [wiki:Identifier Identifiers] and to create the class hierarchy. Some functions are used in macros (see [wiki:CoreIncludes]). 9 9 10 10 == Inheriting from !OrxonoxClass == 11 11 12 Classes inheriting from OrxonoxClass '''must''' use '''virtual public''' derivation to avoid problems in the class-tree (diamond shape):12 Classes inheriting from !OrxonoxClass '''must''' use '''virtual public''' derivation to avoid problems in the class-tree (diamond shape): 13 13 14 14 {{{ … … 24 24 25 25 * '''Identifier''': 26 * getIdentifier(): Returns the [wiki:Identifier] of an object27 * setIdentifier(...): Sets the [wiki:Identifier] of the class (used by a macro, see [wiki:CoreIncludes]26 * '''getIdentifier()''': Returns the [wiki:Identifier] of an object 27 * '''setIdentifier('''''identifier''''')''': Sets the [wiki:Identifier] of the class (used by a macro, see [wiki:CoreIncludes] 28 28 29 29 * '''Parents''': 30 * getParents() and createParents()are functions used by macros (see [wiki:CoreIncludes]) to create the class-tree30 * '''getParents()''' and '''createParents()''' are functions used by macros (see [wiki:CoreIncludes]) to create the class-tree 31 31 32 32 * '''Comparison''': see [wiki:Identifier] for more information 33 * isA(...)34 * isExactlyA(...)35 * isChildOf(...)36 * isDirectChildOf(...)37 * isParentOf(...)38 * isDirectParentOf(...)33 * '''isA(...)''' 34 * '''isExactlyA(...)''' 35 * '''isChildOf(...)''' 36 * '''isDirectChildOf(...)''' 37 * '''isParentOf(...)''' 38 * '''isDirectParentOf(...)''' 39 39 40 40 == Illustration == 41 41 42 As you can see, OrxonoxClass is on the top of the class-tree. Every other object or interface is a derivative.42 As you can see, !OrxonoxClass is on the top of the class-tree. Every other object or interface is a derivative: 43 43 44 44 [[Image(Core:testclass_interface_orxonoxclass_tree.gif)]]