37class EXPCL_PANDA_PUTIL UpdateSeq {
39 constexpr UpdateSeq(
unsigned int seq);
42 constexpr UpdateSeq();
43 constexpr static UpdateSeq initial() {
return UpdateSeq(SC_initial); }
44 constexpr static UpdateSeq old() {
return UpdateSeq(SC_old); }
45 constexpr static UpdateSeq fresh() {
return UpdateSeq(SC_fresh); }
47 INLINE UpdateSeq(
const UpdateSeq ©);
48 constexpr UpdateSeq(
const UpdateSeq &&from)
noexcept;
49 INLINE UpdateSeq &operator = (
const UpdateSeq ©);
54 INLINE
bool is_old()
const;
58 INLINE
bool operator == (
const UpdateSeq &other)
const;
59 INLINE
bool operator != (
const UpdateSeq &other)
const;
60 INLINE
bool operator < (
const UpdateSeq &other)
const;
61 INLINE
bool operator <= (
const UpdateSeq &other)
const;
62 INLINE
bool operator > (
const UpdateSeq &other)
const;
63 INLINE
bool operator >= (
const UpdateSeq &other)
const;
65 INLINE UpdateSeq operator ++ ();
66 INLINE UpdateSeq operator ++ (
int);
68 INLINE AtomicAdjust::Integer
get_seq()
const;
71 INLINE
void output(std::ostream &out)
const;
74 INLINE
static bool priv_is_special(AtomicAdjust::Integer seq);
75 INLINE
static bool priv_lt(AtomicAdjust::Integer a, AtomicAdjust::Integer b);
76 INLINE
static bool priv_le(AtomicAdjust::Integer a, AtomicAdjust::Integer b);
79 enum SpecialCases :
unsigned int {
82 SC_fresh = ~(
unsigned int)0,
85 AtomicAdjust::Integer _seq;
88INLINE std::ostream &operator << (std::ostream &out,
const UpdateSeq &value);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a sequence number that increments monotonically.
void clear()
Resets the UpdateSeq to the 'initial' state.
get_seq
Returns the internal integer value associated with the UpdateSeq.
bool is_old() const
Returns true if the UpdateSeq is in the 'old' state.
bool is_initial() const
Returns true if the UpdateSeq is in the 'initial' state.
bool is_fresh() const
Returns true if the UpdateSeq is in the 'fresh' state.
bool is_special() const
Returns true if the UpdateSeq is in any special states, i.e.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.