torc-master
|
Represents the usable instance of a port of a cell in another cell. More...
#include <PortReference.hpp>
Public Types | |
typedef std::list < NetSharedPtr >::iterator | Connection |
typedef boost::signals2::signal< void(const NetSharedPtr &)> | Connected |
typedef boost::signals2::signal< void(const NetSharedPtr &)> | Disconnected |
typedef PortReference | Type |
typedef boost::shared_ptr< Type > | Pointer |
typedef boost::weak_ptr< Type > | WeakPointer |
typedef std::vector< Pointer > | List |
typedef size_t | SizeType |
Public Member Functions | |
PortReference () | |
virtual | ~PortReference () throw () |
PortSharedPtr | getMaster () const |
virtual void | bindToMasterPort (const PortSharedPtr &inMaster) throw (Error) |
const PortAttributesSharedPtr | getAttributes () const |
void | setAttributes (const PortAttributesSharedPtr &inSource) |
std::string | getName () |
Connected & | signalNetConnected () |
Disconnected & | signalNetDisconnected () |
virtual void | getConnectedNets (std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const throw (Error) |
virtual Connection | connect (const NetSharedPtr &inNet)=0 throw (Error) |
virtual void | disconnect (const Connection &inConnection)=0 throw (Error) |
void | disconnect (const std::string &inName) throw (Error) |
void | disconnect (const NetSharedPtr &net) throw (Error) |
virtual void | disconnect () throw (Error) |
PropertySharedPtr | getProperty (const std::string &inName) |
bool | setProperty (const std::string &inName, const PropertySharedPtr &inProperty) |
void | getProperties (std::map< std::string, PropertySharedPtr > &outProperties) const |
void | setProperties (const std::map< std::string, PropertySharedPtr > &inSource) |
template<typename _Action > | |
void | applyOnAllProperties (const _Action &action) throw (Error) |
virtual void | accept (BaseVisitor &inoutVisitor)=0 throw (Error) |
virtual CompositionType | getCompositionType () const =0 |
virtual size_t | getSize () const =0 |
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) |
virtual Pointer | getParentCollection () const |
void | setWeakThis (const WeakPointer &inWeakThis) |
Pointer | getSharedThis () const |
const boost::shared_ptr< Instance > | getParent () const |
virtual void | setParent (const boost::shared_ptr< Instance > &inSource) |
Protected Member Functions | |
virtual void | onConnect () throw (Error) |
virtual void | onDisconnect () throw (Error) |
Private Member Functions | |
PortReference (const PortReference &source) | |
PortReference & | operator= (const PortReference &source) |
Private Attributes | |
PortSharedPtr | mMaster |
PortAttributesSharedPtr | mAttributes |
Represents the usable instance of a port of a cell in another cell.
The PortReference class is used to provide an interface for port usage of an instantiated cell. In other words, it more or less models the (portRef ...) keyword in EDIF. However, unlike a simple portRef, this can have properties that can be assigned to a portRef using (portInstance ...) syntax. This interface can be used to refer to all types of port references(scalar, vector, vector-bit and bundle).
Definition at line 47 of file PortReference.hpp.
|
inherited |
A signal to indicate that a new connection has been made
Definition at line 57 of file Connectable.hpp.
|
inherited |
A connection between a net and this object
Definition at line 52 of file Connectable.hpp.
|
inherited |
A signal to indicate that a connection has been removed
Definition at line 62 of file Connectable.hpp.
|
inherited |
List of Shared Pointers to objects of type Type
Definition at line 61 of file Composite.hpp.
|
inherited |
Shared Pointer to object of type Type
Definition at line 55 of file Composite.hpp.
|
inherited |
Definition at line 62 of file Composite.hpp.
|
inherited |
Definition at line 50 of file Composite.hpp.
|
inherited |
Definition at line 56 of file Composite.hpp.
torc::generic::PortReference::PortReference | ( | ) |
Definition at line 35 of file PortReference.cpp.
|
virtual |
Definition at line 38 of file PortReference.cpp.
|
private |
|
pure virtualinherited |
Receive an 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 situation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.
[in,out] | inoutVisitor | A reference to the inoutVisitor object |
Error | Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method. |
Implemented in torc::generic::Root, torc::generic::Permutable, torc::generic::PortBundle, torc::generic::Status, torc::generic::VectorPort, torc::generic::View, torc::generic::InterfaceJoinedInfo, torc::generic::LogicElement, torc::generic::ParameterArray, torc::generic::InstanceArray, torc::generic::Cell, torc::generic::VectorPortReference, torc::generic::VectorNet, torc::generic::Library, torc::generic::LogicValue, torc::generic::Simulate, torc::generic::Property, torc::generic::SingleParameter, torc::generic::Design, torc::generic::SimulationInfo, torc::generic::NetBundle, torc::generic::PortBundleReference, torc::generic::ScalarPort, torc::generic::ScalarNet, torc::generic::ScalarPortReference, torc::generic::SingleInstance, torc::generic::LogicalResponse, torc::generic::InstanceArrayMember, torc::generic::ParameterArrayElement, torc::generic::Event, torc::generic::VectorNetBit, torc::generic::VectorPortBit, torc::generic::Timing, torc::generic::ForbiddenEvent, torc::generic::VectorPortBitReference, and torc::generic::Apply.
|
inlineinherited |
Apply action on all properties.
[in] | action | Action to be applied |
Definition at line 113 of file PropertyContainer.hpp.
|
virtual |
Set master port.
[in] | inMaster | Set the master port. |
Set master port.
[in] | inSource | Set the master port. |
Reimplemented in torc::generic::VectorPortReference, and torc::generic::PortBundleReference.
Definition at line 45 of file PortReference.cpp.
|
pure virtualinherited |
Connect a Net to this object.
[in] | inNet | A pointer to the Net object that needs to be Connected |
Connect a Net to this object.
[in] | inNet | A pointer to the Net object that eeds to be Connected |
Implemented in torc::generic::VectorPortReference, torc::generic::PortBundleReference, torc::generic::VectorNet, torc::generic::PortBundle, torc::generic::NetBundle, torc::generic::VectorPort, torc::generic::ScalarPort, torc::generic::ScalarNet, torc::generic::ScalarPortReference, torc::generic::PortList, torc::generic::VectorNetBit, torc::generic::VectorPortBit, and torc::generic::VectorPortBitReference.
Definition at line 60 of file Connectable.cpp.
|
pure virtualinherited |
Disconnect a Net from this object.
[in] | inConnection | A connection as returned by the connect() method |
Error | Provided connection is invalid |
Implemented in torc::generic::VectorPortReference, torc::generic::PortBundleReference, torc::generic::PortBundle, torc::generic::VectorNet, torc::generic::VectorPort, torc::generic::NetBundle, torc::generic::ScalarPort, torc::generic::ScalarNet, torc::generic::ScalarPortReference, torc::generic::PortList, torc::generic::VectorNetBit, torc::generic::VectorPortBit, and torc::generic::VectorPortBitReference.
Definition at line 83 of file Connectable.cpp.
|
inherited |
Disconnect the named Net from this object.
[in] | inName | Name of the net to be Disconnected |
Error | Provided net was not found |
Disconnect the named Net from this object.
[in] | inNname | Name of the net to be Disconnected |
Error | Provided net was not found |
Definition at line 111 of file Connectable.cpp.
|
inherited |
Disconnect the given Net from this object.
[in] | net | Pointer to a net |
Error | Provided net was not found |
Disconnect the given Net from this object.
[in] | inNet | Pointer to a net |
Error | Provided net was not found |
Definition at line 128 of file Connectable.cpp.
|
virtualinherited |
Disconnect all connections to this port.
Reimplemented in torc::generic::Net, torc::generic::VectorNet, and torc::generic::NetBundle.
Definition at line 132 of file Connectable.cpp.
|
pure virtualinherited |
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. |
Error | Index dimensions mismatch |
Implemented in torc::generic::Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true >, torc::generic::Bundle< PortReference >, torc::generic::VectorBit< PortReference >, and torc::generic::Scalar< PortReference >.
|
inline |
Get the attributes of the port. Attributes include dcFaninLoad, dcFanoutLoad_ etc.
Definition at line 123 of file PortReference.hpp.
|
pure virtualinherited |
Get children of this composition.
[out] | outChildren | A list of all children for this composition |
Implemented in torc::generic::Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true >, torc::generic::Bundle< PortReference >, torc::generic::Scalar< PortReference >, and torc::generic::VectorBit< PortReference >.
|
pure virtualinherited |
Get the type of this composition.
Implemented in torc::generic::Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true >, torc::generic::Bundle< PortReference >, torc::generic::VectorBit< PortReference >, and torc::generic::Scalar< PortReference >.
|
virtualinherited |
Get the vector of Nets that are Connected to the current object. The connected elements are appended to the given vector
[out] | outNets | A vector of Connected nets |
Get the vector of Nets that are Connected to the current object. The connected elements are appended to the given vector
Reimplemented in torc::generic::VectorPortReference, torc::generic::VectorNet, torc::generic::VectorPort, torc::generic::VectorNetBit, torc::generic::VectorPortBit, and torc::generic::VectorPortBitReference.
Definition at line 45 of file Connectable.cpp.
|
inline |
Get the master(referred) port.
Definition at line 114 of file PortReference.hpp.
std::string torc::generic::PortReference::getName | ( | void | ) |
Get name of port-ref. This will return the same name as the master.
Definition at line 52 of file PortReference.cpp.
|
inlineinherited |
Get a pointer to the parent object
|
inlinevirtualinherited |
Get a pointer to the parent collection
|
inlineinherited |
Get the map of all properties
[out] | outProperties | The map of properties |
Get the map of all properties
Definition at line 107 of file PropertyContainer.hpp.
|
inherited |
Get a property
[in] | inName | Name of the property to be retreived |
Get a property
[in] | name | Name of the property to be retreived |
Definition at line 37 of file PropertyContainer.cpp.
|
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 |
|
pure virtualinherited |
Get the total number of bits of the composition
Implemented in torc::generic::Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true >, torc::generic::Bundle< PortReference >, torc::generic::VectorBit< PortReference >, and torc::generic::Scalar< PortReference >.
|
protectedvirtualinherited |
A polymorphic function that is called after a net is Connected to this object
Definition at line 144 of file Connectable.cpp.
|
protectedvirtualinherited |
A polymorphic function that is called after a net is Disconnected from this object
Definition at line 149 of file Connectable.cpp.
|
private |
void torc::generic::PortReference::setAttributes | ( | const PortAttributesSharedPtr & | inSource | ) |
Set the attributes of the port. Attributes include dcFaninLoad, dcFanoutLoad_ etc.
[in] | inSource | Pointer to PortAttributes object. |
Definition at line 49 of file PortReference.cpp.
|
virtualinherited |
Set a pointer to the parent
[in] | inSource | Set a pointer to the parent |
|
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) |
|
inherited |
Set the map of properties
[in] | inSource | The map of properties |
Definition at line 66 of file PropertyContainer.cpp.
|
inherited |
Save the inSource of a property
[in] | inName | Name of the property to be saved |
[in] | inProperty | Pointer to the property object if present, empty pointer otherwise. |
Save the inSource of a property
[in] | inName | Name of the property to be saved |
[in] | inPoperty | Pointer to the property object if present, empty pointer otherwise. |
Definition at line 53 of file PropertyContainer.cpp.
|
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 |
|
inlineinherited |
A signal to indicate that a new connection has been made
Definition at line 167 of file Connectable.hpp.
|
inlineinherited |
A signal to indicate that a new connection has been made
Definition at line 174 of file Connectable.hpp.
|
private |
Definition at line 106 of file PortReference.hpp.
|
private |
Definition at line 105 of file PortReference.hpp.