Panda3D
|
This is a sequence number that increments monotonically. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ () | |
Creates an UpdateSeq in the 'initial' state. More... | |
__init__ (const UpdateSeq copy) | |
clear () | |
Resets the UpdateSeq to the 'initial' state. More... | |
AtomicAdjust::Integer | getSeq () |
Returns the internal integer value associated with the UpdateSeq. More... | |
bool | isFresh () |
Returns true if the UpdateSeq is in the 'fresh' state. More... | |
bool | isInitial () |
Returns true if the UpdateSeq is in the 'initial' state. More... | |
bool | isOld () |
Returns true if the UpdateSeq is in the 'old' state. More... | |
bool | isSpecial () |
Returns true if the UpdateSeq is in any special states, i.e. More... | |
bool | operator!= (const UpdateSeq other) |
UpdateSeq | operator++ () |
UpdateSeq | operator++ (int) |
bool | operator< (const UpdateSeq other) |
bool | operator<= (const UpdateSeq other) |
UpdateSeq | operator= (const UpdateSeq copy) |
bool | operator== (const UpdateSeq other) |
bool | operator> (const UpdateSeq other) |
bool | operator>= (const UpdateSeq other) |
output (Ostream out) | |
Static Public Member Functions | |
static UpdateSeq | fresh () |
static UpdateSeq | initial () |
static UpdateSeq | old () |
Public Attributes | |
AtomicAdjust::Integer | seq |
Returns the internal integer value associated with the UpdateSeq. More... | |
This is a sequence number that increments monotonically.
It can be used to track cache updates, or serve as a kind of timestamp for any changing properties.
A special class is used instead of simply an int, so we can elegantly handle such things as wraparound and special cases. There are two special cases. Firstly, a sequence number is 'initial' when it is first created. This sequence is older than any other sequence number. Secondly, a sequence number may be explicitly set to 'old'. This is older than any other sequence number except 'initial'. Finally, we have the explicit number 'fresh', which is newer than any other sequence number. All other sequences are numeric and are monotonically increasing.
__init__ | ( | ) |
Creates an UpdateSeq in the 'initial' state.
__init__ | ( | const UpdateSeq | copy | ) |
clear | ( | ) |
Resets the UpdateSeq to the 'initial' state.
|
static |
AtomicAdjust::Integer getSeq | ( | ) |
Returns the internal integer value associated with the UpdateSeq.
Useful for debugging only.
|
static |
bool isFresh | ( | ) |
Returns true if the UpdateSeq is in the 'fresh' state.
bool isInitial | ( | ) |
Returns true if the UpdateSeq is in the 'initial' state.
bool isOld | ( | ) |
Returns true if the UpdateSeq is in the 'old' state.
bool isSpecial | ( | ) |
Returns true if the UpdateSeq is in any special states, i.e.
'initial', 'old', or 'fresh'.
|
static |
bool operator!= | ( | const UpdateSeq | other | ) |
UpdateSeq operator++ | ( | ) |
UpdateSeq operator++ | ( | int | ) |
bool operator< | ( | const UpdateSeq | other | ) |
bool operator<= | ( | const UpdateSeq | other | ) |
bool operator== | ( | const UpdateSeq | other | ) |
bool operator> | ( | const UpdateSeq | other | ) |
bool operator>= | ( | const UpdateSeq | other | ) |
output | ( | Ostream | out | ) |
AtomicAdjust::Integer seq |
Returns the internal integer value associated with the UpdateSeq.
Useful for debugging only.