QtCraft API C++ classes QML types Handbook

QcSignalTable Class

The QcSignalState of every block state of a content, indexed by block state id, and the states circuits switch to. More...

Header: #include <server/signal/QcSignalTable.h>

Public Functions

const QcSignalState &at(QcBlockId id) const
const QcContentRegistry &content() const
QcBlockId counterpartOf(QcBlockId id) const
QcBlockId dustState(QcBlockId dust, int power, std::array<QcDustSide, 4> sides) const
QcBlockId withFlag(QcBlockId id, const QString &property, bool value) const

Static Public Members

const std::array<QcBlockFace, 4> horizontal
int horizontalIndex(QcBlockFace face)

Detailed Description

Member Function Documentation

const QcSignalState &QcSignalTable::at(QcBlockId id) const

Returns the signal state of id; one of no kind for an unknown id.

const QcContentRegistry &QcSignalTable::content() const

Returns the content the table was decoded from.

QcBlockId QcSignalTable::counterpartOf(QcBlockId id) const

Returns the state of the counterpart of id's block (lit and dark torch or lamp) with the same property values, or id when the block has none.

QcBlockId QcSignalTable::dustState(QcBlockId dust, int power, std::array<QcDustSide, 4> sides) const

Returns the dust state of dust (any state of it) with strength power and sides.

[static] int QcSignalTable::horizontalIndex(QcBlockFace face)

Returns the index of face in horizontal, or -1 for up and down.

QcBlockId QcSignalTable::withFlag(QcBlockId id, const QString &property, bool value) const

Returns id with property set to the boolean value.

Member Variable Documentation

const std::array<QcBlockFace, 4> QcSignalTable::horizontal

North, east, south and west, the order of QcSignalState::sides.