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

Interface for objects that can be composed within each other. More...

#include <Composite.hpp>

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

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef _Type Type
typedef boost::shared_ptr< Type > Pointer
typedef boost::weak_ptr< Type > WeakPointer
typedef std::vector< PointerList
typedef size_t SizeType

Public Member Functions

virtual CompositionType getCompositionType () const =0 throw ()
virtual size_t getSize () const =0 throw ()
virtual void getChildren (List &outChildren) const =0 throw (Error)
virtual const Pointer get (const std::vector< SizeType > &inIndices) const =0 throw (Error)
virtual void setParentCollection (const Pointer &inParentCollection) throw ()
virtual Pointer getParentCollection () const throw ()

Private Member Functions

 Composite (const Composite< _Type > &rhs) throw ()
Composite< _Type > & operator= (const Composite< _Type > &rhs) throw ()

Private Attributes

WeakPointer mParentCollection


Detailed Description

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

Interface for objects that can be composed within each other.

The Composite class defines an interface for objects that can occur singly (Scalar), as Arrays (Vector) or bundles (Bundle). This class defines polymorphic methods that will be overridden by subsequent implementations.

Definition at line 48 of file Composite.hpp.


Member Typedef Documentation

template<typename _Type>
typedef boost::shared_ptr<Type> torc::generic::Composite< _Type >::Pointer

Shared Pointer to object of type Type

Reimplemented in torc::generic::Bundle< _Type >, torc::generic::Scalar< _Type >, torc::generic::Vector< _Type, _ChildType, _ChildFactoryType, cPreserve >, torc::generic::VectorBit< _Type >, torc::generic::Bundle< torc::generic::PortReference >, torc::generic::Bundle< torc::generic::Net >, torc::generic::Bundle< _BaseType >, torc::generic::Bundle< torc::generic::Port >, torc::generic::Scalar< torc::generic::PortReference >, torc::generic::Scalar< torc::generic::Net >, torc::generic::Scalar< torc::generic::Parameter >, torc::generic::Scalar< torc::generic::Instance >, torc::generic::Scalar< torc::generic::Port >, torc::generic::Vector< torc::generic::PortReference, torc::generic::VectorPortBitReference, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Instance, torc::generic::InstanceArrayMember, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Net, torc::generic::VectorNetBit, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Parameter, torc::generic::ParameterArrayElement, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Port, torc::generic::VectorPortBit, torc::generic::FactoryType, true >, torc::generic::VectorBit< torc::generic::PortReference >, torc::generic::VectorBit< torc::generic::Net >, torc::generic::VectorBit< torc::generic::Parameter >, torc::generic::VectorBit< torc::generic::Instance >, and torc::generic::VectorBit< torc::generic::Port >.

Definition at line 59 of file Composite.hpp.

template<typename _Type>
typedef std::vector<Pointer> torc::generic::Composite< _Type >::List

List of Shared Pointers to objects of type Type

Reimplemented in torc::generic::Bundle< _Type >, torc::generic::Scalar< _Type >, torc::generic::Vector< _Type, _ChildType, _ChildFactoryType, cPreserve >, torc::generic::VectorBit< _Type >, torc::generic::Bundle< torc::generic::PortReference >, torc::generic::Bundle< torc::generic::Net >, torc::generic::Bundle< _BaseType >, torc::generic::Bundle< torc::generic::Port >, torc::generic::Scalar< torc::generic::PortReference >, torc::generic::Scalar< torc::generic::Net >, torc::generic::Scalar< torc::generic::Parameter >, torc::generic::Scalar< torc::generic::Instance >, torc::generic::Scalar< torc::generic::Port >, torc::generic::Vector< torc::generic::PortReference, torc::generic::VectorPortBitReference, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Instance, torc::generic::InstanceArrayMember, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Net, torc::generic::VectorNetBit, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Parameter, torc::generic::ParameterArrayElement, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Port, torc::generic::VectorPortBit, torc::generic::FactoryType, true >, torc::generic::VectorBit< torc::generic::PortReference >, torc::generic::VectorBit< torc::generic::Net >, torc::generic::VectorBit< torc::generic::Parameter >, torc::generic::VectorBit< torc::generic::Instance >, and torc::generic::VectorBit< torc::generic::Port >.

Definition at line 65 of file Composite.hpp.


