Bitstream Interpretation Library (BIL)
0.1
|
A connection to a wire on a tile. More...
#include <xdlrc/model/WireConnection.hpp>
Public Member Functions | |
WireConnection () | |
Constructs a new WireConnection instance. | |
void | xOffset (short offset) |
Sets x offset to destination site. | |
short | xOffset () const |
Gets x offset to destination site. | |
void | yOffset (short offset) |
Sets y offset to destination site. | |
short | yOffset () const |
Gets y offset to destination site. | |
void | tileTypeIndex (unsigned short index) |
Sets index of destination TileType. | |
unsigned short | tileTypeIndex () const |
Gets index of destination TileType. | |
void | wireIndex (unsigned short index) |
Sets index of destination wire. | |
unsigned short | wireIndex () const |
Gets index of destination wire. | |
void | clear () |
Resets all properties to default values. |
Friends | |
bool | operator== (const WireConnection &c1, const WireConnection &c2) |
Tests two WireConnection instances for memberwise equality. | |
void | writeBinary (const WireConnection &data, std::ostream &outputStream) |
Writes data from a WireConnection into a binary stream. | |
void | readBinary (WireConnection &data, std::istream &inputStream) |
Reads data into a WireConnection from a binary stream. |
A connection to a wire on a tile.
This class describes the destination of a connection: a distinct wire on a distinct tile. In an XDLRC file, these two are given by name. But this is changed in here to a more flexible representation that allows storing the WireConnections only per tile type (instead for every single tile!). The destination wire is given by indexing the wire list of the destination tile type; an index to this tile type is also stored. A coordinate pair measuring the distance from connection origin to destination site (sic!) tells about the spatial relationship. Since there is at most only one tile of a distinct type on a site, the destination tile is unambiguous.
Definition at line 29 of file WireConnection.hpp.
WireConnection::WireConnection | ( | ) |
Constructs a new WireConnection instance.
Definition at line 11 of file WireConnection.cpp.
void WireConnection::xOffset | ( | short | offset | ) |
Sets x offset to destination site.
offset | The new x offset. |
Definition at line 21 of file WireConnection.cpp.
short WireConnection::xOffset | ( | ) | const |
Gets x offset to destination site.
Definition at line 27 of file WireConnection.cpp.
void WireConnection::yOffset | ( | short | offset | ) |
Sets y offset to destination site.
offset | The new y offset. |
Definition at line 33 of file WireConnection.cpp.
short WireConnection::yOffset | ( | ) | const |
Gets y offset to destination site.
Definition at line 39 of file WireConnection.cpp.
void WireConnection::tileTypeIndex | ( | unsigned short | index | ) |
Sets index of destination TileType.
Definition at line 45 of file WireConnection.cpp.
unsigned short WireConnection::tileTypeIndex | ( | ) | const |
Gets index of destination TileType.
Definition at line 51 of file WireConnection.cpp.
void WireConnection::wireIndex | ( | unsigned short | index | ) |
Sets index of destination wire.
index | Index of wire in destination TileType. |
Definition at line 57 of file WireConnection.cpp.
unsigned short WireConnection::wireIndex | ( | ) | const |
Gets index of destination wire.
Definition at line 63 of file WireConnection.cpp.
void WireConnection::clear | ( | ) |
Resets all properties to default values.
Definition at line 69 of file WireConnection.cpp.
|
friend |
Tests two WireConnection instances for memberwise equality.
Definition at line 132 of file WireConnection.hpp.
|
friend |
Writes data from a WireConnection into a binary stream.
data | The WireConnection to write. |
outputStream | The stream to write into. |
. |
|
friend |
Reads data into a WireConnection from a binary stream.
data | The WireConnection to read into. |
inputStream | The stream to read from. |
. |