Forums
This is the online documentation for Colossus Entertainments Pixie Game Engine

System.h File Reference

Go to the source code of this file.

Classes

class  System
 Base class for systems. More...

Defines

#define SYSTEM_IMPLEMENTATION(implementationName)
#define IMPLEMENT_GETINSTANCE(className)


Define Documentation

#define SYSTEM_IMPLEMENTATION ( implementationName   ) 

Value:

private:                                              \
      static implementationName* Create##implementationName##Instance() \
         {                                               \
         return new implementationName;                           \
         }                                               \
   public:                                                  \
      static void Register()                                   \
         {                                               \
         Engine::GetInstance()->RegisterSystem(                   \
                     #implementationName,                   \
                     (void*)Create##implementationName##Instance);   \
         }

Definition at line 64 of file System.h.

#define IMPLEMENT_GETINSTANCE ( className   ) 

Value:

inline className* GetInstance_##className(bool assertExists = true)           \
      {                                                        \
      static className* instance=0;                                  \
      if (instance)                                               \
         {                                                     \
         return instance;                                         \
         }                                                     \
                                                               \
      if (!assertExists && !Engine::GetInstance()->IsSystemPresent(#className))  \
         {                                                     \
         return 0;                                                \
         }                                                     \
                                                               \
      instance=(className*)Engine::GetInstance()->GetSystem(#className);         \
      return instance;                                            \
      }                                                        \

Definition at line 78 of file System.h.