Structure to hold a DataCard, which contains multiple tables.
More...
#include <opatIO.h>
Structure to hold a DataCard, which contains multiple tables.
A DataCard includes metadata, a table index, and the actual table data.
◆ get()
const OPATTable & opat::DataCard::get |
( |
const std::string & | tag | ) |
const |
|
nodiscard |
Retrieves a table from the DataCard by tag.
- Parameters
-
tag | The tag of the table to retrieve. |
- Returns
- A constant reference to the OPATTable.
- Exceptions
-
std::out_of_range | if the tag is not found. |
◆ getKeys()
std::vector< std::string > opat::DataCard::getKeys |
( |
| ) |
const |
|
nodiscard |
Retrieves a list of all table tags (keys) present in this DataCard.
- Returns
- A vector of strings, where each string is a table tag.
Example:
std::vector<std::string> table_keys = data_card.getKeys();
for (const std::string& key : table_keys) {
std::cout << "Table found: " << key << std::endl;
}
Structure to hold the data of an OPAT table.
Definition opatIO.h:259
◆ operator[]() [1/3]
const OPATTable & opat::DataCard::operator[] |
( |
const char * | tag | ) |
const |
Accesses a table from the DataCard by tag (C-string version).
- Parameters
-
tag | The tag of the table to access. |
- Returns
- A constant reference to the OPATTable.
- Exceptions
-
std::out_of_range | if the tag is not found. |
◆ operator[]() [2/3]
const OPATTable & opat::DataCard::operator[] |
( |
const std::string & | tag | ) |
const |
Accesses a table from the DataCard by tag.
- Parameters
-
tag | The tag of the table to access. |
- Returns
- A constant reference to the OPATTable.
- Exceptions
-
std::out_of_range | if the tag is not found. |
◆ operator[]() [3/3]
const OPATTable & opat::DataCard::operator[] |
( |
std::string_view | tag | ) |
const |
Accesses a table from the DataCard by tag (string_view version).
- Parameters
-
tag | The tag of the table to access. |
- Returns
- A constant reference to the OPATTable.
- Exceptions
-
std::out_of_range | if the tag is not found. |
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const DataCard & | card ) |
|
friend |
Stream insertion operator for printing the DataCard.
- Parameters
-
- Returns
- Reference to the output stream.
◆ header
◆ tableData
std::unordered_map<std::string, OPATTable> opat::DataCard::tableData |
Map of table tags to their data.
◆ tableIndex
The documentation for this struct was generated from the following files: