Public Member Functions | Private Attributes | List of all members
RefCountedContext Class Reference

Helper class to support reference counting. More...

#include <context.h>

Inheritance diagram for RefCountedContext:
AllMembersListContext ArgumentContext ArgumentListContext ClassContext ClassHierarchyContext ClassIndexContext ClassInheritanceContext ClassInheritanceNodeContext ClassListContext ClassMembersIndexContext ClassTreeContext ConfigContext DirContext DirListContext DoxygenContext ExampleListContext ExampleTreeContext FileContext FileListContext FileTreeContext GlobalsIndexContext IncludeInfoContext IncludeInfoListContext InheritanceGraphContext InheritanceListContext InheritanceNodeContext InheritedMemberInfoContext InheritedMemberInfoListContext MemberContext MemberGroupInfoContext MemberGroupListContext MemberInfoContext MemberListContext MemberListInfoContext ModuleContext ModuleListContext ModuleNodeContext ModuleTreeContext NamespaceContext NamespaceListContext NamespaceMembersIndexContext NamespaceTreeContext NavPathElemContext NestingContext NestingNodeContext PageContext PageListContext PageTreeContext SearchIndexContext SearchIndicesContext SymbolContext SymbolGroupContext SymbolGroupListContext SymbolIndexContext SymbolIndicesContext SymbolListContext TranslateContext UsedFilesContext

Public Member Functions

 RefCountedContext (const char *)
 
virtual ~RefCountedContext ()
 
int addRef ()
 
int release ()
 

Private Attributes

int m_refCount
 

Detailed Description

Helper class to support reference counting.

Definition at line 106 of file context.h.

Constructor & Destructor Documentation

RefCountedContext::RefCountedContext ( const char *  )
inline

Definition at line 109 of file context.h.

109 : m_refCount(0) {}
virtual RefCountedContext::~RefCountedContext ( )
inlinevirtual

Definition at line 110 of file context.h.

110 {}

Member Function Documentation

int RefCountedContext::addRef ( )
inline

Definition at line 111 of file context.h.

111 { return ++m_refCount; }
int RefCountedContext::release ( )
inline

Definition at line 112 of file context.h.

113  {
114  int count = --m_refCount;
115  if (count<=0)
116  {
117  delete this;
118  }
119  return count;
120  }

Member Data Documentation

int RefCountedContext::m_refCount
private

Definition at line 122 of file context.h.


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