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

Class to hold 0-or-1 object. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end), plus an automatic convertion to one pointer. More...

#include <Node.h>

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

Collaboration graph
[legend]

Public Types

typedef T * value_type
typedef T *const * iterator

Public Member Functions

 Single ()
iterator begin () const
iterator end () const
unsigned int size () const
bool empty () const
T * operator[] (unsigned int i) const
 operator T * () const
T * operator-> () const
bool add (T *elem)
bool remove (T *elem)

Protected Attributes

T * elems [2]

Detailed Description

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

Class to hold 0-or-1 object. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end), plus an automatic convertion to one pointer.

Definition at line 224 of file Node.h.


Member Typedef Documentation

template<class T >
typedef T* const* sofa::simulation::Node::Single< T >::iterator

Definition at line 230 of file Node.h.

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

Definition at line 229 of file Node.h.


Constructor & Destructor Documentation

template<class T >
sofa::simulation::Node::Single< T >::Single (  )  [inline]

Definition at line 232 of file Node.h.


Member Function Documentation

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

Definition at line 267 of file Node.h.

Referenced by sofa::simulation::Node::doAddObject().

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

Definition at line 237 of file Node.h.

Referenced by sofa::simulation::Node::printComponents().

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

Definition at line 249 of file Node.h.

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

Definition at line 241 of file Node.h.

Referenced by sofa::simulation::Node::printComponents().

template<class T >
sofa::simulation::Node::Single< T >::operator T * (  )  const [inline]

Definition at line 257 of file Node.h.

template<class T >
T* sofa::simulation::Node::Single< T >::operator-> (  )  const [inline]

Definition at line 261 of file Node.h.

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

Definition at line 253 of file Node.h.

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

Definition at line 275 of file Node.h.

Referenced by sofa::simulation::Node::doRemoveObject().

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

Definition at line 245 of file Node.h.


Field Documentation

template<class T >
T* sofa::simulation::Node::Single< T >::elems[2] [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