Junction Diagram Automation Suite 1.2.0
An AutoCAD 2024 plugin for the manipulation and generation of junction box wiring diagrams
Loading...
Searching...
No Matches
Device Class Reference

Represents a device within the Junction Diagram Automation Suite. More...

#include <Device.h>

Public Member Functions

 Device (std::string combinedTag, int footprint)
 Construct a Device object with combined tag and footprint.
void draw (AcGePoint3d origin, bool flip) const
 Draw the device starting from a given origin.
std::string getTag () const
 Retrieve the device's tag.
std::string getNumber () const
 Retrieve the device's number or identifier.
std::string getCombinedTag () const
 Retrieve the combined tag and number for the device.
int getTerminalFootprint () const
 Get the terminal footprint of the device.
bool operator< (const Device &rhs) const
 Compare this device with another based on their combined tags.

Static Public Member Functions

static int footprintFromCells (const std::string &combinedTag, const std::string &instrumentSpec)
 Calculate and return the footprint from a combined tag and instrument specification.

Detailed Description

Represents a device within the Junction Diagram Automation Suite.

The Device class encapsulates information about a device, including its tag, number, and footprint characteristics. It provides methods to retrieve these details as well as utility functions for processing device data.

Constructor & Destructor Documentation

◆ Device()

Device::Device ( std::string combinedTag,
int footprint )

Construct a Device object with combined tag and footprint.

Parameters
combinedTagA string that combines both tag and number (e.g., "R123").
footprintThe footprint value representing the number of terminals.

Member Function Documentation

◆ draw()

void Device::draw ( AcGePoint3d origin,
bool flip ) const

Draw the device starting from a given origin.

Parameters
originThe starting point for drawing.
flipDirection of the device. true if the cable should be drawn to the right instead of to the left, false otherwise.

◆ footprintFromCells()

int Device::footprintFromCells ( const std::string & combinedTag,
const std::string & instrumentSpec )
static

Calculate and return the footprint from a combined tag and instrument specification.

Parameters
combinedTagA string that combines both tag and number (e.g., "LSLL 100A").
instrumentSpecAdditional specification of the instrument (e.g., "ULTRASONICE SW").
Returns
The calculated footprint as an integer representing terminal connections.

◆ getCombinedTag()

std::string Device::getCombinedTag ( ) const

Retrieve the combined tag and number for the device.

Returns
A string that combines both tag and number (e.g., "SDV 60A").

◆ getNumber()

std::string Device::getNumber ( ) const

Retrieve the device's number or identifier.

Returns
A string representing the specific number of the device.

◆ getTag()

std::string Device::getTag ( ) const

Retrieve the device's tag.

Returns
A string representing the device's tag (e.g., "SDV" for Shutdown Valve).

◆ getTerminalFootprint()

int Device::getTerminalFootprint ( ) const

Get the terminal footprint of the device.

Returns
The integer value representing the number of terminals.

◆ operator<()

bool Device::operator< ( const Device & rhs) const

Compare this device with another based on their combined tags.

Parameters
rhsRight-hand side Device object for comparison.
Returns
True if this device is considered less than rhs, otherwise false.

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