My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SharedPtr< T > Class Template Reference

Reference counting smart pointer. More...

Public Types

typedef T Type
 

Public Member Functions

 SharedPtr (T *p=0)
 
 ~SharedPtr ()
 
T & operator* () const
 
T * operator-> () const
 
T * get () const
 
 operator bool () const
 
void reset (T *p=0)
 

Private Member Functions

 SharedPtr (const SharedPtr &)
 
SharedPtroperator= (const SharedPtr &p)
 
void operator== (const SharedPtr &) const
 
void operator!= (const SharedPtr &) const
 

Private Attributes

T * m_ptr
 

Detailed Description

template<class T>
class SharedPtr< T >

Reference counting smart pointer.

Definition at line 96 of file context.cpp.

Member Typedef Documentation

template<class T>
typedef T SharedPtr< T >::Type

Definition at line 106 of file context.cpp.

Constructor & Destructor Documentation

template<class T>
SharedPtr< T >::SharedPtr ( const SharedPtr< T > &  )
private
template<class T>
SharedPtr< T >::SharedPtr ( T *  p = 0)
inlineexplicit

Definition at line 107 of file context.cpp.

: m_ptr(p) { if (m_ptr) m_ptr->addRef(); }
template<class T>
SharedPtr< T >::~SharedPtr ( )
inline

Definition at line 108 of file context.cpp.

{ if (m_ptr) m_ptr->release(); };

Member Function Documentation

template<class T>
T* SharedPtr< T >::get ( ) const
inline

Definition at line 111 of file context.cpp.

Referenced by ClassContext::Private::additionalInheritedMembers(), ClassContext::Private::allMembersList(), MemberContext::Private::anonymousMember(), MemberContext::Private::anonymousType(), DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), MemberContext::Private::category(), ClassContext::Private::categoryOf(), MemberContext::Private::categoryRelation(), NestingNodeContext::Private::children(), ClassContext::Private::classes(), NamespaceContext::Private::classes(), FileContext::Private::classes(), ModuleContext::Private::classes(), NamespaceContext::Private::constantgroups(), FileContext::Private::constantgroups(), ModuleContext::Private::constantgroups(), ClassHierarchyContext::Private::diagrams(), DirContext::Private::dirs(), ModuleContext::Private::dirs(), MemberContext::Private::enumValues(), MemberContext::Private::eventAttrs(), ClassContext::Private::examples(), MemberContext::Private::examples(), ModuleContext::Private::examples(), IncludeInfoContext::Private::file(), DirContext::Private::files(), ModuleContext::Private::files(), generateOutputViaTemplate(), MemberContext::Private::getClass(), NestingNodeContext::Private::getClass(), InheritanceNodeContext::Private::getClass(), InheritedMemberInfoContext::Private::getClass(), NestingNodeContext::Private::getDir(), MemberContext::Private::getFile(), NestingNodeContext::Private::getFile(), ClassContext::Private::getMemberList(), NamespaceContext::Private::getMemberList(), FileContext::Private::getMemberList(), ModuleContext::Private::getMemberList(), GlobalsIndexContext::Private::getMembersFiltered(), ClassMembersIndexContext::Private::getMembersFiltered(), NamespaceMembersIndexContext::Private::getMembersFiltered(), NestingNodeContext::Private::getModule(), MemberContext::Private::getNamespace(), NestingNodeContext::Private::getNamespace(), NestingNodeContext::Private::getPage(), MemberContext::Private::implementedBy(), MemberContext::Private::implements(), ClassContext::Private::includeInfo(), FileContext::Private::includeList(), MemberListInfoContext::Private::inherited(), ClassContext::Private::inheritedBy(), InheritedMemberInfoContext::Private::inheritedFrom(), ClassContext::Private::inherits(), NamespaceContext::Private::inlineClasses(), FileContext::Private::inlineClasses(), ModuleContext::Private::inlineClasses(), ClassContext::Private::innerClasses(), MemberContext::Private::labels(), ClassIndexContext::Private::list(), ClassHierarchyContext::Private::maxDepth(), ClassTreeContext::Private::maxDepth(), NamespaceTreeContext::Private::maxDepth(), FileTreeContext::Private::maxDepth(), PageTreeContext::Private::maxDepth(), ModuleTreeContext::Private::maxDepth(), ExampleTreeContext::Private::maxDepth(), MemberInfoContext::Private::member(), ClassContext::Private::memberGroups(), NamespaceContext::Private::memberGroups(), FileContext::Private::memberGroups(), ModuleContext::Private::memberGroups(), MemberGroupInfoContext::Private::memberGroups(), MemberListInfoContext::Private::memberGroups(), ClassContext::Private::members(), MemberGroupInfoContext::Private::members(), MemberListInfoContext::Private::members(), InheritedMemberInfoContext::Private::members(), ModuleContext::Private::modules(), NamespaceContext::Private::namespaces(), FileContext::Private::namespaces(), ModuleContext::Private::namespaces(), ModuleContext::Private::pages(), MemberContext::Private::parameters(), ClassHierarchyContext::Private::preferredDepth(), ClassTreeContext::Private::preferredDepth(), NamespaceTreeContext::Private::preferredDepth(), FileTreeContext::Private::preferredDepth(), PageTreeContext::Private::preferredDepth(), ModuleTreeContext::Private::preferredDepth(), ExampleTreeContext::Private::preferredDepth(), MemberContext::Private::propertyAttrs(), MemberContext::Private::reimplementedBy(), MemberContext::Private::reimplements(), MemberContext::Private::sourceRefBys(), MemberContext::Private::sourceRefs(), SymbolIndexContext::Private::symbolGroups(), SearchIndexContext::Private::symbolIndices(), SymbolGroupContext::Private::symbolList(), MemberContext::Private::templateArgs(), ClassContext::Private::templateDecls(), MemberContext::Private::templateDecls(), ClassHierarchyContext::Private::tree(), ClassTreeContext::Private::tree(), NamespaceTreeContext::Private::tree(), FileTreeContext::Private::tree(), PageTreeContext::Private::tree(), ModuleTreeContext::Private::tree(), ExampleTreeContext::Private::tree(), ClassContext::Private::typeConstraints(), MemberContext::Private::typeConstraints(), and ClassContext::Private::usedFiles().

