My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
TemplateStruct Class Reference

Default implementation of a context value of type struct. More...

#include <template.h>

Inheritance diagram for TemplateStruct:
TemplateStructIntf

Classes

class  Private
 Private data of a template struct object. More...
 

Public Member Functions

virtual TemplateVariant get (const char *name) const
 
virtual int addRef ()
 
virtual int release ()
 
virtual void set (const char *name, const TemplateVariant &v)
 
- Public Member Functions inherited from TemplateStructIntf
virtual ~TemplateStructIntf ()
 

Static Public Member Functions

static TemplateStructalloc ()
 

Private Member Functions

 TemplateStruct ()
 
virtual ~TemplateStruct ()
 

Private Attributes

Privatep
 

Detailed Description

Default implementation of a context value of type struct.

Definition at line 426 of file template.h.

Constructor & Destructor Documentation

TemplateStruct::TemplateStruct ( )
private

Creates a struct

Definition at line 251 of file template.cpp.

References p, and Private.

Referenced by alloc().

{
p = new Private;
}
TemplateStruct::~TemplateStruct ( )
privatevirtual

Destroys the struct

Definition at line 256 of file template.cpp.

References p.

{
delete p;
}

Member Function Documentation

int TemplateStruct::addRef ( )
virtual

Increase object's reference count

Implements TemplateStructIntf.

Definition at line 261 of file template.cpp.

References p, and TemplateStruct::Private::refCount.

{
return ++p->refCount;
}
TemplateStruct * TemplateStruct::alloc ( )
static
TemplateVariant TemplateStruct::get ( const char *  name) const
virtual

Gets the value for a field name.

Parameters
[in]nameThe name of the field.

Implements TemplateStructIntf.

Definition at line 289 of file template.cpp.

References TemplateStruct::Private::fields, and p.

{
return v ? *v : TemplateVariant();
}
int TemplateStruct::release ( )
virtual

Decreases object's referenc count, destroy object if 0

Implements TemplateStructIntf.

Definition at line 266 of file template.cpp.

References p, and TemplateStruct::Private::refCount.

{
int count = --p->refCount;
if (count<=0)
{
delete this;
}
return count;
}
void TemplateStruct::set ( const char *  name,
const TemplateVariant v 
)
virtual

Member Data Documentation

Private* TemplateStruct::p
private

Definition at line 450 of file template.h.

Referenced by addRef(), get(), release(), set(), TemplateStruct(), and ~TemplateStruct().


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