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 UT_ThreadIOPoolUThoudiniIOPool ()
 
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;
type
Definition: core.h:1059

Definition at line 74 of file UT_SubSystem.h.

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

Definition at line 102 of file UT_SubSystem.h.

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

Definition at line 95 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 85 of file UT_SubSystem.h.

Function Documentation

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

Definition at line 149 of file UT_SubSystem.h.

UT_API UT_ThreadIOPool& UThoudiniIOPool ( )

The general purpose thread pool. Any work can be done on this pool. The exception to this is licensing work. We must not do any licensing work on this thread as license checks will end up blocking the thread causing a hang waiting for licensing work to be processed.

UT_API void UTsubSystemInitialize ( )

Initialize all subsystems.

UT_API void UTsubSystemShutdown ( )

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