{ return m_ptr; }
template<class T>
SharedPtr< T >::operator bool ( ) const
inline

Definition at line 112 of file context.cpp.

{ return m_ptr!=0; }
template<class T>
void SharedPtr< T >::operator!= ( const SharedPtr< T > &  ) const
private
template<class T>
T& SharedPtr< T >::operator* ( ) const
inline

Definition at line 109 of file context.cpp.

{ return *m_ptr; }
template<class T>
T* SharedPtr< T >::operator-> ( ) const
inline

Definition at line 110 of file context.cpp.

{ return m_ptr; }
template<class T>
SharedPtr& SharedPtr< T >::operator= ( const SharedPtr< T > &  p)
private
template<class T>
void SharedPtr< T >::operator== ( const SharedPtr< T > &  ) const
private
template<class T>
void SharedPtr< T >::reset ( T *  p = 0)
inline

Definition at line 113 of file context.cpp.

Referenced by ClassContext::Private::additionalInheritedMembers(), ClassContext::Private::allMembersList(), MemberContext::Private::anonymousMember(), MemberContext::Private::anonymousType(), DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), MemberContext::Private::category(), ClassContext::Private::categoryOf(), MemberContext::Private::categoryRelation(), ClassContext::Private::classes(), NamespaceContext::Private::classes(), FileContext::Private::classes(), ModuleContext::Private::classes(), NamespaceContext::Private::constantgroups(), FileContext::Private::constantgroups(), ModuleContext::Private::constantgroups(), ClassHierarchyContext::Private::diagrams(), DirContext::Private::dirs(), ModuleContext::Private::dirs(), MemberContext::Private::enumValues(), ClassContext::Private::examples(), MemberContext::Private::examples(), ModuleContext::Private::examples(), IncludeInfoContext::Private::file(), DirContext::Private::files(), ModuleContext::Private::files(), MemberContext::Private::getClass(), NestingNodeContext::Private::getClass(), InheritanceNodeContext::Private::getClass(), InheritedMemberInfoContext::Private::getClass(), NestingNodeContext::Private::getDir(), MemberContext::Private::getFile(), NestingNodeContext::Private::getFile(), ClassContext::Private::getMemberList(), NamespaceContext::Private::getMemberList(), FileContext::Private::getMemberList(), ModuleContext::Private::getMemberList(), GlobalsIndexContext::Private::getMembersFiltered(), ClassMembersIndexContext::Private::getMembersFiltered(), NamespaceMembersIndexContext::Private::getMembersFiltered(), NestingNodeContext::Private::getModule(), MemberContext::Private::getNamespace(), NestingNodeContext::Private::getNamespace(), NestingNodeContext::Private::getPage(), MemberContext::Private::implementedBy(), MemberContext::Private::implements(), ClassContext::Private::includeInfo(), FileContext::Private::includeList(), MemberListInfoContext::Private::inherited(), ClassContext::Private::inheritedBy(), InheritedMemberInfoContext::Private::inheritedFrom(), ClassContext::Private::inherits(), NamespaceContext::Private::inlineClasses(), FileContext::Private::inlineClasses(), ModuleContext::Private::inlineClasses(), ClassContext::Private::innerClasses(), MemberContext::Private::labels(), ClassIndexContext::Private::list(), MemberInfoContext::Private::member(), ClassContext::Private::memberGroups(), NamespaceContext::Private::memberGroups(), FileContext::Private::memberGroups(), ModuleContext::Private::memberGroups(), MemberGroupInfoContext::Private::memberGroups(), MemberListInfoContext::Private::memberGroups(), ClassContext::Private::members(), MemberGroupInfoContext::Private::members(), MemberListInfoContext::Private::members(), InheritedMemberInfoContext::Private::members(), ModuleContext::Private::modules(), NamespaceContext::Private::namespaces(), FileContext::Private::namespaces(), ModuleContext::Private::namespaces(), ModuleContext::Private::pages(), MemberContext::Private::parameters(), MemberContext::Private::Private(), ClassHierarchyContext::Private::Private(), NestingNodeContext::Private::Private(), ClassTreeContext::Private::Private(), NamespaceTreeContext::Private::Private(), FileTreeContext::Private::Private(), PageTreeContext::Private::Private(), ModuleTreeContext::Private::Private(), ExampleTreeContext::Private::Private(), MemberContext::Private::reimplementedBy(), MemberContext::Private::reimplements(), MemberContext::Private::sourceRefBys(), MemberContext::Private::sourceRefs(), SymbolIndexContext::Private::symbolGroups(), SearchIndexContext::Private::symbolIndices(), SymbolGroupContext::Private::symbolList(), MemberContext::Private::templateArgs(), ClassContext::Private::templateDecls(), MemberContext::Private::templateDecls(), ClassContext::Private::typeConstraints(), MemberContext::Private::typeConstraints(), and ClassContext::Private::usedFiles().

{
if (p) p->addRef();
if (m_ptr) m_ptr->release();
m_ptr = p;
}

Member Data Documentation

template<class T>
T* SharedPtr< T >::m_ptr
private

The documentation for this class was generated from the following file: