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

Represents a "bundle" in the EDIF sense. More...

#include <Bundle.hpp>

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

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

Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

virtual CompositionType getCompositionType () const throw ()
virtual SizeType getSize () const throw ()
virtual void addChild (const boost::shared_ptr< Type > &child) throw (Error)
virtual void getChildren (List &outChildren) const throw (Error)
template<typename _Action>
void applyOnAllChildren (const _Action &action) throw (Error)
virtual const Pointer get (const std::vector< SizeType > &indices) const throw (Error)

Private Attributes

List mChildren


Detailed Description

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

Represents a "bundle" in the EDIF sense.

A bundle in EDIF is an ordered collection of items. For example a bundle of ports is a collection of other scalar and vector ports. The Bundle class represents an implementation of functionality for such a collection.

Definition at line 49 of file Bundle.hpp.


Member Typedef Documentation

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

Shared Pointer to object of type Type

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

Definition at line 56 of file Bundle.hpp.

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

List of Shared Pointers to objects of type Type

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

Definition at line 57 of file Bundle.hpp.


Member Function Documentation

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

Get composition type for this object

Returns:
The CompositionType inSource VECTOR is returned

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

Definition at line 147 of file Bundle.hpp.

template<typename _Type>
Bundle< _Type >::SizeType torc::generic::Bundle< _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 158 of file Bundle.hpp.

template<typename _Type>
void torc::generic::Bundle< _Type >::addChild ( const boost::shared_ptr< Type > &  child  )  throw (Error) [inline, virtual]

Add a child to the bundle. Note that, the new element is added to the end of the array.

Parameters:
[in] child A pointer to a child
Exceptions:
Error The composition is not a container or the child type is not proper

Definition at line 178 of file Bundle.hpp.

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

Get children of this composition.

Parameters:
[out] outChildren A list of all children for this composition

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

Get a specific member of this composition.

Returns:
An empty pointer is returned
Exceptions:
Error Index dimensions mismatch


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

Generated on Thu Oct 13 16:49:59 2011 for TORC by  doxygen 1.5.6