version 3.3

VRS::SequenceContainerSTL< T, STL_CONTAINER > Class Template Reference

#include <vrs/container/sequencecontainerstl.h>

Inheritance diagram for VRS::SequenceContainerSTL< T, STL_CONTAINER >:

VRS::SharedObj VRS::Visitable VRS::NonPersistentArray< VRS::SO< VRS::GL2::EXTSHADER::PrototypeHandler > > VRS::NonPersistentArray< VRS::SO< VRS::GL2::EXTSHADER::ShaderHandler > > VRS::Array< VRS::SO< VRS::GL2::EXTSHADER::ShaderHandler > >

List of all members.

Public Types

typedef STL_CONTAINER::iterator iterator
typedef
STL_CONTAINER::const_iterator 
const_iterator
typedef STL_CONTAINER::reference reference
typedef
STL_CONTAINER::const_reference 
const_reference

Public Member Functions

unsigned int size () const
 Returns the number of elements stored in the container.
bool isEmpty () const
 Returns if the container is empty.
void clear ()
void setElement (unsigned int index, const T &obj)
getElement (unsigned int index) const
 Indexed access methods.
void prepend (const T &obj)
void prepend (const T &obj, unsigned int count)
void prepend (const Iterator< T > *iter)
void append (const T &obj)
void append (const T &obj, unsigned int count)
void append (const Iterator< T > *iter)
void insert (unsigned int pos, const T &obj)
void insert (unsigned int pos, const T &obj, unsigned int count)
void insert (unsigned int pos, const Iterator< T > *iter)
void removeFirst ()
void removeFirst (unsigned int count)
void removeLast ()
void removeLast (unsigned int count)
void remove (unsigned int pos)
void remove (unsigned int pos, unsigned int count)
int find (const T &obj) const
bool contains (const T &obj) const
bool erase (const T &obj, bool eraseAll=false)
void resize (unsigned int newSize, const T &initValue=T())
virtual Iterator< T > * newIterator () const
 Creates a new `Iterator<T>' object.
virtual void modified ()
 Overload 'modified' to propagate changes to iterators.
 VRS_TYPEINFO (SequenceContainerSTL, SharedObj)
SequenceContainerSTL< T,
STL_CONTAINER >::reference 
operator[] (unsigned int index)
SequenceContainerSTL< T,
STL_CONTAINER >
::const_reference 
operator[] (unsigned int index) const
iterator beginSTL ()
const_iterator beginSTL () const
iterator endSTL ()
const_iterator endSTL () const
STL_CONTAINER & containerSTL ()
const STL_CONTAINER & containerSTL () const

Protected Member Functions

 SequenceContainerSTL ()
 SequenceContainerSTL (unsigned int size)
 SequenceContainerSTL (unsigned int size, const T &initValue)
 SequenceContainerSTL (const Iterator< T > *sourceItr)

Protected Attributes

Iterator< T > * iterator_

Friends

class SequenceContainerIteratorSTL< T, STL_CONTAINER >


Detailed Description

template<typename T, class STL_CONTAINER>
class VRS::SequenceContainerSTL< T, STL_CONTAINER >

Base template class for STL sequence container classes (std::deque, std::list, std::vector). Note: each of the used STL container class has its own runtime complexities for the different access and modification methods!!!

Member Typedef Documentation

template<typename T, class STL_CONTAINER>
typedef STL_CONTAINER::iterator VRS::SequenceContainerSTL< T, STL_CONTAINER >::iterator

template<typename T, class STL_CONTAINER>
typedef STL_CONTAINER::const_iterator VRS::SequenceContainerSTL< T, STL_CONTAINER >::const_iterator

template<typename T, class STL_CONTAINER>
typedef STL_CONTAINER::reference VRS::SequenceContainerSTL< T, STL_CONTAINER >::reference

template<typename T, class STL_CONTAINER>
typedef STL_CONTAINER::const_reference VRS::SequenceContainerSTL< T, STL_CONTAINER >::const_reference


Constructor & Destructor Documentation

template<typename T, class STL_CONTAINER>
VRS::SequenceContainerSTL< T, STL_CONTAINER >::SequenceContainerSTL (  )  [protected]

template<typename T, class STL_CONTAINER>
VRS::SequenceContainerSTL< T, STL_CONTAINER >::SequenceContainerSTL ( unsigned int  size  )  [protected]

template<typename T, class STL_CONTAINER>
VRS::SequenceContainerSTL< T, STL_CONTAINER >::SequenceContainerSTL ( unsigned int  size,
const T &  initValue 
) [protected]

template<typename T, class STL_CONTAINER>
VRS::SequenceContainerSTL< T, STL_CONTAINER >::SequenceContainerSTL ( const Iterator< T > *  sourceItr  )  [protected]


Member Function Documentation

template<typename T, class STL_CONTAINER>
unsigned int VRS::SequenceContainerSTL< T, STL_CONTAINER >::size ( void   )  const [inline]

Returns the number of elements stored in the container.

template<typename T, class STL_CONTAINER>
bool VRS::SequenceContainerSTL< T, STL_CONTAINER >::isEmpty ( void   )  const [inline]

Returns if the container is empty.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::clear ( void   )  [inline]

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::setElement ( unsigned int  index,
const T &  obj 
)

template<typename T, class STL_CONTAINER>
T VRS::SequenceContainerSTL< T, STL_CONTAINER >::getElement ( unsigned int  index  )  const [inline]

Indexed access methods.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::prepend ( const T &  obj  ) 

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::prepend ( const T &  obj,
unsigned int  count 
)

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::prepend ( const Iterator< T > *  iter  ) 

Prepend the given object 'obj' 'count'-times. Prepend the objects of the given iterator 'iter'.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::append ( const T &  obj  ) 

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::append ( const T &  obj,
unsigned int  count 
)

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::append ( const Iterator< T > *  iter  ) 

Append the given object 'obj' 'count'-times. Append the objects of the given iterator 'iter'.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::insert ( unsigned int  pos,
const T &  obj 
)

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::insert ( unsigned int  pos,
const T &  obj,
unsigned int  count 
)

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::insert ( unsigned int  pos,
const Iterator< T > *  iter 
)

Insert the given object 'obj' 'count'-times before the 'pos'-th element of the container. Insert the objects of the given iterator 'iter' before the 'pos'-th element of the container.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::removeFirst (  ) 

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::removeFirst ( unsigned int  count  ) 

Remove the 'count' first elements of the container.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::removeLast (  ) 

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::removeLast ( unsigned int  count  ) 

Remove the 'count' last elements of the container.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::remove ( unsigned int  pos  ) 

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::remove ( unsigned int  pos,
unsigned int  count 
)

Remove 'count' elements of the container starting at the 'pos'-th element.

template<typename T, class STL_CONTAINER>
int VRS::SequenceContainerSTL< T, STL_CONTAINER >::find ( const T &  obj  )  const

template<typename T, class STL_CONTAINER>
bool VRS::SequenceContainerSTL< T, STL_CONTAINER >::contains ( const T &  obj  )  const

template<typename T, class STL_CONTAINER>
bool VRS::SequenceContainerSTL< T, STL_CONTAINER >::erase ( const T &  obj,
bool  eraseAll = false 
)

'find()' returns the first position of an element e, which is equal to 'obj' (operator==(const T& e, const T& obj)). It returns -1 if the container does not contain such an element. 'contains()' is a shortcut for (find(obj) > -1). 'erase()' removes the given 'obj' from the container.

template<typename T, class STL_CONTAINER>
void VRS::SequenceContainerSTL< T, STL_CONTAINER >::resize ( unsigned int  newSize,
const T &  initValue = T() 
)

It is a shortcut for: if(newSize > size()) { append(initValue, newSize - size()); } else { removeLast(size() - newSize); }

template<typename T, class STL_CONTAINER>
virtual Iterator<T>* VRS::SequenceContainerSTL< T, STL_CONTAINER >::newIterator (  )  const [virtual]

Creates a new `Iterator<T>' object.

