torc::generic::VectorBit< _Type > Class Template Reference

Represents a single element of a vector composition. More...

#include <VectorBit.hpp>

Inheritance diagram for torc::generic::VectorBit< _Type >:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::VectorBit< _Type >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef _Type Type
typedef Composite< Type > BaseType
typedef BaseType::List List
typedef BaseType::Pointer Pointer
typedef BaseType::SizeType SizeType

Public Member Functions

virtual CompositionType getCompositionType () const throw ()
virtual SizeType getSize () const throw ()
virtual void getChildren (List &outChildren) const throw (Error)
virtual const Pointer get (const std::vector< SizeType > &inIndices) const throw (Error)
const std::vector< SizeType > & getIndices () const throw ()
void setIndices (const std::vector< SizeType > &inSource) throw ()
SizeType getAbsoluteIndex () const throw ()
void setAbsoluteIndex (SizeType inSource) throw ()

Private Member Functions

 VectorBit (const VectorBit< _Type > &source) throw ()
VectorBit< _Type > & operator= (const VectorBit< _Type > &source) throw ()

Private Attributes

std::vector< SizeType > mIndices
SizeType mAbsoluteIndex


Detailed Description

template<typename _Type>
class torc::generic::VectorBit< _Type >

Represents a single element of a vector composition.

A VectorBit is used to represent a bit of a vector. It contains a pointer to the vector and the particular index where it was stored. For a Vector where the _PRESERVE parameter is true, this is setup during the blast operation. Otherwise, this is moreor less similar to the Scalar composition.

Definition at line 44 of file VectorBit.hpp.


Member Typedef Documentation

template<typename _Type>
typedef BaseType::List torc::generic::VectorBit< _Type >::List

List of Shared Pointers to objects of type Type

Reimplemented from torc::generic::Composite< _Type >.

Definition at line 53 of file VectorBit.hpp.

template<typename _Type>
typedef BaseType::Pointer torc::generic::VectorBit< _Type >::Pointer

Shared Pointer to object of type Type

Reimplemented from torc::generic::Composite< _Type >.

Definition at line 54 of file VectorBit.hpp.


Member Function Documentation

template<typename _Type>
CompositionType torc::generic::VectorBit< _Type >::getCompositionType (  )  const throw () [inline, virtual]

Get composition type for this object

Returns:
The CompositionType inSource eCompositionTypeVectorBit is returned
Get composition type for this object

Returns:
The CompositionType inSource eCompositionTypeScalar is returned

Implements torc::generic::Composite< _Type >.

Definition at line 141 of file VectorBit.hpp.

template<typename _Type>
VectorBit< _Type >::SizeType torc::generic::VectorBit< _Type >::getSize ( void   )  const throw () [inline, virtual]

Get the total number of bits of the composition

Returns:
Number of bits

Implements torc::generic::Composite< _Type >.

Definition at line 151 of file VectorBit.hpp.

template<typename _Type>
virtual void torc::generic::VectorBit< _Type >::getChildren ( List outChildren  )  const throw (Error) [virtual]

Get children of this composition.

Parameters:
[out] outChildren A list of all children for this composition
Note:
This wil return empty list for scalar

template<typename _Type>
virtual const Pointer torc::generic::VectorBit< _Type >::get ( const std::vector< SizeType > &  inIndices  )  const throw (Error) [virtual]

Get a specific member of this composition.

Parameters:
[in] inIndices A list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns:
An empty pointer is returned

template<typename _Type>
const std::vector< typename VectorBit< _Type >::SizeType > & torc::generic::VectorBit< _Type >::getIndices (  )  const throw () [inline]

Get the index of this bit in the vector.

Returns:
A vector containing the indices to which this element belonged.

Definition at line 189 of file VectorBit.hpp.

template<typename _Type>
void torc::generic::VectorBit< _Type >::setIndices ( const std::vector< SizeType > &  inSource  )  throw () [inline]

Set the index of this bit in the vector.

Parameters:
[in] inSource A vector of indices for this element

Definition at line 200 of file VectorBit.hpp.


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

Generated on Thu Oct 13 16:50:31 2011 for TORC by  doxygen 1.5.6