HawkTracer  0.9.0
event_id_provider.h File Reference

Go to the source code of this file.

Typedefs

typedef typedefHT_DECLS_BEGIN struct _HT_EventIdProvider HT_EventIdProvider
 HT_EventIdProvider is a sequence number generator. More...
 

Functions

HT_API HT_EventIdProviderht_event_id_provider_get_default (void)
 Gets default provider. More...
 
HT_API HT_EventIdProviderht_event_id_provider_create (void)
 Creates a new instance of an ID provider. More...
 
HT_API void ht_event_id_provider_destroy (HT_EventIdProvider *provider)
 Destroys a provider. More...
 
HT_API HT_EventId ht_event_id_provider_next (HT_EventIdProvider *provider)
 Gets next identifier. More...
 

Typedef Documentation

◆ HT_EventIdProvider

typedef typedefHT_DECLS_BEGIN struct _HT_EventIdProvider HT_EventIdProvider

HT_EventIdProvider is a sequence number generator.

It starts the sequence from 0. Every next call of ht_event_id_provider_next() increments the identifier.

Function Documentation

◆ ht_event_id_provider_create()

HT_API HT_EventIdProvider* ht_event_id_provider_create ( void  )

Creates a new instance of an ID provider.

Returns
a pointer to the new ID provider.

◆ ht_event_id_provider_destroy()

HT_API void ht_event_id_provider_destroy ( HT_EventIdProvider provider)

Destroys a provider.

Parameters
providera provider to destroy.

◆ ht_event_id_provider_get_default()

HT_API HT_EventIdProvider* ht_event_id_provider_get_default ( void  )

Gets default provider.

Default ID provider is currently used for all the timelines.

Returns
a pointer to the default ID provider.

◆ ht_event_id_provider_next()

HT_API HT_EventId ht_event_id_provider_next ( HT_EventIdProvider provider)

Gets next identifier.

Parameters
providera provider.
Returns
next identifier from the provider.