15 #ifndef COPYONWRITEPOINTER_H
16 #define COPYONWRITEPOINTER_H
18 #include "pandabase.h"
20 #include "copyOnWriteObject.h"
21 #include "pointerTo.h"
38 INLINE CopyOnWritePointer(
const CopyOnWritePointer ©);
39 INLINE
void operator = (
const CopyOnWritePointer ©);
41 INLINE ~CopyOnWritePointer();
43 #ifdef USE_MOVE_SEMANTICS
44 INLINE CopyOnWritePointer(CopyOnWritePointer &&move) NOEXCEPT;
45 INLINE
void operator = (CopyOnWritePointer &&move) NOEXCEPT;
48 INLINE
bool operator == (
const CopyOnWritePointer &other)
const;
49 INLINE
bool operator != (
const CopyOnWritePointer &other)
const;
50 INLINE
bool operator < (
const CopyOnWritePointer &other)
const;
58 #endif // COW_THREADED
62 INLINE
bool is_null()
const;
65 INLINE
bool test_ref_count_integrity()
const;
66 INLINE
bool test_ref_count_nonzero()
const;
89 INLINE
void operator = (To *
object);
91 #ifdef USE_MOVE_SEMANTICS
92 INLINE CopyOnWritePointerTo(CopyOnWritePointerTo &&move) NOEXCEPT;
93 INLINE
void operator = (CopyOnWritePointerTo &&move) NOEXCEPT;
102 #endif // COW_THREADED
108 #define COWPT(type) CopyOnWritePointerTo< type >
110 #include "copyOnWritePointer.I"
A template wrapper around the above class, mainly to handle the little typecasting niceties...
To * get_write_pointer()
See CopyOnWritePointer::get_write_pointer().
To * get_unsafe_pointer()
See CopyOnWritePointer::get_unsafe_pointer().
This base class provides basic reference counting, but also can be used with a CopyOnWritePointer to ...
This safely stores the primary, owned pointer to a CopyOnWriteObject.
const To * get_read_pointer() const
See CopyOnWritePointer::get_read_pointer().