ROOM » Core » C++ Classes » Term

Term Class

Reference for room::Term. More…

Header:#include "term.h"
CMake:target_link_libraries(mytarget PRIVATE ROOM::room)

Public Functions

Term(std::string name, std::uint32_t layerId, Point position)Constructs a terminal (pin) on a net.
const std::string & name() constReturns the terminal name.
std::uint32_t layerId() constReturns the layer index associated with this terminal.
const Point & position() constReturns the pin location.

Detailed Description

Member Function Documentation

Term(std::string name, std::uint32_t layerId, Point position)

Constructs a terminal (pin) on a net.

ParameterDescription
nameTerminal or pin name (for example "A" or "VDD").
layerIdLayer index into Lib::layers(), same convention as Shape.
positionPin location in database units (DBU).

const std::string & name() const

Returns the terminal name.

Returns: Pin name string.

std::uint32_t layerId() const

Returns the layer index associated with this terminal.

Returns: Index into the parent view's layer table.

const Point & position() const

Returns the pin location.

Returns: Position in DBU as a Point.

Example

room::Term pinA("A", 0, {100, 200});
room::Term pinY("Y", 0, {500, 200});

room::Net net("N1");
net.terms().push_back(pinA);
net.terms().push_back(pinY);