Bitstream Interpretation Library (BIL)  0.1
Public Member Functions | Friends
bil::WireConnection Class Reference

A connection to a wire on a tile. More...

#include <xdlrc/model/WireConnection.hpp>

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

WireConnection::WireConnection ( )

Constructs a new WireConnection instance.

Definition at line 11 of file WireConnection.cpp.


Member Function Documentation

void WireConnection::xOffset ( short  offset)

Sets x offset to destination site.

Parameters:
offsetThe new x offset.

Definition at line 21 of file WireConnection.cpp.

short WireConnection::xOffset ( ) const

Gets x offset to destination site.

Returns:
The x offset.

Definition at line 27 of file WireConnection.cpp.

void WireConnection::yOffset ( short  offset)

Sets y offset to destination site.

Parameters:
offsetThe new y offset.

Definition at line 33 of file WireConnection.cpp.

short WireConnection::yOffset ( ) const

Gets y offset to destination site.

Returns:
The y offset.

Definition at line 39 of file WireConnection.cpp.

void WireConnection::tileTypeIndex ( unsigned short  index)

Sets index of destination TileType.

Parameters:
indexIndex of TileType in corresponding Device.

Definition at line 45 of file WireConnection.cpp.

unsigned short WireConnection::tileTypeIndex ( ) const

Gets index of destination TileType.

Returns:
Index of TileType in corresponding Device.

Definition at line 51 of file WireConnection.cpp.

void WireConnection::wireIndex ( unsigned short  index)

Sets index of destination wire.

Parameters:
indexIndex of wire in destination TileType.

Definition at line 57 of file WireConnection.cpp.

unsigned short WireConnection::wireIndex ( ) const

Gets index of destination wire.

Returns:
Index of wire in destination TileType.

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.


Friends And Related Function Documentation

bool operator== ( const WireConnection c1,
const WireConnection c2 
)
friend

Tests two WireConnection instances for memberwise equality.

Definition at line 132 of file WireConnection.hpp.

void writeBinary ( const WireConnection data,
std::ostream &  outputStream 
)
friend

Writes data from a WireConnection into a binary stream.

Parameters:
dataThe WireConnection to write.
outputStreamThe stream to write into.
Exceptions:
.
void readBinary ( WireConnection data,
std::istream &  inputStream 
)
friend

Reads data into a WireConnection from a binary stream.

Parameters:
dataThe WireConnection to read into.
inputStreamThe stream to read from.
Exceptions:
.

The documentation for this class was generated from the following files: