OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Static Private Member Functions | List of all members
ConfigEntry< T > Class Template Reference

#include <ConfigEntry.h>

Inheritance diagram for ConfigEntry< T >:
AnyConfigEntry

Public Member Functions

 ConfigEntry (const ConfigEntry &other)=delete
 
 ConfigEntry (ConfigEntry &&other)=delete
 
template<class TypedValidator >
 ConfigEntry (ConfigSection *section, std::string_view name, T defaultValue, TypedValidator validator, std::string_view description)
 
 ConfigEntry (ConfigSection *section, std::string_view name, T defaultValue, std::string_view description)
 
const T & defaultValue () const
 
const T & value () const
 
void setValue (T value)
 
void toggle ()
 
void increment ()
 
void decrement ()
 
void cycleIncrement ()
 
void cycleDecrement ()
 
template<std::invocable< T > Listener>
void addListener (void *ctx, Listener listener)
 
void addListener (void *ctx, std::function< void()> listener)
 
- Public Member Functions inherited from AnyConfigEntry
 AnyConfigEntry (ConfigSection *section, std::string_view name, std::string_view description, AnyHandler *handler, std::any defaultValue, Validator validator)
 
virtual ~AnyConfigEntry ()=default
 
const std::type_info & type () const
 
const std::any & defaultValue () const
 
const std::any & value () const
 
void setValue (std::any value)
 
void reset ()
 
std::string defaultString () const
 
std::string string () const
 
void setString (std::string_view value)
 
ConfigSectionsection () const
 
const std::string & name () const
 
const std::string & description () const
 
void addListener (void *ctx, std::function< void()> listener)
 
void removeListeners (void *ctx)
 

Private Types

using base_type = AnyConfigEntry
 

Static Private Member Functions

template<class TypedValidator >
static Validator wrapValidator (TypedValidator validator)
 

Additional Inherited Members

- Public Types inherited from AnyConfigEntry
using Validator = std::function< std::any(std::any)>
 
- Protected Member Functions inherited from AnyConfigEntry
Validator validator () const
 

Member Typedef Documentation

◆ base_type

template<class T >
using ConfigEntry< T >::base_type = AnyConfigEntry
private

Constructor & Destructor Documentation

◆ ConfigEntry() [1/4]

template<class T >
ConfigEntry< T >::ConfigEntry ( const ConfigEntry< T > &  other)
delete

◆ ConfigEntry() [2/4]

template<class T >
ConfigEntry< T >::ConfigEntry ( ConfigEntry< T > &&  other)
delete

◆ ConfigEntry() [3/4]

template<class T >
template<class TypedValidator >
ConfigEntry< T >::ConfigEntry ( ConfigSection section,
std::string_view  name,
defaultValue,
TypedValidator  validator,
std::string_view  description 
)
inline

◆ ConfigEntry() [4/4]

template<class T >
ConfigEntry< T >::ConfigEntry ( ConfigSection section,
std::string_view  name,
defaultValue,
std::string_view  description 
)
inline

Member Function Documentation

◆ addListener() [1/2]

template<class T >
template<std::invocable< T > Listener>
void ConfigEntry< T >::addListener ( void *  ctx,
Listener  listener 
)
inline

◆ addListener() [2/2]

template<class T >
void AnyConfigEntry::addListener ( void *  ctx,
std::function< void()>  listener 
)
inline

◆ cycleDecrement()

template<class T >
void ConfigEntry< T >::cycleDecrement ( )
inline

◆ cycleIncrement()

template<class T >
void ConfigEntry< T >::cycleIncrement ( )
inline

◆ decrement()

template<class T >
void ConfigEntry< T >::decrement ( )
inline

◆ defaultValue()

template<class T >
const T & ConfigEntry< T >::defaultValue ( ) const
inline

◆ increment()

template<class T >
void ConfigEntry< T >::increment ( )
inline

◆ setValue()

template<class T >
void ConfigEntry< T >::setValue ( value)
inline

◆ toggle()

template<class T >
void ConfigEntry< T >::toggle ( )
inline

◆ value()

template<class T >
const T & ConfigEntry< T >::value ( ) const
inline

◆ wrapValidator()

template<class T >
template<class TypedValidator >
static Validator ConfigEntry< T >::wrapValidator ( TypedValidator  validator)
inlinestaticprivate

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