CbmRoot
Loading...
Searching...
No Matches
Property.h File Reference
#include "Definitions.h"
#include <optional>
#include <string_view>
#include <tuple>
#include <yaml-cpp/emittermanip.h>
Include dependency graph for Property.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cbm::algo::yaml::Property< Class, T >
 

Namespaces

namespace  cbm
 
namespace  cbm::algo
 
namespace  cbm::algo::yaml
 

Macros

#define CBM_YAML_PROPERTIES(...)
 
#define CBM_YAML_FORMAT(tag)
 Optional tag to specify a formatting of the class (YAML::Flow vs YAML::Block)
 
#define CBM_YAML_MERGE_PROPERTY()
 Optional flag to indicate that the class should be treated like a type of it's property. Only has an effect on classes with a single property.
 

Functions

template<typename Class , typename T >
 cbm::algo::yaml::Property (T Class::*member, std::string_view key, std::string_view description) -> Property< Class, T >
 

Macro Definition Documentation

◆ CBM_YAML_FORMAT

#define CBM_YAML_FORMAT ( tag)
Value:
public: \
static constexpr std::optional<YAML::EMITTER_MANIP> FormatAs = tag

Optional tag to specify a formatting of the class (YAML::Flow vs YAML::Block)

Definition at line 72 of file Property.h.

◆ CBM_YAML_MERGE_PROPERTY

#define CBM_YAML_MERGE_PROPERTY ( )
Value:
public: \
static constexpr bool MergeProperty = true

Optional flag to indicate that the class should be treated like a type of it's property. Only has an effect on classes with a single property.

Note
This is useful to make some config files more compact.

Definition at line 82 of file Property.h.

◆ CBM_YAML_PROPERTIES

#define CBM_YAML_PROPERTIES ( ...)
Value:
public: \
static constexpr auto Properties = std::make_tuple(__VA_ARGS__)

Definition at line 65 of file Property.h.