torc::generic::InstanceArray Class Reference

Represents an array of instances. More...

#include <InstanceArray.hpp>

Inheritance diagram for torc::generic::InstanceArray:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::InstanceArray:

Collaboration graph
[legend]

List of all members.

Public Types

typedef Vector< Instance,
InstanceArrayMember,
InstanceArrayMember::Factory,
false > 
BaseVectorType
typedef VisitorType
< InstanceArray
Visitor

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
virtual void setParent (const ViewSharedPtr &inParent) throw ()
virtual void bindToMasterView (const ViewSharedPtr &inMaster, bool inMapPortReferences=true) throw (Error)
virtual void addPortReference (const PortReferenceSharedPtr &inPortRef) throw (Error)
virtual PortReferenceSharedPtr findPortReference (const std::string &inPortRef) throw (Error)
virtual void removePortReference (const std::string &inName) throw (Error)
virtual void getPortReferences (std::vector< PortReferenceSharedPtr > &) const throw ()
virtual void setPortReferences (const std::vector< PortReferenceSharedPtr > &inSource) throw (Error)
virtual void flatten () throw (Error)
template<typename _Action>
void applyOnAllBits (const _Action &action) throw (Error)

Protected Member Functions

virtual void onChildCreate (const boost::shared_ptr< BaseVectorType::ChildType > &inCreatedChild) const throw (Error)

Friends

class FactoryType< InstanceArray >

Classes

class  Factory


Detailed Description

Represents an array of instances.

The InstanceArray class represents an array of instances. They can be created using the (instance (array ...) ... ) syntax.

Definition at line 49 of file InstanceArray.hpp.


Member Function Documentation

void torc::generic::InstanceArray::accept ( BaseVisitor inoutVisitor  )  throw (Error) [virtual]

Recive a inoutVisitor to this class. The visit method of the inoutVisitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This sitation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.

Parameters:
[in,out] inoutVisitor A reference to the inoutVisitor object
Exceptions:
Error Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method.

Implements torc::generic::Visitable.

Definition at line 116 of file InstanceArray.cpp.

void torc::generic::InstanceArray::bindToMasterView ( const ViewSharedPtr &  inMaster,
bool  inMapPortReferences = true 
) throw (Error) [virtual]

Bind an instance to it's master. Instance binding consists of two steps:

  • Bind instance to cell
  • Bind existing port references to ports of the cell
Note:
Instances can be bound in two states, namely, immediately, with no port reference bindings, or delayed, when all used port references are bound to master ports. There is no port binding for extern views.
Parameters:
[in] inMaster Source Master view for this instance.
[in] inMapPortReferences Whether port references are to be mapped to ports of the new master
Exceptions:
Error If there is any kind of mismatch between ports etc.
Bind an instance to it's master. Instance binding consists of two steps:
  • Bind instance to cell
  • Bind port references to ports of the cell

Parameters:
[in] inMaster Source Master view for this instance.
Exceptions:
Error If there is any kind of mismatch between ports etc.

Reimplemented from torc::generic::Instance.

Definition at line 141 of file InstanceArray.cpp.

void torc::generic::InstanceArray::addPortReference ( const PortReferenceSharedPtr &  inPortRef  )  throw (Error) [virtual]

Add a port reference to this master.

Parameters:
[in] inPortRef A port reference.
Exceptions:
Error The method is unsupoorted for this class.

Reimplemented from torc::generic::Instance.

Definition at line 167 of file InstanceArray.cpp.

PortReferenceSharedPtr torc::generic::InstanceArray::findPortReference ( const std::string &  inPortRef  )  throw (Error) [virtual]

Find a port reference.

Parameters:
[in] inName String containing the name of the port.
Exceptions:
Error The method is unsupoorted for this class.

Reimplemented from torc::generic::Instance.

Definition at line 173 of file InstanceArray.cpp.

void torc::generic::InstanceArray::removePortReference ( const std::string &  inName  )  throw (Error) [virtual]

Remove a given port reference.

Parameters:
inName Name of the object to be delete
Exceptions:
Error The method is unsupoorted for this class.

Reimplemented from torc::generic::Instance.

Definition at line 180 of file InstanceArray.cpp.

void torc::generic::InstanceArray::getPortReferences ( std::vector< PortReferenceSharedPtr > &  outPortRefs  )  const throw () [virtual]

Get list of all port references.

Returns:
List of port references

Reimplemented from torc::generic::Instance.

Definition at line 186 of file InstanceArray.cpp.

void torc::generic::InstanceArray::setPortReferences ( const std::vector< PortReferenceSharedPtr > &  inSource  )  throw (Error) [virtual]

Set list of all port references.

Parameters:
[in] inSource List of port references
Exceptions:
Error The method is unsupoorted for this class.

Reimplemented from torc::generic::Instance.

Definition at line 194 of file InstanceArray.cpp.

void torc::generic::InstanceArray::flatten (  )  throw (Error) [virtual]

Flatten an instance so that internal references

Reimplemented from torc::generic::Instance.

Definition at line 203 of file InstanceArray.cpp.

template<typename _Action>
void torc::generic::InstanceArray::applyOnAllBits ( const _Action &  action  )  throw (Error) [inline]

Apply action on all bits of the array.

Parameters:
[in] action Action to be applied
Apply action on all bits.
Parameters:
[in] action Action to be applied

Definition at line 217 of file InstanceArray.hpp.


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

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