Reimplemented in VRS::NonPersistentArray< T >, VRS::NonPersistentDeque< T >, VRS::NonPersistentArray< VRS::SO< VRS::Shadowed > >, VRS::NonPersistentArray< VRS::SO< VRS::GL2::EXTSHADER::HandlerObject > >, VRS::NonPersistentArray< VRS::VertexProgramNV::MatrixTracking * >, VRS::NonPersistentArray< VRS::SO< VRS::Array< VRS::Vector3Base< T > > > >, VRS::NonPersistentArray< VRS::SO< VRS::Curve > >, VRS::NonPersistentArray< VRS::SO< VRS::Iterator< VRS::SO< VRS::Image > > > >, VRS::NonPersistentArray< VRS::ShaderProgramGL::Parameter * >, VRS::NonPersistentArray< GLenum >, VRS::NonPersistentArray< VRS::Engine * >, VRS::NonPersistentArray< VRS::SO< EnvironmentRenderer::GreenSpace > >, VRS::NonPersistentArray< VRS::SO< VRS::ImageTexture2DGL > >, VRS::NonPersistentArray< VRS::SO< VRS::TexGenGL > >, VRS::NonPersistentArray< double >, VRS::NonPersistentArray< VRS::SO< VRS::Transform > >, VRS::NonPersistentArray< VRS::SO< VRS::SOUND::BufferAL > >, VRS::NonPersistentArray< VRS::SO< VRS::Callback2< VRS::SO< VRS::ButtonEvent >, VRS::Bounds > > >, VRS::NonPersistentArray< VRS::SO< VRS::Callback2< VRS::SO< VRS::ButtonEvent >, VRS::Vector3Base< T > > > >, VRS::NonPersistentArray< VRS::Bounds >, VRS::NonPersistentArray< VRS::TexEnvCombineGL::CombineMode >, VRS::NonPersistentArray< VRS::SO< EnvironmentRenderer::CloudLayer > >, VRS::NonPersistentArray< VRS::Facet::Loop >, VRS::NonPersistentArray< VRS::Vector3Base< T > >, VRS::NonPersistentArray< VRS::SO< VRS::Text > >, VRS::NonPersistentArray< VRS::WO< EnvironmentRenderer::WaterSurface > >, VRS::NonPersistentArray< int >, VRS::NonPersistentArray< std::pair< VRS::VRS::SO< VRS::VRS::Callback1< VRS::VRS::SharedObj * > >, VRS::VRS::TwoPointConnection::CB_ID > >, VRS::NonPersistentArray< unsigned int >, VRS::NonPersistentArray< VRS::SO< VRS::MonoAttribute > >, VRS::NonPersistentArray< VRS::SO< VRS::Callback3< ARG1, ARG2, ARG3 > > >, VRS::NonPersistentArray< VRS::SO< VRS::SceneThing > >, VRS::NonPersistentArray< VRS::SO< VRS::Shape > >, VRS::NonPersistentArray< VRS::SO< VRS::Cache > >, VRS::NonPersistentArray< VRS::IntervalMapper::IntervalInfo >, VRS::NonPersistentArray< VRS::FragmentProgramNV::NamedParameter * >, VRS::NonPersistentArray< VRS::TimeGroup::ChildInterval >, VRS::NonPersistentArray< VRS::SO< VRS::GL2::EXTSHADER::ShaderHandler > >, VRS::NonPersistentArray< VRS::SO< VRS::Callback1< VRS::SO< VRS::EngineGL > > > >, VRS::NonPersistentArray< VRS::UndoNavigation::Keyframe >, VRS::NonPersistentArray< VRS::SO< VRS::MethodCallback1< VRS::Cache, VRS::SharedObj * > > >, VRS::NonPersistentArray< VRS::SO< VRS::ShadowCaster > >, VRS::NonPersistentArray< VRS::SO< VRS::Attribute > >, VRS::NonPersistentArray< VRS::SO< VRS::ShapeMaterialGL > >, VRS::NonPersistentArray< VRS::SO< VRS::Array< VRS::SO< VRS::MonoAttribute > > > >, VRS::NonPersistentArray< VRS::TimeGroup::TimeMark >, VRS::NonPersistentArray< VRS::Matrix4x4Base< T > >, VRS::NonPersistentArray< VRS::SO< VRS::ImageManipulator > >, VRS::NonPersistentArray< VRS::SO< VRS::PlanarMirror > >, VRS::NonPersistentArray< VRS::SO< VRS::Alternative > >, VRS::NonPersistentArray< VRS::SO< VRS::Callback2< VRS::SO< VRS::MotionEvent >, VRS::Bounds > > >, VRS::NonPersistentArray< VRS::VertexProgramNV::VertexParameter * >, VRS::NonPersistentArray< VRS::SO< VRS::CubeEnvMirror > >, VRS::NonPersistentArray< VRS::SO< VRS::AbstractStateHandler > >, VRS::NonPersistentArray< bool >, VRS::NonPersistentArray< VRS::SO< VRS::PolygonSet > >, VRS::NonPersistentArray< VRS::SO< VRS::Image > >, VRS::NonPersistentArray< VRS::SO< VRS::GL2::EXTSHADER::PrototypeHandler > >, VRS::NonPersistentArray< VRS::SO< VRS::AttributeComposite > >, VRS::NonPersistentArray< VRS::SO< VRS::BehaviorNode > >, VRS::NonPersistentArray< VRS::SO< VRS::Light > >, VRS::NonPersistentArray< VRS::SO< VRS::Iterator< VRS::Vector3Base< T > > > >, VRS::NonPersistentArray< VRS::SO< VRS::PolyAttribute > >, VRS::NonPersistentArray< VRS::SO< VRS::IntersectionInfo > >, VRS::NonPersistentArray< VRS::SO< VRS::PBufferCanvasGL > >, VRS::NonPersistentArray< VRS::SO< VRS::GL2::EXTSHADER::UberShaderProgramObject > >, VRS::NonPersistentArray< VRS::FragmentProgramNV::LocalParameter * >, VRS::NonPersistentArray< VRS::SO< VRS::Technique > >, VRS::NonPersistentArray< VRS::WO< VRS::SceneGraphOperator > >, VRS::NonPersistentArray< VRS::SO< VRS::Bezier > >, VRS::NonPersistentArray< VRS::SO< VRS::SharedObj > >, VRS::NonPersistentDeque< VRS::SO< VRS::Constraint > >, VRS::NonPersistentDeque< VRS::WO< VRS::Canvas > >, VRS::NonPersistentDeque< VRS::SO< VRS::SceneNode > >, VRS::NonPersistentDeque< VRS::SO< VRS::PolyAttribute > >, and VRS::NonPersistentDeque< VRS::SO< VRS::BehaviorNode > >.