Member Function Documentation

template<typename _Type>
virtual CompositionType torc::generic::Composite< _Type >::getCompositionType (  )  const throw () [pure virtual]

Get the type of this composition.

Returns:
Composition type for this object

Implemented in torc::generic::Bundle< _Type >, torc::generic::Scalar< _Type >, torc::generic::Vector< _Type, _ChildType, _ChildFactoryType, cPreserve >, torc::generic::VectorBit< _Type >, torc::generic::Bundle< torc::generic::PortReference >, torc::generic::Bundle< torc::generic::Net >, torc::generic::Bundle< _BaseType >, torc::generic::Bundle< torc::generic::Port >, torc::generic::Scalar< torc::generic::PortReference >, torc::generic::Scalar< torc::generic::Net >, torc::generic::Scalar< torc::generic::Parameter >, torc::generic::Scalar< torc::generic::Instance >, torc::generic::Scalar< torc::generic::Port >, torc::generic::Vector< torc::generic::PortReference, torc::generic::VectorPortBitReference, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Instance, torc::generic::InstanceArrayMember, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Net, torc::generic::VectorNetBit, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Parameter, torc::generic::ParameterArrayElement, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Port, torc::generic::VectorPortBit, torc::generic::FactoryType, true >, torc::generic::VectorBit< torc::generic::PortReference >, torc::generic::VectorBit< torc::generic::Net >, torc::generic::VectorBit< torc::generic::Parameter >, torc::generic::VectorBit< torc::generic::Instance >, and torc::generic::VectorBit< torc::generic::Port >.

template<typename _Type>
virtual size_t torc::generic::Composite< _Type >::getSize (  )  const throw () [pure virtual]

Get the total number of bits of the composition

Returns:
Number of bits

Implemented in torc::generic::Bundle< _Type >, torc::generic::Scalar< _Type >, torc::generic::Vector< _Type, _ChildType, _ChildFactoryType, cPreserve >, torc::generic::VectorBit< _Type >, torc::generic::Bundle< torc::generic::PortReference >, torc::generic::Bundle< torc::generic::Net >, torc::generic::Bundle< _BaseType >, torc::generic::Bundle< torc::generic::Port >, torc::generic::Scalar< torc::generic::PortReference >, torc::generic::Scalar< torc::generic::Net >, torc::generic::Scalar< torc::generic::Parameter >, torc::generic::Scalar< torc::generic::Instance >, torc::generic::Scalar< torc::generic::Port >, torc::generic::Vector< torc::generic::PortReference, torc::generic::VectorPortBitReference, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Instance, torc::generic::InstanceArrayMember, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Net, torc::generic::VectorNetBit, torc::generic::FactoryType, true >, torc::generic::Vector< torc::generic::Parameter, torc::generic::ParameterArrayElement, torc::generic::FactoryType, false >, torc::generic::Vector< torc::generic::Port, torc::generic::VectorPortBit, torc::generic::FactoryType, true >, torc::generic::VectorBit< torc::generic::PortReference >, torc::generic::VectorBit< torc::generic::Net >, torc::generic::VectorBit< torc::generic::Parameter >, torc::generic::VectorBit< torc::generic::Instance >, and torc::generic::VectorBit< torc::generic::Port >.

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

Get children of this composition.

Note:
This is relevant for Vector and Bundle compositions only. Other compositions return a NULL pointer
Parameters:
[out] outChildren A list of all children for this composition

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

Get a specific member of this composition.

Note:
This is relevant for Vector composition only. Other compositions return a NULL pointer
Parameters:
[in] inIndices A list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns:
A pointer to the child situated at the specified indices. For non-relevant types a NULL pointer is returned
Exceptions:
Error Index dimensions mismatch

template<typename _Type>
virtual void torc::generic::Composite< _Type >::setParentCollection ( const Pointer inParentCollection  )  throw () [inline, virtual]

Set a pointer to a parnt composition.

Parameters:
[in] inParentCollection pointer to the parent collection (Vector/Bundle)

template<typename _Type>
Composite< _Type >::Pointer torc::generic::Composite< _Type >::getParentCollection (  )  const throw () [inline, virtual]

Get a pointer to the parent collection

Returns:
A pointer to the parent collection if present, empty pointer otherwise

Definition at line 174 of file Composite.hpp.


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

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