torc-master
|
Represents a single element of a vector composition. More...
#include <VectorBit.hpp>
Public Types | |
typedef _Type | Type |
typedef Composite< Type > | BaseType |
typedef BaseType::List | List |
typedef BaseType::Pointer | Pointer |
typedef BaseType::SizeType | SizeType |
typedef boost::weak_ptr< Type > | WeakPointer |
Public Member Functions | |
virtual CompositionType | getCompositionType () const |
virtual SizeType | getSize () const |
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 |
void | setIndices (const std::vector< SizeType > &inSource) |
SizeType | getAbsoluteIndex () const |
void | setAbsoluteIndex (SizeType inSource) |
virtual | ~VectorBit () throw () |
virtual void | setParentCollection (const Pointer &inParentCollection) |
virtual Pointer | getParentCollection () const |
void | setWeakThis (const WeakPointer &inWeakThis) |
Pointer | getSharedThis () const |
Protected Member Functions | |
VectorBit () | |
Private Member Functions | |
VectorBit (const VectorBit< _Type > &source) | |
VectorBit< _Type > & | operator= (const VectorBit< _Type > &source) |
Private Attributes | |
std::vector< SizeType > | mIndices |
SizeType | mAbsoluteIndex |
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 41 of file VectorBit.hpp.
typedef Composite<Type> torc::generic::VectorBit< _Type >::BaseType |
Definition at line 47 of file VectorBit.hpp.
typedef BaseType::List torc::generic::VectorBit< _Type >::List |
Definition at line 48 of file VectorBit.hpp.
typedef BaseType::Pointer torc::generic::VectorBit< _Type >::Pointer |
Definition at line 49 of file VectorBit.hpp.
typedef BaseType::SizeType torc::generic::VectorBit< _Type >::SizeType |
Definition at line 50 of file VectorBit.hpp.
typedef _Type torc::generic::VectorBit< _Type >::Type |
Definition at line 46 of file VectorBit.hpp.
|
inherited |
Definition at line 56 of file Composite.hpp.
|
protected |
Definition at line 185 of file VectorBit.hpp.
|
virtual |
Definition at line 187 of file VectorBit.hpp.
|
private |
|
virtual |
Get a specific member of this composition.
[in] | inIndices | A list of indices to be accessed. The number of indices must be equal to the number of dimensions. |
Get a specific member of this composition.
[in] | indices | A list of indices to be accessed. The number of indices must be equal to the number of dimensions. |
Implements torc::generic::Composite< _Type >.
Definition at line 152 of file VectorBit.hpp.
|
inline |
Definition at line 177 of file VectorBit.hpp.
|
virtual |
Get children of this composition.
[out] | outChildren | A list of all children for this composition |
Get children of this composition.
[out] | outChildren | A list of all children for this composition |
Implements torc::generic::Composite< _Type >.
Definition at line 140 of file VectorBit.hpp.
|
virtual |
Get composition type for this object
Get composition type for this object
Implements torc::generic::Composite< _Type >.
Definition at line 123 of file VectorBit.hpp.
|
inline |
Get the index of this bit in the vector.
Definition at line 163 of file VectorBit.hpp.
|
inlinevirtualinherited |
Get a pointer to the parent collection
Definition at line 156 of file Composite.hpp.
|
inlineinherited |
Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.
Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.
[out] | ptr | Set to a shared pointer to this object |
|
virtual |
Get the total number of bits of the composition
Implements torc::generic::Composite< _Type >.
Definition at line 131 of file VectorBit.hpp.
|
private |
void torc::generic::VectorBit< _Type >::setAbsoluteIndex | ( | SizeType | inSource | ) |
Definition at line 181 of file VectorBit.hpp.
void torc::generic::VectorBit< _Type >::setIndices | ( | const std::vector< SizeType > & | inSource | ) |
Set the index of this bit in the vector.
[in] | inSource | A vector of indices for this element |
Definition at line 172 of file VectorBit.hpp.
|
inlinevirtualinherited |
Set a pointer to a parnt composition.
[in] | inParentCollection | pointer to the parent collection (Vector/Bundle) |
Set a pointer to a parnt composition.
[in] | parentCollection | pointer to the parent collection (Vector/Bundle) |
Definition at line 145 of file Composite.hpp.
|
inlineinherited |
Set a weak pointer to this object. This will be used later to get a shared pointer to this object from within other member methods if required. This should be called by the Factory creating the object.
[in] | weakThis | A weak pointer to this object |
|
private |
Definition at line 112 of file VectorBit.hpp.
|
private |
Definition at line 111 of file VectorBit.hpp.