Version: SMASH-3.3
key.h File Reference
#include <cassert>
#include <functional>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "logging.h"
#include "stringfunctions.h"
#include "traits.h"

Go to the source code of this file.

Classes

struct  smash::detail::KeyTraits< T >
 Class template to store Key traits outside the Key class, allowing for reuse both in the Key class itself and in helper implementation details. More...
 
class  smash::Key< default_type >
 Object to store a YAML input file key together with metadata associated to it. More...
 
struct  smash::Key< default_type >::WrongNumberOfVersions
 Thrown when too few or too many versions are passed to the constructor. More...
 
class  smash::Key< default_type >::Default< T >
 Wrapper class around a type with the capability to both store the type of default and its value, if any exists. More...
 

Namespaces

 smash
 
 smash::detail
 specialize a type for all of the STL containers.
 

Typedefs

using smash::Version = std::string
 Descriptive alias for storing a SMASH version associated to keys metadata. More...
 
using smash::KeyMetadata = std::initializer_list< std::string_view >
 Descriptive alias for storing keys metadata. More...
 
using smash::KeyLabels = std::vector< std::string >
 Descriptive alias for storing key labels, i.e. More...
 

Enumerations

enum class  smash::DefaultType { smash::Null , smash::Value , smash::Dependent }
 New type to explicit distinguish between mandatory and optional keys. More...
 

Functions

KeyLabels smash::operator+ (const KeyLabels &lhs, std::string_view rhs)
 Overload of the + operator to add a label to a KeyLabels object. More...
 
KeyLabels smash::operator+ (KeyLabels &&lhs, std::string_view rhs)
 Overload of the + operator to add a label to a KeyLabels object. More...
 
template<typename T >
const KeyTraits< T >::validator_type & smash::detail::get_default_validator () noexcept
 Function template to get a default trivial validator. More...