userver: userver/utils/default_dict.hpp File Reference
Loading...
Searching...
No Matches
default_dict.hpp File Reference

Detailed Description

Dictionary with special value for missing keys.

Definition in file default_dict.hpp.

Go to the source code of this file.

#include <optional>
#include <string>
#include <userver/formats/json/value.hpp>
#include <userver/formats/parse/common_containers.hpp>
#include <userver/formats/serialize/common_containers.hpp>
#include <userver/utils/impl/transparent_hash.hpp>
+ Include dependency graph for default_dict.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::DefaultDict< ValueType >
 Dictionary that for missing keys falls back to a default value stored by key utils::kDefaultDictDefaultName. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename Value , typename T >
std::enable_if_t< formats::common::kIsFormatValue< Value >, DefaultDict< T > > utils::Parse (const Value &value, formats::parse::To< DefaultDict< T > >)
 

Variables

constexpr std::string_view utils::kDefaultDictDefaultName = "__default__"
 Name of the key with default value for utils::DefaultDict.