Drag[en]gine Script Module DragonScript
1.21
|
Mutable unique ID. More...
Public Member Functions | |
Constructors | |
MutableID | new () |
Create mutuable unique id with initial value 0. More... | |
MutableID | new (int value) |
Create mutuable unique id with initial value. More... | |
MutableID | new (UniqueID id) |
Create mutuable unique id from unique id. More... | |
MutableID | new (MutableID id) |
Create copy of mutuable unique id. More... | |
Management | |
int | getBitCount () |
Bit count. More... | |
void | setBitCount (int bitCount) |
Set bit count. More... | |
int | getByteAt (int position) |
Byte at position in LSB. More... | |
void | setByteAt (int position, int value) |
Set byte at position in LSB. More... | |
void | increment () |
Increment id by 1. More... | |
void | incrementBy (int amount) |
Increment id by amount. More... | |
void | incrementBy (UniqueID amount) |
Increment id by UniqueID. More... | |
void | incrementBy (MutableID amount) |
Increment id by MutableID. More... | |
void | decrement () |
Decrement id by 1. More... | |
void | decrementBy (int amount) |
Decrement id by amount. More... | |
void | decrementBy (UniqueID amount) |
Decrement id by UniqueID. More... | |
void | decrementBy (MutableID amount) |
Decrement id by MutableID. More... | |
void | reset () |
Reset id to 0 with a bit count of 8. More... | |
void | setFrom (UniqueID id) |
Copy value of a unique ID. More... | |
void | setFromMutable (MutableID id) |
Copy value of another mutable ID. More... | |
UniqueID | toUniqueID () |
Create unique id from id. More... | |
UniqueID | nextID () |
Create unique id from id then increment. More... | |
String | toHexString () |
Hex string representation. More... | |
void | setFromHexString (String string) |
Set from hex string. More... | |
String | toString () |
String representation of mutable id. More... | |
bool | equals (Object other) |
Mutable ID is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
File Handling | |
void | readFromFile (FileReader reader) |
Read from file reader. More... | |
void | writeToFile (FileWriter writer) |
Write to file writer. More... | |
Operators | |
bool | operator< (MutableID id) |
ID is less than another ID. More... | |
bool | operator<= (MutableID id) |
ID is less than or equal to another ID. More... | |
bool | operator> (MutableID id) |
ID is greater than another ID. More... | |
bool | operator>= (MutableID id) |
ID is greater than or equal to another ID. More... | |
Mutable unique ID.
This is a native class.
void Dragengine.MutableID.decrement | ( | ) |
Decrement id by 1.
void Dragengine.MutableID.decrementBy | ( | int | amount | ) |
Decrement id by amount.
bool Dragengine.MutableID.equals | ( | Object | other | ) |
Mutable ID is equal to another object.
Implements Object.equals(Object).
int Dragengine.MutableID.getBitCount | ( | ) |
Bit count.
int Dragengine.MutableID.getByteAt | ( | int | position | ) |
Byte at position in LSB.
EOutOfBoundary | position is less than 0 or larger than or equal to getBitCount(). |
int Dragengine.MutableID.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
void Dragengine.MutableID.increment | ( | ) |
Increment id by 1.
Increases the bit count by 8 if the new value does not fit anymore.
void Dragengine.MutableID.incrementBy | ( | int | amount | ) |
Increment id by amount.
Increases the bit count by multiples of 8 if the new value does not fit anymore.
void Dragengine.MutableID.incrementBy | ( | MutableID | amount | ) |
Increment id by MutableID.
Increases the bit count by multiples of 8 if the new value does not fit anymore.
void Dragengine.MutableID.incrementBy | ( | UniqueID | amount | ) |
Increment id by UniqueID.
Increases the bit count by multiples of 8 if the new value does not fit anymore.
MutableID Dragengine.MutableID.new | ( | ) |
Create mutuable unique id with initial value 0.
MutableID Dragengine.MutableID.new | ( | int | value | ) |
Create mutuable unique id with initial value.
UniqueID Dragengine.MutableID.nextID | ( | ) |
Create unique id from id then increment.
Convenience call equal to calling toUniqueID() then increment().
bool Dragengine.MutableID.operator< | ( | MutableID | id | ) |
ID is less than another ID.
bool Dragengine.MutableID.operator<= | ( | MutableID | id | ) |
ID is less than or equal to another ID.
bool Dragengine.MutableID.operator> | ( | MutableID | id | ) |
ID is greater than another ID.
bool Dragengine.MutableID.operator>= | ( | MutableID | id | ) |
ID is greater than or equal to another ID.
void Dragengine.MutableID.readFromFile | ( | FileReader | reader | ) |
Read from file reader.
void Dragengine.MutableID.reset | ( | ) |
Reset id to 0 with a bit count of 8.
void Dragengine.MutableID.setBitCount | ( | int | bitCount | ) |
Set bit count.
The id is reset to 0 no matter if the bit count changed or not.
void Dragengine.MutableID.setByteAt | ( | int | position, |
int | value | ||
) |
Set byte at position in LSB.
EOutOfBoundary | position is less than 0 or larger than or equal to getBitCount(). |
void Dragengine.MutableID.setFrom | ( | UniqueID | id | ) |
Copy value of a unique ID.
void Dragengine.MutableID.setFromHexString | ( | String | string | ) |
Set from hex string.
void Dragengine.MutableID.setFromMutable | ( | MutableID | id | ) |
Copy value of another mutable ID.
String Dragengine.MutableID.toHexString | ( | ) |
Hex string representation.
String Dragengine.MutableID.toString | ( | ) |
String representation of mutable id.
UniqueID Dragengine.MutableID.toUniqueID | ( | ) |
Create unique id from id.
void Dragengine.MutableID.writeToFile | ( | FileWriter | writer | ) |
Write to file writer.