template<typename T, class STL_CONTAINER>
virtual void VRS::SequenceContainerSTL< T, STL_CONTAINER >::modified (  )  [virtual]

Overload 'modified' to propagate changes to iterators.

Reimplemented from VRS::SharedObj.

template<typename T, class STL_CONTAINER>
VRS::SequenceContainerSTL< T, STL_CONTAINER >::VRS_TYPEINFO ( SequenceContainerSTL< T, STL_CONTAINER >  ,
SharedObj   
)

template<typename T, class STL_CONTAINER>
SequenceContainerSTL<T, STL_CONTAINER>::reference VRS::SequenceContainerSTL< T, STL_CONTAINER >::operator[] ( unsigned int  index  )  [inline]

template<typename T, class STL_CONTAINER>
SequenceContainerSTL<T, STL_CONTAINER>::const_reference VRS::SequenceContainerSTL< T, STL_CONTAINER >::operator[] ( unsigned int  index  )  const [inline]

template<typename T, class STL_CONTAINER>
iterator VRS::SequenceContainerSTL< T, STL_CONTAINER >::beginSTL (  )  [inline]

template<typename T, class STL_CONTAINER>
const_iterator VRS::SequenceContainerSTL< T, STL_CONTAINER >::beginSTL (  )  const [inline]

template<typename T, class STL_CONTAINER>
iterator VRS::SequenceContainerSTL< T, STL_CONTAINER >::endSTL (  )  [inline]

template<typename T, class STL_CONTAINER>
const_iterator VRS::SequenceContainerSTL< T, STL_CONTAINER >::endSTL (  )  const [inline]

template<typename T, class STL_CONTAINER>
STL_CONTAINER& VRS::SequenceContainerSTL< T, STL_CONTAINER >::containerSTL (  )  [inline]

template<typename T, class STL_CONTAINER>
const STL_CONTAINER& VRS::SequenceContainerSTL< T, STL_CONTAINER >::containerSTL (  )  const [inline]


Friends And Related Function Documentation

template<typename T, class STL_CONTAINER>
friend class SequenceContainerIteratorSTL< T, STL_CONTAINER > [friend]


Member Data Documentation

template<typename T, class STL_CONTAINER>
Iterator<T>* VRS::SequenceContainerSTL< T, STL_CONTAINER >::iterator_ [mutable, protected]


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

Generated on Tue May 22 06:00:19 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact