1#ifndef HYPERISO_LHA_BLOCKS_H
2#define HYPERISO_LHA_BLOCKS_H
37 std::vector<std::shared_ptr<AbstractElement>> entries;
60 void readData(
const std::vector<std::vector<std::string>>& lines);
112 const std::vector<std::shared_ptr<AbstractElement>>*
getEntries()
const;
124 void addElement(
const std::vector<std::string>& line);
161 std::shared_ptr<DBNode>
toDBNode()
const;
Abstract base class for a single element of an LHA/FLHA block.
Represents an LHA/FLHA block with multiple typed elements.
LhaBlock(const Prototype &prototype_)
Constructs an LhaBlock using a specified prototype.
Prototype getPrototype()
Returns the Prototype associated with this block.
~LhaBlock()
Destructor for LhaBlock.
std::string toString() const
Serializes the block and all its entries to a string.
AbstractElement * get(const LhaID &id) const
Retrieves an element by its identifier.
bool hasElement(const std::vector< long > &id) const
Convenience overload: checks presence from raw ID parts.
AbstractElement * get(const std::vector< long > &id) const
Convenience overload: retrieves an element from raw ID parts.
const std::vector< std::shared_ptr< AbstractElement > > * getEntries() const
Returns a read-only view of all entries in the block.
bool hasElement(const LhaID &id) const
Checks whether an element is present in the block.
void addElement(const std::vector< std::string > &line)
Adds a new element to the block from a line of data.
void readData(const std::vector< std::vector< std::string > > &lines)
Reads data and populates the block with elements from raw lines.
std::shared_ptr< DBNode > toDBNode() const
Converts the block and its entries to a DBNode representation.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Represents the structure of an LHA block, specifying columns for values, scales, and renormalization ...