opatIO-cpp 0.3.0a
Open Parametrized Array Table
Loading...
Searching...
No Matches
opat::TableIndex Struct Reference

Structure to hold the index of tables within a DataCard. More...

#include <opatIO.h>

Public Member Functions

const TableIndexEntryget (const std::string &tag) const
 Retrieves a TableIndexEntry by tag.
 
const TableIndexEntryoperator[] (const std::string &tag) const
 Accesses a TableIndexEntry by tag.
 

Public Attributes

std::unordered_map< std::string, TableIndexEntrytableIndex
 Map of table tags to index entries.
 

Friends

std::ostream & operator<< (std::ostream &os, const TableIndex &index)
 Stream insertion operator for printing the table index.
 

Detailed Description

Structure to hold the index of tables within a DataCard.

The TableIndex maps table tags to their corresponding TableIndexEntry, enabling fast lookups within one datacard.

Member Function Documentation

◆ get()

const TableIndexEntry & opat::TableIndex::get ( const std::string & tag) const
nodiscard

Retrieves a TableIndexEntry by tag.

Parameters
tagThe tag of the table to retrieve.
Returns
A constant reference to the TableIndexEntry.
Exceptions
std::out_of_rangeif the tag is not found.

◆ operator[]()

const TableIndexEntry & opat::TableIndex::operator[] ( const std::string & tag) const

Accesses a TableIndexEntry by tag.

Parameters
tagThe tag of the table to access.
Returns
A constant reference to the TableIndexEntry.
Exceptions
std::out_of_rangeif the tag is not found.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const TableIndex & index )
friend

Stream insertion operator for printing the table index.

Parameters
osOutput stream.
indexTableIndex to print.
Returns
Reference to the output stream.

Member Data Documentation

◆ tableIndex

std::unordered_map<std::string, TableIndexEntry> opat::TableIndex::tableIndex

Map of table tags to index entries.


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