HawkTracer  0.10.0
registry.h File Reference

Go to the source code of this file.

Functions

HT_DECLS_BEGIN HT_API HT_ErrorCode ht_registry_register_feature (HT_FeatureKlass *klass)
 Registers new a new feature in the system. More...
 
HT_API HT_EventKlassId ht_registry_register_event_klass (HT_EventKlass *event_klass)
 Registers new event klass in the system, or gets identifier if klass is already registered. More...
 
HT_API size_t ht_registry_push_registry_klasses_to_listener (HT_TimelineListenerCallback callback, void *listener, HT_Boolean serialize)
 Pushes information about registered event klasses (HT_EventKlassInfoEvent and HT_EventKlassFieldInfoEvent events) directly to a listener. More...
 
HT_API HT_EventKlass ** ht_registry_get_event_klasses (size_t *out_klass_count)
 Returns a list of all the klasses registered in HawkTracer library. More...
 

Function Documentation

◆ ht_registry_get_event_klasses()

HT_API HT_EventKlass** ht_registry_get_event_klasses ( size_t *  out_klass_count)

Returns a list of all the klasses registered in HawkTracer library.

Parameters
out_klass_counta pointer to variable to store number of klasses.
Returns
an array of all the event klasses registered in the library.

◆ ht_registry_push_registry_klasses_to_listener()

HT_API size_t ht_registry_push_registry_klasses_to_listener ( HT_TimelineListenerCallback  callback,
void *  listener,
HT_Boolean  serialize 
)

Pushes information about registered event klasses (HT_EventKlassInfoEvent and HT_EventKlassFieldInfoEvent events) directly to a listener.

Parameters
callbackthe listener callback.
listenera pointer to the listener.
serializeindicates whether events should be serialized before pushing to listener or not.
Returns
number of bytes which have been pushed to a listener.

◆ ht_registry_register_event_klass()

HT_API HT_EventKlassId ht_registry_register_event_klass ( HT_EventKlass event_klass)

Registers new event klass in the system, or gets identifier if klass is already registered.

Parameters
event_klassa pointer to a klass definition.
Returns
an identifier to a klass, or HT_INVALID_KLASS_ID if registration failed.

◆ ht_registry_register_feature()

HT_DECLS_BEGIN HT_API HT_ErrorCode ht_registry_register_feature ( HT_FeatureKlass klass)

Registers new a new feature in the system.

Parameters
klassa pointer to a feature class to be registered.

Usually there's no need for calling the method explicitly. HT_DEFINE_FEATURE() macro generates a convinient function for registering the feature that encapsulates call of this function.

Returns
HT_ERR_OK if registration completed successfully; otherwise, error code.