Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by landauf, 16 years ago) (diff)

OrxonoxClass

TracNav(TracNav/TOC_Documentation)?

Description

OrxonoxClass is the base class of all objects and interfaces having Identifiers. Therefore OrxonoxClass is the direct parent of BaseObject and several interfaces like Tickable or Synchronisable?.

OrxonoxClass itself isn't of any use to the game-logic. All functions and variables are only there to create a common base for Identifiers. Some functions are used in macros (see CoreIncludes).

Inheriting from OrxonoxClass

Classes inheriting from OrxonoxClass must use virtual public derivation to avoid problems in the class-tree (diamond shape):

class MyInterface : virtual public OrxonoxClass
{
  ...
};

Functions

  • Parents:
    • getParents() and createParents() are functions used by macros (see CoreIncludes) to create the class-tree
  • Comparison: see Identifier for more informations
    • isA(…)
    • isExactlyA(…)
    • isChildOf(…)
    • isDirectChildOf(…)
    • isParentOf(…)
    • isDirectParentOf(…)

Illustration

As you can see, OrxonoxClass is on the top of the class-tree. Every other object or interface is a derivative.

No image "testclass_interface_orxonoxclass_tree.gif" attached to Core