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

Weak reference wrapper for TemplateStructIntf that provides access to the wrapped struct without holding a reference. More...

Inheritance diagram for TemplateStructWeakRef:
TemplateStructIntf

Public Member Functions

 TemplateStructWeakRef (TemplateStructIntf *ref)
 
virtual TemplateVariant get (const char *name) const
 
virtual int addRef ()
 
virtual int release ()
 
- Public Member Functions inherited from TemplateStructIntf
virtual ~TemplateStructIntf ()
 

Private Attributes

TemplateStructIntfm_ref
 
int m_refCount
 

Detailed Description

Weak reference wrapper for TemplateStructIntf that provides access to the wrapped struct without holding a reference.

Definition at line 2285 of file template.cpp.

Constructor & Destructor Documentation

TemplateStructWeakRef::TemplateStructWeakRef ( TemplateStructIntf ref)
inline

Definition at line 2288 of file template.cpp.

2288 : m_ref(ref), m_refCount(0) {}
TemplateStructIntf * m_ref
Definition: template.cpp:2293

Member Function Documentation

virtual int TemplateStructWeakRef::addRef ( )
inlinevirtual

Increase object's reference count

Implements TemplateStructIntf.

Definition at line 2290 of file template.cpp.

2290 { return ++m_refCount; }
virtual TemplateVariant TemplateStructWeakRef::get ( const char *  name) const
inlinevirtual

Gets the value for a field name.

Parameters
[in]nameThe name of the field.

Implements TemplateStructIntf.

Definition at line 2289 of file template.cpp.

2289 { return m_ref->get(name); }
static QCString name
Definition: declinfo.cpp:673
virtual TemplateVariant get(const char *name) const =0
TemplateStructIntf * m_ref
Definition: template.cpp:2293
virtual int TemplateStructWeakRef::release ( )
inlinevirtual

Decreases object's referenc count, destroy object if 0

Implements TemplateStructIntf.

Definition at line 2291 of file template.cpp.

2291 { int count=--m_refCount; if (count<=0) { delete this; } return count; }

Member Data Documentation

TemplateStructIntf* TemplateStructWeakRef::m_ref
private

Definition at line 2293 of file template.cpp.

int TemplateStructWeakRef::m_refCount
private

Definition at line 2294 of file template.cpp.


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