torc-master
|
An object that is connectable to a Net. More...
#include <Connectable.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 |
Public Member Functions | |
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) |
Protected Member Functions | |
virtual void | onConnect () throw (Error) |
virtual void | onDisconnect () throw (Error) |
Connectable () | |
virtual | ~Connectable () throw () |
Private Member Functions | |
Connectable (const Connectable &rhs) | |
Connectable & | operator= (const Connectable &rhs) |
Private Attributes | |
std::list< NetSharedPtr > | mConnectedNets |
Connected | mSigNetConnected |
Disconnected | mSigNetDisconnected |
An object that is connectable to a Net.
The Connectable class can act as a base for objects that can connect to a Net. This interface provides event functionality for connection and disconnection. It also provides polymorphic methods to implement connectivity beween different components in a design.
Definition at line 44 of file Connectable.hpp.
typedef boost::signals2::signal<void(const NetSharedPtr&)> torc::generic::Connectable::Connected |
A signal to indicate that a new connection has been made
Definition at line 57 of file Connectable.hpp.
typedef std::list<NetSharedPtr>::iterator torc::generic::Connectable::Connection |
A connection between a net and this object
Definition at line 52 of file Connectable.hpp.
typedef boost::signals2::signal<void(const NetSharedPtr&)> torc::generic::Connectable::Disconnected |
A signal to indicate that a connection has been removed
Definition at line 62 of file Connectable.hpp.
|
protected |
Definition at line 151 of file Connectable.cpp.
|
protectedvirtual |
Definition at line 153 of file Connectable.cpp.
|
private |
|
pure virtual |
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 virtual |
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.
void torc::generic::Connectable::disconnect | ( | const std::string & | inName | ) | |
throw | ( | Error | |||
) |
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.
void torc::generic::Connectable::disconnect | ( | const NetSharedPtr & | inNet | ) | |
throw | ( | Error | |||
) |
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.
|
virtual |
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.
|
virtual |
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.
|
protectedvirtual |
A polymorphic function that is called after a net is Connected to this object
Definition at line 144 of file Connectable.cpp.
|
protectedvirtual |
A polymorphic function that is called after a net is Disconnected from this object
Definition at line 149 of file Connectable.cpp.
|
private |
|
inline |
A signal to indicate that a new connection has been made
Definition at line 167 of file Connectable.hpp.
|
inline |
A signal to indicate that a new connection has been made
Definition at line 174 of file Connectable.hpp.
|
private |
Definition at line 159 of file Connectable.hpp.
|
private |
Definition at line 160 of file Connectable.hpp.
|
private |
Definition at line 161 of file Connectable.hpp.