Syntalos::MetaStringMap
Syntalos::MetaStringMap
Mapping of values used for stream metadata.
#include <streammeta.h>
Inherits from std::map< std::string, MetaValue >
Public Functions
| Name | |
|---|---|
| auto | value(const std::string & key) const Retrieves the value associated with the specified key in the map. |
| const MetaValue & | valueOr(const std::string & key, const MetaValue & fallback) const Retrieves the value associated with the specified key or returns a fallback value. |
| template <typename T > std::optional< T > | value(const std::string & key) const Retrieves the value associated with the specified key or returns a fallback value. |
| template <typename T > T | valueOr(const std::string & key, T fallback) const Retrieves the value associated with the specified key or returns a fallback value. |
Public Functions Documentation
function value
inline auto value(
const std::string & key
) constRetrieves the value associated with the specified key in the map.
Parameters:
- key The string key to search for in the map.
Return: A constant reference to an optional containing the value associated with the key if found, or std::nullopt if the key is not present.
function valueOr
inline const MetaValue & valueOr(
const std::string & key,
const MetaValue & fallback
) constRetrieves the value associated with the specified key or returns a fallback value.
Parameters:
- key The string key to search for in the map.
- fallback The value to return if the key is not present in the map.
Return: A reference to the value associated with the key if found; otherwise, a reference to the fallback value.
If the key is found, the corresponding value is returned. If the key is not found, the provided fallback value is returned instead.
function value
template <typename T >
std::optional< T > value(
const std::string & key
) constRetrieves the value associated with the specified key or returns a fallback value.
function valueOr
template <typename T >
T valueOr(
const std::string & key,
T fallback
) constRetrieves the value associated with the specified key or returns a fallback value.
Updated on 2026-04-20 at 00:59:18 +0000