#include <corenodes_helpers.h>
A PortId identifies a port of a core node or micro node (see CoreNodeBaseInterface ). It can be given either by a port name or by a port index. The subclasses InPortId and OutPortId have to be used unless the code shall be generic in the port direction.
公共成员函数 |
|
Bool | IsIndex () const |
Bool | IsName () const |
Bool | IsPopulated () const |
Bool | IsEmpty () const |
Int | GetIndex () const |
const Id & | GetName () const |
PORT_DIR | GetDirection () const |
PortId ( PORT_DIR dir, const Id &name) | |
PortId ( PORT_DIR dir, Int index) | |
PortId ( PORT_DIR dir) | |
String | ToString (const FormatStatement *fs=nullptr) const |
Protected Attributes |
|
Int | _indexDir |
Id | _name |
PortId | ( | PORT_DIR | dir , |
const Id & | name | ||
) |
Constructs a new PortId given by a port name.
[in] | dir | The port direction. |
[in] | name | The port name to use for the PortId . |
PortId | ( | PORT_DIR | dir , |
Int | index | ||
) |
Constructs a new PortId given by a port index.
[in] | dir | The port direction. |
[in] | index | The port index to use for the PortId . |
|
explicit |
Constructs an empty PortId of the given direction.
[in] | dir | The port direction. |
Bool IsIndex | ( | ) | const |
Checks if this PortId is given by an Int index.
Bool IsName | ( | ) | const |
Checks if this PortId is given by a name.
Bool IsPopulated | ( | ) | const |
Checks if this PortId has a name or an index. Note that in the case of a name it doesn't check if the name itself is non-empty.
Bool IsEmpty | ( | ) | const |
Checks if this PortId has neither a name nor an index.
Int GetIndex | ( | ) | const |
Returns the port index. This function must not be called if this PortId is given by a name.
const Id & GetName | ( | ) | const |
Returns the port name. This function must not be called if this PortId is given by an index.
PORT_DIR GetDirection | ( | ) | const |
Returns the direction of this PortId . PORT_DIR::INPUT stands for input ports, PORT_DIR::OUTPUT for output ports.
String ToString | ( | const FormatStatement * |
fs
=
nullptr
|
) | const |
Returns a String representation of this @CLASS.
[in] | formatStatement | Nullptr or additional formatting instruction. |
|
protected |
|
protected |