class
cIDGenerator
Public static functions
- static auto Get() -> cIDGenerator*
Constructors, destructors, conversion operators
- ~cIDGenerator() virtual
Public functions
-
auto Generate(ResourceKey& dst,
uint32_
t typeID, uint8_ t poolID, uint8_ t highBits, uint8_ t lowBits8, uint8_ t lowBits0) -> void virtual - Generates a ResourceKey that uses the given type ID, autogenerating an instance ID that does not conflict with any existing file.
-
auto GenerateForGroup(ResourceKey& dst,
uint32_
t typeID, uint32_ t groupID) -> void virtual - Generates a ResourceKey that uses the given type and group IDs, autogenerating an instance ID that does not conflict with any existing file.
Public variables
Function documentation
void App:: cIDGenerator:: Generate(ResourceKey& dst,
uint32_ t typeID,
uint8_ t poolID,
uint8_ t highBits,
uint8_ t lowBits8,
uint8_ t lowBits0) virtual
Generates a ResourceKey that uses the given type ID, autogenerating an instance ID that does not conflict with any existing file.
Parameters | |
---|---|
dst | |
typeID | |
poolID | |
highBits | |
lowBits8 | |
lowBits0 |
The group ID is calculated from all the other parameters like this: highBits|0x40 poolID lowBits8 lowBits0
, from highest to lowest bits. poolID
determines the "generation pool" where instance IDs are generated (there is one for creatures, one for planets, etc).
void App:: cIDGenerator:: GenerateForGroup(ResourceKey& dst,
uint32_ t typeID,
uint32_ t groupID) virtual
Generates a ResourceKey that uses the given type and group IDs, autogenerating an instance ID that does not conflict with any existing file.
Parameters | |
---|---|
dst | |
typeID | |
groupID |
The group ID masked with 0x00ff0000
determines the "generation pool" where instance IDs are generated (there is one for creatures, one for planets, etc).