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

Template List iterator support. More...

Inheritance diagram for GenericConstIterator:
TemplateListIntf::ConstIterator

Public Member Functions

 GenericConstIterator (const QList< TemplateVariant > &list)
 
virtual ~GenericConstIterator ()
 
void toFirst ()
 
void toLast ()
 
void toNext ()
 
void toPrev ()
 
bool current (TemplateVariant &v) const
 
- Public Member Functions inherited from TemplateListIntf::ConstIterator
virtual ~ConstIterator ()
 

Private Attributes

QListIterator< TemplateVariantm_it
 

Detailed Description

Template List iterator support.

Definition at line 122 of file context.cpp.

Constructor & Destructor Documentation

GenericConstIterator::GenericConstIterator ( const QList< TemplateVariant > &  list)
inline

Definition at line 125 of file context.cpp.

126  : m_it(list) { }
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158
virtual GenericConstIterator::~GenericConstIterator ( )
inlinevirtual

Definition at line 127 of file context.cpp.

127 {}

Member Function Documentation

bool GenericConstIterator::current ( TemplateVariant v) const
inlinevirtual

Implements TemplateListIntf::ConstIterator.

Definition at line 144 of file context.cpp.

145  {
146  if (m_it.current())
147  {
148  v = *m_it.current();
149  return TRUE;
150  }
151  else
152  {
153  v = TemplateVariant();
154  return FALSE;
155  }
156  }
const bool FALSE
Definition: qglobal.h:370
type * current() const
Definition: qlist.h:146
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
const bool TRUE
Definition: qglobal.h:371
void GenericConstIterator::toFirst ( )
inlinevirtual

Moves iterator to the first element in the list

Implements TemplateListIntf::ConstIterator.

Definition at line 128 of file context.cpp.

129  {
130  m_it.toFirst();
131  }
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158
type * toFirst()
Definition: qlist.h:135
void GenericConstIterator::toLast ( )
inlinevirtual

Moves iterator to the last element in the list

Implements TemplateListIntf::ConstIterator.

Definition at line 132 of file context.cpp.

133  {
134  m_it.toLast();
135  }
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158
type * toLast()
Definition: qlist.h:136
void GenericConstIterator::toNext ( )
inlinevirtual

Moves iterator to the next element in the list

Implements TemplateListIntf::ConstIterator.

Definition at line 136 of file context.cpp.

137  {
138  if (m_it.current()) ++m_it;
139  }
type * current() const
Definition: qlist.h:146
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158
void GenericConstIterator::toPrev ( )
inlinevirtual

Moves iterator to the previous element in the list

Implements TemplateListIntf::ConstIterator.

Definition at line 140 of file context.cpp.

141  {
142  if (m_it.current()) --m_it;
143  }
type * current() const
Definition: qlist.h:146
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158

Member Data Documentation

QListIterator<TemplateVariant> GenericConstIterator::m_it
private

Definition at line 158 of file context.cpp.


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