UpdateSeq

from panda3d.core import UpdateSeq
class UpdateSeq

Bases:

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.

Inheritance diagram

Inheritance diagram of UpdateSeq

__eq__(other: UpdateSeq) bool
__ge__(other: UpdateSeq) bool
__gt__(other: UpdateSeq) bool
__init__()

Creates an UpdateSeq in the ‘initial’ state.

__init__(copy: UpdateSeq)
__le__(other: UpdateSeq) bool
__lt__(other: UpdateSeq) bool
__ne__(other: UpdateSeq) bool
assign(copy: UpdateSeq) UpdateSeq
clear()

Resets the UpdateSeq to the ‘initial’ state.

static fresh() UpdateSeq
get_seq() int

Returns the internal integer value associated with the UpdateSeq. Useful for debugging only.

increment(param0: int) UpdateSeq
increment(param0: int) UpdateSeq
static initial() UpdateSeq
is_fresh() bool

Returns true if the UpdateSeq is in the ‘fresh’ state.

is_initial() bool

Returns true if the UpdateSeq is in the ‘initial’ state.

is_old() bool

Returns true if the UpdateSeq is in the ‘old’ state.

is_special() bool

Returns true if the UpdateSeq is in any special states, i.e. ‘initial’, ‘old’, or ‘fresh’.

static old() UpdateSeq
output(out: ostream)
property seq int

Returns the internal integer value associated with the UpdateSeq. Useful for debugging only.