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 | Friends | List of all members
TemplateList Class Reference

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

#include <template.h>

Inheritance diagram for TemplateList:
TemplateListIntf

Classes

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

Public Member Functions

virtual int count () const
 
virtual TemplateVariant at (int index) const
 
virtual
TemplateListIntf::ConstIterator
createIterator () const
 
virtual int addRef ()
 
virtual int release ()
 
virtual void append (const TemplateVariant &v)
 
- Public Member Functions inherited from TemplateListIntf
virtual ~TemplateListIntf ()
 

Static Public Member Functions

static TemplateListalloc ()
 

Private Member Functions

 TemplateList ()
 
 ~TemplateList ()
 

Private Attributes

Privatep
 

Friends

class TemplateListConstIterator
 

Detailed Description

Default implementation of a context value of type list.

Definition at line 376 of file template.h.

Constructor & Destructor Documentation

TemplateList::TemplateList ( )
private

Creates a list

Definition at line 314 of file template.cpp.

References p, and Private.

Referenced by alloc().

{
p = new Private;
}
TemplateList::~TemplateList ( )
private

Destroys the list

Definition at line 319 of file template.cpp.

References p.

{
delete p;
}

Member Function Documentation

int TemplateList::addRef ( )
virtual

Increase object's reference count

Implements TemplateListIntf.

Definition at line 324 of file template.cpp.

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

{
return ++p->refCount;
}
TemplateList * TemplateList::alloc ( )
static

Creates an instance with ref count set to 0

Definition at line 421 of file template.cpp.

References TemplateList().

Referenced by TemplateContextImpl::addIndexEntry(), FilterList::apply(), FilterFlatten::apply(), FilterListSort::apply(), FilterGroupBy::apply(), FilterPaginate::apply(), FilterAlphaIndex::apply(), DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), 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(), ClassContext::Private::examples(), MemberContext::Private::examples(), ModuleContext::Private::examples(), ConfigContext::Private::fetchList(), DirContext::Private::files(), ModuleContext::Private::files(), GlobalsIndexContext::Private::getMembersFiltered(), ClassMembersIndexContext::Private::getMembersFiltered(), NamespaceMembersIndexContext::Private::getMembersFiltered(), getPathFunc(), MemberContext::Private::implementedBy(), MemberContext::Private::implements(), InheritedMemberInfoContext::Private::inheritedFrom(), NamespaceContext::Private::inlineClasses(), FileContext::Private::inlineClasses(), ModuleContext::Private::inlineClasses(), ClassContext::Private::innerClasses(), MemberContext::Private::labels(), ClassIndexContext::Private::list(), ModuleContext::Private::modules(), NamespaceContext::Private::namespaces(), FileContext::Private::namespaces(), ModuleContext::Private::namespaces(), DefinitionContext< FileContext::Private >::navigationPath(), TemplateContextImpl::openSubIndex(), ModuleContext::Private::pages(), MemberContext::Private::Private(), MemberContext::Private::reimplementedBy(), MemberContext::Private::reimplements(), ClassContext::Private::templateDecls(), and MemberContext::Private::templateDecls().

{
return new TemplateList;
}
void TemplateList::append ( const TemplateVariant v)
virtual

Appends element v to the end of the list

Definition at line 344 of file template.cpp.

References TemplateList::Private::elems, and p.

Referenced by ClassContext::Private::addExamples(), MemberContext::Private::addExamples(), TemplateContextImpl::addIndexEntry(), ClassContext::Private::addTemplateDecls(), MemberContext::Private::addTemplateDecls(), FilterList::apply(), FilterListSort::apply(), FilterGroupBy::apply(), FilterPaginate::apply(), FilterAlphaIndex::apply(), DefinitionContext< T >::Cachable< NamespaceContext::Private >::Cachable(), 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(), ModuleContext::Private::examples(), ConfigContext::Private::fetchList(), DirContext::Private::files(), ModuleContext::Private::files(), DefinitionContext< FileContext::Private >::fillPath(), FilterFlatten::flatten(), GlobalsIndexContext::Private::getMembersFiltered(), ClassMembersIndexContext::Private::getMembersFiltered(), NamespaceMembersIndexContext::Private::getMembersFiltered(), getPathListFunc(), MemberContext::Private::implementedBy(), MemberContext::Private::implements(), InheritedMemberInfoContext::Private::inheritedFrom(), NamespaceContext::Private::inlineClasses(), FileContext::Private::inlineClasses(), ModuleContext::Private::inlineClasses(), ClassContext::Private::innerClasses(), MemberContext::Private::labels(), ClassIndexContext::Private::list(), ModuleContext::Private::modules(), NamespaceContext::Private::namespaces(), FileContext::Private::namespaces(), ModuleContext::Private::namespaces(), ModuleContext::Private::pages(), MemberContext::Private::Private(), MemberContext::Private::reimplementedBy(), and MemberContext::Private::reimplements().

{
p->elems.append(v);
}
TemplateVariant TemplateList::at ( int  index) const
virtual

Returns the element at index position index.

Implements TemplateListIntf.

Definition at line 409 of file template.cpp.

References TemplateList::Private::elems, and p.

Referenced by TemplateContextImpl::addIndexEntry().

{
if (index>=0 && index<(int)p->elems.count())
{
return p->elems[index];
}
else
{
return TemplateVariant();
}
}
int TemplateList::count ( ) const
virtual

Returns the number of elements in the list

Implements TemplateListIntf.

Definition at line 339 of file template.cpp.

References TemplateList::Private::elems, and p.

Referenced by TemplateContextImpl::addIndexEntry(), release(), and TemplateListConstIterator::toLast().

{
return p->elems.count();
}
TemplateListIntf::ConstIterator * TemplateList::createIterator ( ) const
virtual

Creates a new iterator for this list.

Note
the user should call delete on the returned pointer.

Implements TemplateListIntf.

Definition at line 404 of file template.cpp.

References TemplateListConstIterator.

{
return new TemplateListConstIterator(*this);
}
int TemplateList::release ( )
virtual

Decreases object's referenc count, destroy object if 0

Implements TemplateListIntf.

Definition at line 329 of file template.cpp.

References count(), p, and TemplateList::Private::refCount.

{
int count = --p->refCount;
if (count<=0)
{
delete this;
}
return count;
}

Friends And Related Function Documentation

friend class TemplateListConstIterator
friend

Definition at line 398 of file template.h.

Referenced by createIterator().

Member Data Documentation

Private* TemplateList::p
private

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