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

standard template list implementation More...

Inheritance diagram for GenericNodeListContext:
TemplateListIntf AllMembersListContext::Private ArgumentListContext::Private ClassListContext::Private DirListContext::Private ExampleListContext::Private FileListContext::Private IncludeInfoListContext::Private InheritanceListContext::Private InheritedMemberInfoListContext::Private MemberGroupListContext::Private MemberListContext::Private ModuleListContext::Private NamespaceListContext::Private NestingContext::Private PageListContext::Private SearchIndicesContext::Private SymbolGroupListContext::Private SymbolIndicesContext::Private SymbolListContext::Private UsedFilesContext::Private

Public Member Functions

 GenericNodeListContext ()
 
int count () const
 
TemplateVariant at (int index) const
 
TemplateListIntf::ConstIteratorcreateIterator () const
 
void append (const TemplateVariant &ctn)
 
bool isEmpty () const
 
int addRef ()
 
int release ()
 
- Public Member Functions inherited from TemplateListIntf
virtual ~TemplateListIntf ()
 

Static Public Member Functions

static GenericNodeListContextalloc ()
 

Private Attributes

QList< TemplateVariantm_children
 
int m_refCount
 

Detailed Description

standard template list implementation

Definition at line 164 of file context.cpp.

Constructor & Destructor Documentation

GenericNodeListContext::GenericNodeListContext ( )
inline

Definition at line 167 of file context.cpp.

167  : m_refCount(0)
168  {
170  }
QList< TemplateVariant > m_children
Definition: context.cpp:217
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371

Member Function Documentation

int GenericNodeListContext::addRef ( )
inlinevirtual

Increase object's reference count

Implements TemplateListIntf.

Definition at line 203 of file context.cpp.

204  {
205  return ++m_refCount;
206  }
static GenericNodeListContext* GenericNodeListContext::alloc ( )
inlinestatic

Definition at line 171 of file context.cpp.

172  {
173  return new GenericNodeListContext;
174  }
void GenericNodeListContext::append ( const TemplateVariant ctn)
inline

Definition at line 195 of file context.cpp.

196  {
198  }
QList< TemplateVariant > m_children
Definition: context.cpp:217
void append(const type *d)
Definition: qlist.h:73
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
TemplateVariant GenericNodeListContext::at ( int  index) const
inlinevirtual

Returns the element at index position index.

Implements TemplateListIntf.

Definition at line 181 of file context.cpp.

182  {
184  if (index>=0 && index<count())
185  {
186  result = *m_children.at(index);
187  }
188  return result;
189  }
QList< TemplateVariant > m_children
Definition: context.cpp:217
static QCString result
type * at(uint i) const
Definition: qlist.h:94
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
int count() const
Definition: context.cpp:177
int GenericNodeListContext::count ( ) const
inlinevirtual

Returns the number of elements in the list

Implements TemplateListIntf.

Definition at line 177 of file context.cpp.

178  {
179  return (int)m_children.count();
180  }
QList< TemplateVariant > m_children
Definition: context.cpp:217
uint count() const
Definition: qlist.h:66
TemplateListIntf::ConstIterator* GenericNodeListContext::createIterator ( ) const
inlinevirtual

Creates a new iterator for this list.

Note
the user should call delete on the returned pointer.

Implements TemplateListIntf.

Definition at line 190 of file context.cpp.

191  {
192  return new GenericConstIterator(m_children);
193  }
QList< TemplateVariant > m_children
Definition: context.cpp:217
Template List iterator support.
Definition: context.cpp:122
bool GenericNodeListContext::isEmpty ( ) const
inline

Definition at line 199 of file context.cpp.

200  {
201  return m_children.isEmpty();
202  }
QList< TemplateVariant > m_children
Definition: context.cpp:217
bool isEmpty() const
Definition: qlist.h:67
int GenericNodeListContext::release ( )
inlinevirtual

Decreases object's referenc count, destroy object if 0

Implements TemplateListIntf.

Definition at line 207 of file context.cpp.

208  {
209  int count = --m_refCount;
210  if (count<=0)
211  {
212  delete this;
213  }
214  return count;
215  }
int count() const
Definition: context.cpp:177

Member Data Documentation

QList<TemplateVariant> GenericNodeListContext::m_children
mutableprivate

Definition at line 217 of file context.cpp.

int GenericNodeListContext::m_refCount
private

Definition at line 218 of file context.cpp.


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