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

Parses and manages IO and cable data from an Excel file. More...

#include <IOList.h>

Public Member Functions

 IOList (std::string xlPath)
 Construct a new IOList from a path to an Excel file.
 ~IOList ()
 Destroy the IOList object.
std::vector< std::string > GetTags () const
 Returns all parsed junction box tags.
JBoxGetJBox (std::string junctionTag) const
 Returns a pointer to the JBox corresponding to a given tag.
JBoxGetJBox (int index) const
 Returns a pointer to the JBox at the specified index.
int GetNumJBoxes () const
 Returns the number of junction boxes in this list.

Detailed Description

Parses and manages IO and cable data from an Excel file.

The IOList class reads an Excel workbook containing IO list and cable schedule data, extracts unique junction tags, and builds a list of JBox objects with their corresponding cables and devices.

Constructor & Destructor Documentation

◆ IOList()

IOList::IOList ( std::string xlPath)

Construct a new IOList from a path to an Excel file.

Opens and validates the specified Excel file, then loads all junction box tags and builds the corresponding JBox objects.

Parameters
xlPathPath to the Excel file.
Exceptions
std::exceptionIf the file couldn't be opened.
std::runtime_errorIf the Excel file is an invalid IOList or has missing data.

◆ ~IOList()

IOList::~IOList ( )

Destroy the IOList object.

Closes the Excel file and deletes all dynamically allocated JBox objects.

Member Function Documentation

◆ GetJBox() [1/2]

JBox * IOList::GetJBox ( int index) const

Returns a pointer to the JBox at the specified index.

Parameters
indexThe index of the desired junction box.
Returns
JBox* Pointer to the JBox object.
Exceptions
std::out_of_rangeIf the index is invalid.

◆ GetJBox() [2/2]

JBox * IOList::GetJBox ( std::string junctionTag) const

Returns a pointer to the JBox corresponding to a given tag.

Parameters
junctionTagThe tag of the junction box to retrieve.
Returns
JBox* Pointer to the JBox object, or nullptr if not found.

◆ GetNumJBoxes()

int IOList::GetNumJBoxes ( ) const

Returns the number of junction boxes in this list.

Returns
int Number of junction boxes.

◆ GetTags()

std::vector< std::string > IOList::GetTags ( ) const

Returns all parsed junction box tags.

Returns
std::vector<std::string> A list of all junction box tags found in the Excel file.

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