HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_SubSystem.h File Reference
#include "UT_API.h"
#include "UT_NonCopyable.h"
#include "UT_UniquePtr.h"
#include <SYS/SYS_StaticInit.h>
#include <type_traits>
+ Include dependency graph for UT_SubSystem.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UT_ISubSystem
 
class  UT_SubSystem
 The subsystem to initialize and cleanup UT. More...
 

Namespaces

 UT_SubSystemImpl
 

Macros

#define UT_ENABLE_SUBSYSTEMS
 
#define UT_SUBSYSTEM_CLASS(sub_type)
 
#define UT_SUBSYSTEM_IMPL_INNER(cls)
 
#define UT_SUBSYSTEM_IMPL(cls)
 
#define UT_SUBSYSTEM_DECLARE(api, cls)
 

Functions

UT_API void UTsubSystemInitialize ()
 Initialize all subsystems. More...
 
UT_API void UTsubSystemShutdown ()
 
 UT_SubSystemImpl::SYSdeclareStaticObject (UT_API, theRegistry)
 
UT_API UT_ISubSystemUT_SubSystemImpl::utGetSubSystem (UT_SubSystem::Type t)
 
template<typename T >
T * UTgetSubSystem ()
 
 UT_SUBSYSTEM_DECLARE (UT_API, UT_SubSystem)
 

Macro Definition Documentation

#define UT_ENABLE_SUBSYSTEMS

Definition at line 18 of file UT_SubSystem.h.

#define UT_SUBSYSTEM_CLASS (   sub_type)
Value:
public: \
static constexpr Type subsystem_type = UT_ISubSystem::Type::sub_type; \
Type type() const override \
{ \
return subsystem_type; \
} \
\
private: \
static bool theIsRegistered;
#define const
Definition: zconf.h:214
type
Definition: core.h:1059

Definition at line 70 of file UT_SubSystem.h.

#define UT_SUBSYSTEM_DECLARE (   api,
  cls 
)
Value:
namespace cls_Namespace \
{ \
}
#define SYSdeclareStaticInit(API, NAME)

Definition at line 98 of file UT_SubSystem.h.

#define UT_SUBSYSTEM_IMPL (   cls)
Value:
namespace cls_Namespace \
{ \
}
#define UT_SUBSYSTEM_IMPL_INNER(cls)
Definition: UT_SubSystem.h:81
#define SYSimplementStaticInit(NAME)

Definition at line 91 of file UT_SubSystem.h.

#define UT_SUBSYSTEM_IMPL_INNER (   cls)
Value:
static SYS_StaticInit<cls> theSubSystem; \
static void cls##Init() \
{ \
UT_ISubSystem::registerSubSystem<cls>(*theSubSystem); \
} \
static void cls##CleanUp() \
{ \
}

Definition at line 81 of file UT_SubSystem.h.

Function Documentation

UT_SUBSYSTEM_DECLARE ( UT_API  ,
UT_SubSystem   
)
template<typename T >
T* UTgetSubSystem ( )

Definition at line 133 of file UT_SubSystem.h.

UT_API void UTsubSystemInitialize ( )

Initialize all subsystems.

UT_API void UTsubSystemShutdown ( )

Shutdown all subsystems. initialize() must be called prior to this function.