37 #ifndef DOXYGEN_SHOULD_SKIP_THIS 39 template <
typename Val >
42 template <
typename Val >
57 template <
typename Val >
58 void swap(RefPtr< Val >& ptr1, RefPtr< Val >& ptr2);
113 template <
typename Val >
147 explicit RefPtr(Val* val = 0);
153 RefPtr(
const RefPtr< Val >& from);
160 template <
typename DownVal >
181 operator bool()
const;
219 RefPtr< Val >&
operator=(
const RefPtr< Val >& from);
252 template <
typename DownVal >
271 bool operator==(
const RefPtr< Val >& from)
const;
284 bool operator!=(
const RefPtr< Val >& from)
const;
327 template <
typename T >
331 template <
typename T >
350 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 351 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 352 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 357 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 358 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 359 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 365 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 366 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 367 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS RefPtr< Val > & operator=(const RefPtr< Val > &from)
Copy operator.
friend class RefPtr
A friend to allow downcastings.
~RefPtr()
Class destructor.
unsigned int * __refCountPtr() const
A function to return the refcount pointer.
Val * operator->() const
Dereferencing operator.
void __destroy(unsigned int *, Val *)
A function to remove the content of the smart pointer, if any.
Class template representing hashing function of LpCol.
gum is the global namespace for all aGrUM entities
Smart pointersaGrUM's smart pointers keep track of the number of times the value they point to is ref...
Val * __val
The dumb pointer encapsulated into the "smart" pointer.
bool operator!=(const RefPtr< Val > &from) const
Checks whether two RefPtr<Val> are smart pointers for different elements.
Implementation of aGrUM's "smart" pointers.
bool operator==(const RefPtr< Val > &from) const
Checks whether two RefPtr<Val> are smart pointers for the same element.
void clear()
Makes the smart pointer point to 0.
Val & operator*()
Dereferencing operator.
void swap(RefPtr< Val > &ptr1, RefPtr< Val > &ptr2)
Swap the contents of two RefPtr.
unsigned int refCount() const
Returns the number of smart pointer referencing the contained pointer.
unsigned int * __refcount
A reference counter on *val.