class Gambit::DescriptionDatabase
[No description available] More…
#include <yaml_description_database.hpp>
Public Functions
Name | |
---|---|
template <typename… args> bool | hasKey(const args &… keys) const |
template <typename TYPE ,typename… args> TYPE | getValue(const args &… keys) const |
DescriptionDatabase() Default constructor. | |
DescriptionDatabase(const str & filename) Construct from file. | |
DescriptionDatabase(const YAML::Node & descriptions) Copy constructor. | |
DescriptionDatabase(YAML::Node && descriptions) Move constructor. | |
template <typename… args> void | loadFile(const str & filename) Load descriptions from file. |
std::map< str, int > | check_for_duplicates() Check ‘descriptions’ for duplicate keys. |
std::vector< str > | get_all_values(str key) Return vector of descriptions matching key (for retrieving values with non-unique keys) |
Detailed Description
class Gambit::DescriptionDatabase;
A small wrapper object for ‘description database’ nodes. The descriptions are extracted from, e.g., capabilities.dat
Public Functions Documentation
function hasKey
template <typename... args>
inline bool hasKey(
const args &... keys
) const
Getters for key/value pairs (which is all the options node should contain)
function getValue
template <typename TYPE ,
typename... args>
inline TYPE getValue(
const args &... keys
) const
function DescriptionDatabase
DescriptionDatabase()
Default constructor.
Member functions for DescriptionDatabase class.
Default constructor
function DescriptionDatabase
DescriptionDatabase(
const str & filename
)
Construct from file.
function DescriptionDatabase
DescriptionDatabase(
const YAML::Node & descriptions
)
Copy constructor.
function DescriptionDatabase
DescriptionDatabase(
YAML::Node && descriptions
)
Move constructor.
function loadFile
template <typename... args>
inline void loadFile(
const str & filename
)
Load descriptions from file.
function check_for_duplicates
std::map< str, int > check_for_duplicates()
Check ‘descriptions’ for duplicate keys.
function get_all_values
std::vector< str > get_all_values(
str key
)
Return vector of descriptions matching key (for retrieving values with non-unique keys)
Updated on 2024-07-18 at 13:53:30 +0000