Class podio::DatamodelDefinitionHolder

class DatamodelDefinitionHolder

Helper class to hold and provide the datamodel (JSON) definitions for reader classes.

Public Types

using MapType = std::vector<std::tuple<std::string, std::string>>

The “map” type that is used internally.

Public Functions

inline DatamodelDefinitionHolder(MapType &&definitions)

Constructor from an existing collection of names and datamodel definitions.

DatamodelDefinitionHolder() = default
~DatamodelDefinitionHolder() = default
DatamodelDefinitionHolder(const DatamodelDefinitionHolder&) = delete
DatamodelDefinitionHolder &operator=(const DatamodelDefinitionHolder&) = delete
DatamodelDefinitionHolder(DatamodelDefinitionHolder&&) = default
DatamodelDefinitionHolder &operator=(DatamodelDefinitionHolder&&) = default
const std::string_view getDatamodelDefinition(const std::string &name) const

Get the datamodel definition for the given datamodel name.

Returns an empty model definition if no model is stored under the given name.

Parameters:

name – The name of the datamodel

std::vector<std::string> getAvailableDatamodels() const

Get all names of the datamodels that have been read from file.