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.h
Go to the documentation of this file.
1
14
15#pragma once
16
17#include <string>
18
19#include "actrans.h"
20
21#include "helpers.h"
22
31class Device
32{
33private:
34 std::string _tag;
35 std::string _number;
36 int _footprint;
37
38public:
45 Device(std::string combinedTag, int footprint);
46
53 void draw(AcGePoint3d origin, bool flip) const;
54
55 /* ----- Setters ----- */
56
57 /* ----- Getters ----- */
58
64 std::string getTag() const;
65
71 std::string getNumber() const;
72
78 std::string getCombinedTag() const;
79
85 int getTerminalFootprint() const;
86
87 /* ----- Helpers ----- */
88
96 static int footprintFromCells(const std::string& combinedTag, const std::string& instrumentSpec);
97
98 /* ----- Operators ----- */
99
106 bool operator<(const Device& rhs) const;
107};
static int footprintFromCells(const std::string &combinedTag, const std::string &instrumentSpec)
Calculate and return the footprint from a combined tag and instrument specification.
Definition Device.cpp:110
bool operator<(const Device &rhs) const
Compare this device with another based on their combined tags.
Definition Device.cpp:132
std::string getCombinedTag() const
Retrieve the combined tag and number for the device.
Definition Device.cpp:102
void draw(AcGePoint3d origin, bool flip) const
Draw the device starting from a given origin.
Definition Device.cpp:28
int getTerminalFootprint() const
Get the terminal footprint of the device.
Definition Device.cpp:106
std::string getTag() const
Retrieve the device's tag.
Definition Device.cpp:94
std::string getNumber() const
Retrieve the device's number or identifier.
Definition Device.cpp:98
Device(std::string combinedTag, int footprint)
Construct a Device object with combined tag and footprint.
Definition Device.cpp:21
Interface for helper functions related to database operations.