27 #ifndef CPPFONTCONFIG_REFPTR_H_
28 #define CPPFONTCONFIG_REFPTR_H_
34 namespace fontconfig {
45 template<
class Traits >
163 operator bool()
const
169 template <
typename T2>
RefPtr< Traits > & operator=(const RefPtr< Traits > &other)
assignment operator, decreases reference count of current object, increases reference count of copied...
Traits::Delegate Delegate
LValuePair< RefPtr< Traits >, T2 > operator,(T2 &other)
can be paired with other objects for multiple (tuple) returns
RefPtr(const RefPtr< Traits > &other)
copy construct a pointer, increasing the reference count
void dereference()
decrease reference count by one, see specializations
acts like a c-pointer by overloading the ->() operator, but is not copyable and doesn't allow the unde...
const Delegate operator->() const
returns a delegate object which exposes member functions of the underlying object ...
Delegate operator->()
returns a delegate object which exposes member functions of the underlying object ...
void reference()
increase reference count by one, see specializations
CPtr< Traits > operator*()
returns a delegate object which acts exactly like a c-pointer but cannot be copied and so reference c...
const cobjptr subvert() const
return the stored pointer, subverting reference safety, see specializations if Storage is not the sam...
~RefPtr()
when the RefPtr is destroyed the reference count of the pointed-to object is decreased ...
cobjptr subvert()
return the stored pointer, subverting reference safety, see specializations if Storage is not the sam...
allows an error to be returned with a result in a single expression
RefPtr(cobjptr ptr=0, bool doRef=false)
create a RefPtr from the specified cobj
BinaryKey other(const BinaryKey &key)
ConstCPtr< Traits > operator*() const
returns a delegate object which acts exactly like a c-pointer but cannot be copied and so reference c...
RefPtr< Traits > & operator=(cobjptr ptr)
assignment operator, decreases reference count of current object, increases reference count of copied...
holds a set of names with associated value lists;
acts like a const c-pointer by overloading the ->() operator, but is not copyable and doesn't allow th...
object which acts like a c-pointer, but when dereferenced returns a delegate object which adds method...
void unlink()
dereference the stored object and turn this into a null pointer