EtcPal
HEAD (unstable)
ETC Platform Abstraction Layer (EtcPal)
|
View other versions:
|
State for managing generic integer handle values.
Data Fields | |
int | last_handle |
The last handle that was handed out, or -1 if none have been handed out yet. | |
int | max_value |
Determines a custom wrap-around point. More... | |
bool | check_value_in_use |
Optimize the handle generation algorithm by tracking whether the handle value has wrapped around. More... | |
HandleValueInUseFunction | value_in_use |
Function pointer to determine if a handle value is currently in use. More... | |
void * | context |
A context passed to the value in use function. | |
bool check_value_in_use |
Optimize the handle generation algorithm by tracking whether the handle value has wrapped around.
If not, this is false because there's no need to check if the new handle is in use. This becomes true when the handle value wraps around.
int max_value |
Determines a custom wrap-around point.
It will be ignored if it's negative. Otherwise it represents the highest allowed handle value.
HandleValueInUseFunction value_in_use |
Function pointer to determine if a handle value is currently in use.
Used only after the handle value has wrapped around once.