sofa::simulation::Node::Sequence< T > Class Template Reference

Sequence class to hold a list of objects. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end). More...

#include <Node.h>

Collaboration diagram for sofa::simulation::Node::Sequence< T >:

Collaboration graph
[legend]

Public Types

typedef T * value_type
typedef std::vector< T * >
::const_iterator 
iterator
typedef std::vector< T * >
::const_reverse_iterator 
reverse_iterator

Public Member Functions

iterator begin () const
iterator end () const
reverse_iterator rbegin () const
reverse_iterator rend () const
unsigned int size () const
bool empty () const
T * operator[] (unsigned int i) const
void swap (iterator a, iterator b)
 Swap two values in the list. Uses a const_cast to violate the read-only iterators.
bool add (T *elem)
bool remove (T *elem)
void clear ()

Protected Attributes

std::vector< T * > elems

Detailed Description

template<class T>
class sofa::simulation::Node::Sequence< T >

Sequence class to hold a list of objects. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end).

Definition at line 148 of file Node.h.


Member Typedef Documentation

template<class T >
typedef std::vector< T* >::const_iterator sofa::simulation::Node::Sequence< T >::iterator

Definition at line 154 of file Node.h.

template<class T >
typedef std::vector< T* >::const_reverse_iterator sofa::simulation::Node::Sequence< T >::reverse_iterator

Definition at line 155 of file Node.h.

template<class T >
typedef T* sofa::simulation::Node::Sequence< T >::value_type

Definition at line 153 of file Node.h.


Member Function Documentation

template<class T >
bool sofa::simulation::Node::Sequence< T >::add ( T *  elem  )  [inline]

Definition at line 196 of file Node.h.

template<class T >
iterator sofa::simulation::Node::Sequence< T >::begin (  )  const [inline]

Definition at line 157 of file Node.h.

template<class T >
void sofa::simulation::Node::Sequence< T >::clear (  )  [inline]

Definition at line 219 of file Node.h.

template<class T >
bool sofa::simulation::Node::Sequence< T >::empty (  )  const [inline]

Definition at line 177 of file Node.h.

template<class T >
iterator sofa::simulation::Node::Sequence< T >::end (  )  const [inline]

Definition at line 161 of file Node.h.

template<class T >
T* sofa::simulation::Node::Sequence< T >::operator[] ( unsigned int  i  )  const [inline]

Definition at line 181 of file Node.h.

template<class T >
reverse_iterator sofa::simulation::Node::Sequence< T >::rbegin (  )  const [inline]

Definition at line 165 of file Node.h.

template<class T >
bool sofa::simulation::Node::Sequence< T >::remove ( T *  elem  )  [inline]

Definition at line 204 of file Node.h.

template<class T >
reverse_iterator sofa::simulation::Node::Sequence< T >::rend (  )  const [inline]

Definition at line 169 of file Node.h.

template<class T >
unsigned int sofa::simulation::Node::Sequence< T >::size ( void   )  const [inline]

Definition at line 173 of file Node.h.

template<class T >
void sofa::simulation::Node::Sequence< T >::swap ( iterator  a,
iterator  b 
) [inline]

Swap two values in the list. Uses a const_cast to violate the read-only iterators.

Definition at line 186 of file Node.h.


Field Documentation

template<class T >
std::vector< T* > sofa::simulation::Node::Sequence< T >::elems [protected]


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

Generated on Sun Nov 23 04:24:31 2008 for Sofa by  doxygen 1.5.7.1