Tramway SDK
Classes | Typedefs | Enumerations | Functions
tram::System Namespace Reference

System tracking. More...

Classes

struct  SystemInfo
 

Typedefs

typedef uint32_t system_t
 

Enumerations

enum  System : system_t {
  INVALID , CORE , PLATFORM , UI ,
  GUI , ASYNC , RENDER , PHYSICS ,
  AUDIO , MISC , SYSTEM_LAST
}
 
enum  SystemState { YEET , INIT , READY }
 

Functions

uint32_t Register (char const *name, char const *short_name)
 Registers a new system. More...
 
system_t Find (char const *name)
 Registers a registered system. More...
 
char const * GetName (uint32_t system)
 Retrieves the full name of a system. More...
 
char const * GetShortName (uint32_t system)
 Retrieves the short name of a system. More...
 
void SetInitialized (uint32_t system, bool is_initialized)
 Sets the initialization status of a system. More...
 
bool IsInitialized (uint32_t system)
 Checks if a system is initialized. More...
 
void SetState (system_t system, SystemState state)
 Sets the state of a system. More...
 
void AssertDependency (system_t system)
 
system_t GetSystemCount ()
 Returns the total count of registered systems. More...
 

Detailed Description

System tracking.

This system keeps track of other systems, their initialization status, as well as their names.

See also
https://racenis.github.io/tram-sdk/documentation/framework/system.html

Typedef Documentation

◆ system_t

typedef uint32_t tram::System::system_t

Enumeration Type Documentation

◆ System

Enumerator
INVALID 
CORE 
PLATFORM 
UI 
GUI 
ASYNC 
RENDER 
PHYSICS 
AUDIO 
MISC 
SYSTEM_LAST 

◆ SystemState

Enumerator
YEET 
INIT 
READY 

Function Documentation

◆ AssertDependency()

void tram::System::AssertDependency ( system_t  system)

◆ Find()

system_t tram::System::Find ( char const *  name)

Registers a registered system.

If the system was registered with the Register() function, its system_t identificator will be returned. If a system with the name was not registered, this function will return a SYSTEM_INVALID identificator.

◆ GetName()

char const * tram::System::GetName ( uint32_t  system)

Retrieves the full name of a system.

◆ GetShortName()

char const * tram::System::GetShortName ( uint32_t  system)

Retrieves the short name of a system.

◆ GetSystemCount()

uint32_t tram::System::GetSystemCount ( )

Returns the total count of registered systems.

◆ IsInitialized()

bool tram::System::IsInitialized ( uint32_t  system)

Checks if a system is initialized.

◆ Register()

system_t tram::System::Register ( char const *  name,
char const *  short_name 
)

Registers a new system.

Parameters
nameFull name of the system.
short_nameName of the system that will be displayed in log messages.

◆ SetInitialized()

void tram::System::SetInitialized ( uint32_t  system,
bool  is_initialized 
)

Sets the initialization status of a system.

◆ SetState()

void tram::System::SetState ( system_t  system,
SystemState  state 
)

Sets the state of a system.

  • YEET when a system is uninitialized.
  • INIT when a system is initializing.
  • READY when a system is initialized.