59#ifndef DOXYGEN_SHOULD_SKIP_THIS
61 template <
typename Val >
64 template <
typename Val >
79 template <
typename Val >
135 template <
typename Val >
169 explicit RefPtr(Val* val = 0);
182 template <
typename DownVal >
203 operator bool()
const;
274 template <
typename DownVal >
350 template <
typename T >
354 template <
typename T >
373#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
374# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
375# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
380#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
381# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
382# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
388#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
389# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
390# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
This class should be useless as only its specializations should be used.
friend class RefPtr
A friend to allow downcastings.
~RefPtr()
Class destructor.
friend class HashFunc
A friend for hashing quickly ref pointers.
unsigned int * _refcount_
A reference counter on *val.
bool operator==(const RefPtr< Val > &from) const
Checks whether two RefPtr<Val> are smart pointers for the same element.
friend void swap(RefPtr< Val > &, RefPtr< Val > &)
The swap function must access to gum::RefPtr private parts.
unsigned int refCount() const
Returns the number of smart pointer referencing the contained pointer.
void _destroy_(unsigned int *, Val *)
A function to remove the content of the smart pointer, if any.
RefPtr(const RefPtr< DownVal > &from)
Copy constructor for downcastable pointers.
Val * operator->() const
Dereferencing operator.
unsigned int * _refCountPtr_() const
A function to return the refcount pointer.
Val * _val_
The dumb pointer encapsulated into the "smart" pointer.
RefPtr< Val > & operator=(const RefPtr< Val > &from)
Copy operator.
RefPtr< Val > & operator=(const RefPtr< DownVal > &from)
Copy operator for downcastable pointers.
void clear()
Makes the smart pointer point to 0.
Val & operator*()
Dereferencing operator.
bool operator!=(const RefPtr< Val > &from) const
Checks whether two RefPtr<Val> are smart pointers for different elements.
void swap(RefPtr< Val > &ptr1, RefPtr< Val > &ptr2)
Swap the contents of two RefPtr.
gum is the global namespace for all aGrUM entities
Implementation of aGrUM's "smart" pointers.