![]() |
Junction Diagram Automation Suite 1.2.0
An AutoCAD 2024 plugin for the manipulation and generation of junction box wiring diagrams
|
Represents a cable with specific attributes and devices connected to it. More...
#include <Cable.h>
Public Member Functions | |
Cable (CableType cableType, SystemType sysType, IOType ioType) | |
Construct a Cable object with specified types. | |
void | draw (AcGePoint3d origin, int terminalNumber, bool flip, const wchar_t *junctionTag, int tableNumber) const |
Draw the cable starting from a given origin. | |
void | addDevice (Device device) |
Add a device to the cable's list of connected devices. | |
CableType | getCableType () const |
Get the type of this cable. | |
SystemType | getSystemType () const |
Get the system type associated with this cable. | |
IOType | getIOType () const |
Get the input/output type of this cable. | |
std::vector< Device > | getDevices () const |
Get all devices connected to this cable. | |
int | getTerminalFootprint () const |
Calculate and return the terminal footprint count. | |
Device | operator[] (int index) const |
Access a device by index from the list of connected devices. | |
bool | operator< (const Cable &rhs) const |
Compare this cable with another based on the following criteria: |
Static Public Member Functions | |
static CableType | getWireTypeFromCell (const std::string &cell) |
Determine the CableType from a given cell string identifier. | |
static SystemType | getSystemTypeFromCell (const std::string &cell) |
Determine the SystemType from a given cell string identifier. | |
static IOType | getIOTypeFromCell (const std::string &cell) |
Determine the IOType from a given cell string identifier. |
Represents a cable with specific attributes and devices connected to it.
The Cable class encapsulates information about a cable including its type, system usage, input/output characteristics, and the devices it connects to.
Cable::Cable | ( | CableType | cableType, |
SystemType | sysType, | ||
IOType | ioType ) |
Construct a Cable object with specified types.
cableType | Type of the cable. |
sysType | System type (e.g., SAFETY or CONTROL). |
ioType | Input/output type (e.g., DIGITAL or ANALOG). |
void Cable::addDevice | ( | Device | device | ) |
Add a device to the cable's list of connected devices.
device | Device object to be added. |
void Cable::draw | ( | AcGePoint3d | origin, |
int | terminalNumber, | ||
bool | flip, | ||
const wchar_t * | junctionTag, | ||
int | tableNumber ) const |
Draw the cable starting from a given origin.
origin | The starting point for drawing. |
terminalNumber | The number of the first terminal the cable connects to (from top to bottom). |
flip | Direction of the cable. true if the cable should be drawn to the right instead of to the left, false otherwise. |
junctionTag | Tag of the junction box this cable is attached to. Used for creating field tags. |
tableNumber | Number indicating which table this cable is attached to (e.g., 1 for TB1). |
CableType Cable::getCableType | ( | ) | const |
Get the type of this cable.
std::vector< Device > Cable::getDevices | ( | ) | const |
Get all devices connected to this cable.
IOType Cable::getIOType | ( | ) | const |
Get the input/output type of this cable.
|
static |
SystemType Cable::getSystemType | ( | ) | const |
Get the system type associated with this cable.
|
static |
Determine the SystemType from a given cell string identifier.
cell | A string representing the cell information. |
int Cable::getTerminalFootprint | ( | ) | const |
Calculate and return the terminal footprint count.
|
static |
bool Cable::operator< | ( | const Cable & | rhs | ) | const |
Compare this cable with another based on the following criteria:
rhs | Right-hand side Cable object for comparison. |
Device Cable::operator[] | ( | int | index | ) | const |
Access a device by index from the list of connected devices.
index | Index of the device to access. |