torc-master
|
Represents an ordered list of port references. More...
#include <PortList.hpp>
Data Structures | |
class | Factory |
Public Types | |
typedef PortElement | PortListElement |
typedef VisitorType< PortList > | Visitor |
typedef std::list < NetSharedPtr >::iterator | Connection |
typedef boost::signals2::signal< void(const NetSharedPtr &)> | Connected |
typedef boost::signals2::signal< void(const NetSharedPtr &)> | Disconnected |
typedef PortList | Type |
typedef boost::shared_ptr< Type > | Pointer |
typedef boost::weak_ptr< Type > | WeakPointer |
Public Member Functions | |
virtual void | accept (BaseVisitor &inoutVisitor) throw (Error) |
virtual Connection | connect (const NetSharedPtr &inNet) throw (Error) |
virtual void | disconnect (const Connection &inConnection) throw (Error) |
size_t | getSize () const |
void | addChildPort (const PortSharedPtr &inPort) |
void | addChildPortReference (const PortReferenceSharedPtr &inPortRef) |
void | getChildren (std::list< PortListElement > &outPorts) |
virtual | ~PortList () throw () |
Connected & | signalNetConnected () |
Disconnected & | signalNetDisconnected () |
virtual void | getConnectedNets (std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const throw (Error) |
void | disconnect (const std::string &inName) throw (Error) |
void | disconnect (const NetSharedPtr &net) throw (Error) |
virtual void | disconnect () throw (Error) |
void | setWeakThis (const WeakPointer &inWeakThis) |
Pointer | getSharedThis () const |
Protected Member Functions | |
PortList () | |
virtual void | onConnect () throw (Error) |
virtual void | onDisconnect () throw (Error) |
Private Member Functions | |
template<typename _Tp > | |
void | connectElementToNet (const NetSharedPtr &inNet, const boost::shared_ptr< _Tp > &inType, size_t &inoutCurrentWidth) throw (Error) |
Private Attributes | |
std::list< PortListElement > | mElements |
Friends | |
class | FactoryType< PortList > |
Represents an ordered list of port references.
The PortList class represents an ordered list of port references. Such objects in EDIF are declard using the (portList portRefName1 portRefName2 ... ) syntax.
Definition at line 43 of file PortList.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 |
Definition at line 36 of file SelfReferencing.hpp.
Definition at line 51 of file PortList.hpp.
|
inherited |
Definition at line 35 of file SelfReferencing.hpp.
Definition at line 53 of file PortList.hpp.
|
inherited |
Definition at line 37 of file SelfReferencing.hpp.
|
virtual |
Definition at line 217 of file PortList.cpp.
|
protected |
Definition at line 215 of file PortList.cpp.
|
virtual |
Receive a visitor to this class. The visit method of the visitor 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 visitor specialization. See Visitor documentation for more details.
[in,out] | inoutVisitor | A reference to the visitor object |
Error | Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method. |
Definition at line 65 of file PortList.cpp.
void torc::generic::PortList::addChildPort | ( | const PortSharedPtr & | inPort | ) |
Add a port to the port list.
[in] | inPort | Pointer to port to be added. |
Definition at line 203 of file PortList.cpp.
void torc::generic::PortList::addChildPortReference | ( | const PortReferenceSharedPtr & | inPortRef | ) |
Add a port reference to the port list.
[in] | inPortRef | Pointer to port reference to be added. |
Definition at line 207 of file PortList.cpp.
|
virtual |
Connect a Net to this object.
[in] | inNet | A pointer to the Net object that needs to be connected |
Implements torc::generic::Connectable.
Definition at line 140 of file PortList.cpp.
|
private |
Definition at line 74 of file PortList.cpp.
|
virtual |
Disconnect a Net from this object.
[in] | inConnection | A connection as returned by the connect() method |
Error | Provided connection is invalid |
Implements torc::generic::Connectable.
Definition at line 171 of file PortList.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.
void torc::generic::PortList::getChildren | ( | std::list< PortListElement > & | outPorts | ) |
Get all the children of this composition
Definition at line 211 of file PortList.cpp.
|
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.
|
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 |
size_t torc::generic::PortList::getSize | ( | void | ) | const |
Get the total number of bits of the composition
Definition at line 185 of file PortList.cpp.
|
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.
|
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.
|
friend |
Definition at line 48 of file PortList.hpp.
|
private |
Definition at line 145 of file PortList.hpp.