OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
AnyConfigEntry Class Reference

#include <AnyConfigEntry.h>

Inheritance diagram for AnyConfigEntry:
ConfigEntry< bool > ConfigEntry<::LogLevel > ConfigEntry< int > ConfigEntry< RandomEngineType > ConfigEntry< PlatformKey > ConfigEntry< std::string > ConfigEntry< float > ConfigEntry< RendererType > ConfigEntry< PlatformWindowMode > ConfigEntry< T >

Public Types

using Validator = std::function< std::any(std::any)>
 

Public Member Functions

 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)
 

Protected Member Functions

Validator validator () const
 

Private Attributes

ConfigSection_section = nullptr
 
std::string _name
 
std::string _description
 
AnyHandler_handler = nullptr
 
std::any _defaultValue
 
std::any _value
 
Validator _validator = nullptr
 
std::vector< std::pair< void *, std::function< void()> > > _listeners
 

Member Typedef Documentation

◆ Validator

using AnyConfigEntry::Validator = std::function<std::any(std::any)>

Constructor & Destructor Documentation

◆ AnyConfigEntry()

AnyConfigEntry::AnyConfigEntry ( ConfigSection section,
std::string_view  name,
std::string_view  description,
AnyHandler handler,
std::any  defaultValue,
Validator  validator 
)

◆ ~AnyConfigEntry()

virtual AnyConfigEntry::~AnyConfigEntry ( )
virtualdefault

Member Function Documentation

◆ addListener()

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

◆ defaultString()

std::string AnyConfigEntry::defaultString ( ) const

◆ defaultValue()

const std::any & AnyConfigEntry::defaultValue ( ) const
inline

◆ description()

const std::string & AnyConfigEntry::description ( ) const
inline

◆ name()

const std::string & AnyConfigEntry::name ( ) const
inline

◆ removeListeners()

void AnyConfigEntry::removeListeners ( void *  ctx)
inline

◆ reset()

void AnyConfigEntry::reset ( )
inline

◆ section()

ConfigSection * AnyConfigEntry::section ( ) const
inline

◆ setString()

void AnyConfigEntry::setString ( std::string_view  value)

◆ setValue()

void AnyConfigEntry::setValue ( std::any  value)

◆ string()

std::string AnyConfigEntry::string ( ) const

◆ type()

const std::type_info & AnyConfigEntry::type ( ) const
inline

◆ validator()

Validator AnyConfigEntry::validator ( ) const
inlineprotected

◆ value()

const std::any & AnyConfigEntry::value ( ) const
inline

Member Data Documentation

◆ _defaultValue

std::any AnyConfigEntry::_defaultValue
private

◆ _description

std::string AnyConfigEntry::_description
private

◆ _handler

AnyHandler* AnyConfigEntry::_handler = nullptr
private

◆ _listeners

std::vector<std::pair<void *, std::function<void()> > > AnyConfigEntry::_listeners
private

◆ _name

std::string AnyConfigEntry::_name
private

◆ _section

ConfigSection* AnyConfigEntry::_section = nullptr
private

◆ _validator

Validator AnyConfigEntry::_validator = nullptr
private

◆ _value

std::any AnyConfigEntry::_value
private

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