OpenASIP
2.0
|
#include <Connection.hh>
Public Member Functions | |
Connection (Socket &socket, Segment &bus) | |
~Connection () | |
Segment * | bus () const |
Socket * | socket () const |
ObjectState * | saveState () const |
Static Public Attributes | |
static const std::string | OSNAME_CONNECTION = "connection" |
ObjectState name for Connection. More... | |
static const std::string | OSKEY_SOCKET = "socket" |
ObjectState attribute key for socket name. More... | |
static const std::string | OSKEY_BUS = "bus" |
ObjectState attribute key for bus name. More... | |
static const std::string | OSKEY_SEGMENT = "segment" |
ObjectState attribute key for segment name. More... | |
Private Attributes | |
Socket * | socket_ |
Socket which is connected to the bus. More... | |
Segment * | bus_ |
Bus which is connected to the socket. More... | |
Joins Bus and Socket objects if they are connected in the machine.
Definition at line 48 of file Connection.hh.
TTAMachine::Connection::~Connection | ( | ) |
Destructor.
If Connection object still joins a socket and a segment, they are detached before destructing the Connection object.
Definition at line 68 of file Connection.cc.
References assert, bus_, TTAMachine::Socket::detachBus(), TTAMachine::Segment::isConnectedTo(), TTAMachine::Socket::isConnectedTo(), and socket_.
Segment* TTAMachine::Connection::bus | ( | ) | const |
Referenced by ConnectionSweeper::removeConnection(), and saveState().
ObjectState * TTAMachine::Connection::saveState | ( | ) | const |
Saves its state to an ObjectState instance.
Definition at line 85 of file Connection.cc.
References bus(), OSKEY_BUS, OSKEY_SEGMENT, OSKEY_SOCKET, OSNAME_CONNECTION, ObjectState::setAttribute(), and socket().
Referenced by TTAMachine::Socket::saveState().
Socket* TTAMachine::Connection::socket | ( | ) | const |
|
private |
Bus which is connected to the socket.
Definition at line 70 of file Connection.hh.
Referenced by ~Connection().
|
static |
ObjectState attribute key for bus name.
Definition at line 62 of file Connection.hh.
Referenced by TTAMachine::Socket::loadState(), and saveState().
|
static |
ObjectState attribute key for segment name.
Definition at line 64 of file Connection.hh.
Referenced by TTAMachine::Socket::loadState(), and saveState().
|
static |
ObjectState attribute key for socket name.
Definition at line 60 of file Connection.hh.
Referenced by saveState().
|
static |
ObjectState name for Connection.
Definition at line 58 of file Connection.hh.
Referenced by TTAMachine::Socket::loadState(), and saveState().
|
private |
Socket which is connected to the bus.
Definition at line 68 of file Connection.hh.
Referenced by ~Connection().