EtcPal  0.4.1
ETC Platform Abstraction Layer (EtcPal)
View other versions:
IntHandleManager Struct Reference

Overview

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.
 

Field Documentation

◆ check_value_in_use

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.

◆ max_value

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.

◆ 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.


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