21 #include "SheafSystem/rc_any.h" 23 #include "SheafSystem/assert_contract.h" 109 ensure(ref_ct() > 0);
142 bool result = _ref_ct > 1;
182 xos <<
"rc_any: " << endl;
183 xos <<
" ref_ct = " << xrc.
ref_ct() << endl;
184 xos <<
" shared = " << xrc.
is_shared() << endl;
size_type ref_ct() const
Return the reference count.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
void add_reference()
Increment the reference count.
rc_any()
Default constructor.
Base class for reference counting.
bool is_shared() const
True if the reference count is greater than one.
rc_any & operator=(const rc_any &xother)
Assignment operator.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
void remove_reference()
Decrement the reference count. Delete this object if the reference count is zero. ...