CbmRoot
Loading...
Searching...
No Matches
cbm::algo::yaml::Property< Class, T > Class Template Reference

#include <Property.h>

Public Types

using ClassType = Class
 
using ValueType = T
 

Public Member Functions

 Property ()=delete
 
constexpr Property (T Class::*member, std::string_view key, std::string_view description="", std::optional< YAML::EMITTER_MANIP > fmt={}, std::optional< YAML::EMITTER_MANIP > fmtEntries={})
 
 Property (const Property &)=delete
 
Propertyoperator= (const Property &)=delete
 
 Property (Property &&)=default
 
Propertyoperator= (Property &&)=default
 
std::string_view Key () const
 
std::string_view Description () const
 
std::optional< YAML::EMITTER_MANIP > Format () const
 
std::optional< YAML::EMITTER_MANIP > FormatEntries () const
 
T & Get (Class &object) const
 
const T & Get (const Class &object) const
 
void Set (Class &object, const T &value) const
 

Private Attributes

T Class::* fMember
 
std::string_view fKey
 
std::string_view fDescription
 
std::optional< YAML::EMITTER_MANIP > fFormat
 
std::optional< YAML::EMITTER_MANIP > fFormatEntries
 

Detailed Description

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

Definition at line 18 of file Property.h.

Member Typedef Documentation

◆ ClassType

template<typename Class , typename T >
using cbm::algo::yaml::Property< Class, T >::ClassType = Class

Definition at line 28 of file Property.h.

◆ ValueType

template<typename Class , typename T >
using cbm::algo::yaml::Property< Class, T >::ValueType = T

Definition at line 29 of file Property.h.

Constructor & Destructor Documentation

◆ Property() [1/4]

template<typename Class , typename T >
cbm::algo::yaml::Property< Class, T >::Property ( )
delete

◆ Property() [2/4]

template<typename Class , typename T >
cbm::algo::yaml::Property< Class, T >::Property ( T Class::* member,
std::string_view key,
std::string_view description = "",
std::optional< YAML::EMITTER_MANIP > fmt = {},
std::optional< YAML::EMITTER_MANIP > fmtEntries = {} )
inlineconstexpr

Definition at line 33 of file Property.h.

◆ Property() [3/4]

template<typename Class , typename T >
cbm::algo::yaml::Property< Class, T >::Property ( const Property< Class, T > & )
delete

◆ Property() [4/4]

template<typename Class , typename T >
cbm::algo::yaml::Property< Class, T >::Property ( Property< Class, T > && )
default

Member Function Documentation

◆ Description()

template<typename Class , typename T >
std::string_view cbm::algo::yaml::Property< Class, T >::Description ( ) const
inline

Definition at line 50 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fDescription.

◆ Format()

template<typename Class , typename T >
std::optional< YAML::EMITTER_MANIP > cbm::algo::yaml::Property< Class, T >::Format ( ) const
inline

Definition at line 51 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fFormat.

◆ FormatEntries()

template<typename Class , typename T >
std::optional< YAML::EMITTER_MANIP > cbm::algo::yaml::Property< Class, T >::FormatEntries ( ) const
inline

Definition at line 52 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fFormatEntries.

◆ Get() [1/2]

template<typename Class , typename T >
T & cbm::algo::yaml::Property< Class, T >::Get ( Class & object) const
inline

Definition at line 54 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fMember.

◆ Get() [2/2]

template<typename Class , typename T >
const T & cbm::algo::yaml::Property< Class, T >::Get ( const Class & object) const
inline

Definition at line 55 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fMember.

◆ Key()

template<typename Class , typename T >
std::string_view cbm::algo::yaml::Property< Class, T >::Key ( ) const
inline

Definition at line 49 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fKey.

◆ operator=() [1/2]

template<typename Class , typename T >
Property & cbm::algo::yaml::Property< Class, T >::operator= ( const Property< Class, T > & )
delete

◆ operator=() [2/2]

template<typename Class , typename T >
Property & cbm::algo::yaml::Property< Class, T >::operator= ( Property< Class, T > && )
default

◆ Set()

template<typename Class , typename T >
void cbm::algo::yaml::Property< Class, T >::Set ( Class & object,
const T & value ) const
inline

Definition at line 57 of file Property.h.

References cbm::algo::yaml::Property< Class, T >::fMember.

Member Data Documentation

◆ fDescription

template<typename Class , typename T >
std::string_view cbm::algo::yaml::Property< Class, T >::fDescription
private

Definition at line 23 of file Property.h.

Referenced by cbm::algo::yaml::Property< Class, T >::Description().

◆ fFormat

template<typename Class , typename T >
std::optional<YAML::EMITTER_MANIP> cbm::algo::yaml::Property< Class, T >::fFormat
private

Definition at line 24 of file Property.h.

Referenced by cbm::algo::yaml::Property< Class, T >::Format().

◆ fFormatEntries

template<typename Class , typename T >
std::optional<YAML::EMITTER_MANIP> cbm::algo::yaml::Property< Class, T >::fFormatEntries
private

Definition at line 25 of file Property.h.

Referenced by cbm::algo::yaml::Property< Class, T >::FormatEntries().

◆ fKey

template<typename Class , typename T >
std::string_view cbm::algo::yaml::Property< Class, T >::fKey
private

Definition at line 22 of file Property.h.

Referenced by cbm::algo::yaml::Property< Class, T >::Key().

◆ fMember

template<typename Class , typename T >
T Class::* cbm::algo::yaml::Property< Class, T >::fMember
private

The documentation for this class was generated from the following file: