Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion_type::KernelTypeRegistry Class Reference

Singleton class responsible for managing the initialization order of all kernel type objects. More...

#include <type_utils.hpp>

Public Member Functions

void register_type (uint16_t priority, InitFn fn)
 
void init_types ()
 
bool is_initialized ()
 

Static Public Member Functions

static KernelTypeRegistryinstance ()
 

Private Attributes

std::vector< std::tuple< int, InitFn > > initializers
 List of initialization functions paired with their priority.
 
bool initialized = false
 Flag indicating if initialization has been completed.
 

Detailed Description

Singleton class responsible for managing the initialization order of all kernel type objects.

Member Function Documentation

◆ init_types()

void arion_type::KernelTypeRegistry::init_types ( )
inline

Executes all registered initialization functions in priority order.

◆ instance()

static KernelTypeRegistry & arion_type::KernelTypeRegistry::instance ( )
inlinestatic

Provides access to the singleton instance of the registry.

Returns
Reference to the singleton instance.

◆ is_initialized()

bool arion_type::KernelTypeRegistry::is_initialized ( )
inline

Checks if the registry has finished initialization.

Returns
true if initialized, false otherwise.

◆ register_type()

void arion_type::KernelTypeRegistry::register_type ( uint16_t  priority,
InitFn  fn 
)
inline

Registers a type initialization function with a priority. Initialization runs in ascending priority order.

Parameters
[in]priorityThe priority level for initialization.
[in]fnThe function to call to initialize the type object.

Member Data Documentation

◆ initialized

bool arion_type::KernelTypeRegistry::initialized = false
private

Flag indicating if initialization has been completed.

◆ initializers

std::vector<std::tuple<int, InitFn> > arion_type::KernelTypeRegistry::initializers
private

List of initialization functions paired with their priority.


The documentation for this class was generated from the following file: