API Documentation
Loading...
Searching...
No Matches
GenericOptionGroup Class Reference

#include <GenericOptions.h>

Inheritance diagram for GenericOptionGroup:
[legend]
Collaboration diagram for GenericOptionGroup:
[legend]

Public Member Functions

 GenericOptionGroup ()=default
 
 GenericOptionGroup (const TranslatedString &group_name, const String &group_id=String())
 
virtual ~GenericOptionGroup ()
 
template<class t_type >
void addOption (const TranslatedString &name, const t_type &value, bool is_editable=true)
 
void addOption (const GenericOption &option)
 
bool hasOption (const TranslatedString &option_name) const
 
bool hasOption (const String &option_name) const
 
template<class t_type >
void setValue (const TranslatedString &name, const t_type &value)
 
template<class t_type >
void setValue (const String &name, const t_type &value)
 
void setOption (const GenericOption &option)
 
const GenericOptiongetOption (const TranslatedString &n) const
 
GenericOptiongetOption (const TranslatedString &n)
 
template<class t_type >
t_type getValue (const TranslatedString &name) const
 
template<class t_type >
t_type getValue (const String &name) const
 
template<class t_type >
t_type getValue (const TranslatedString &name, const t_type &value_if_not_exist) const
 
template<class t_type >
t_type getValue (const String &name, const t_type &value_if_not_exist) const
 
bool operator== (const GenericOptionGroup &option_group) const
 
bool operator!= (const GenericOptionGroup &option_group) const
 
INIFactory ini ()
 
void addOptionsToINI (INIFactory &factory)
 
virtual JSONNode toJSONNode (bool only_value=true) const
 
virtual void fromJSONNode (const JSONNode &node)
 
void clear ()
 

Public Attributes

Dictionary< String, GenericOptionoptions
 
Buffer< Stringordered_options
 
TranslatedString name
 
String id
 

Constructor & Destructor Documentation

◆ GenericOptionGroup() [1/2]

GenericOptionGroup ( )
default

◆ GenericOptionGroup() [2/2]

GenericOptionGroup ( const TranslatedString & group_name,
const String & group_id = String() )

◆ ~GenericOptionGroup()

~GenericOptionGroup ( )
virtual

Member Function Documentation

◆ addOption() [1/2]

void addOption ( const GenericOption & option)
inline

◆ addOption() [2/2]

template<class t_type >
void addOption ( const TranslatedString & name,
const t_type & value,
bool is_editable = true )
inline

◆ addOptionsToINI()

void addOptionsToINI ( INIFactory & factory)

◆ clear()

void clear ( )

◆ fromJSONNode()

void fromJSONNode ( const JSONNode & node)
virtual

◆ getOption() [1/2]

GenericOption & getOption ( const TranslatedString & n)
inline

◆ getOption() [2/2]

const GenericOption & getOption ( const TranslatedString & n) const
inline

◆ getValue() [1/4]

template<class t_type >
t_type getValue ( const String & name) const
inline

◆ getValue() [2/4]

template<class t_type >
t_type getValue ( const String & name,
const t_type & value_if_not_exist ) const
inline

◆ getValue() [3/4]

template<class t_type >
t_type getValue ( const TranslatedString & name) const
inline

◆ getValue() [4/4]

template<class t_type >
t_type getValue ( const TranslatedString & name,
const t_type & value_if_not_exist ) const
inline

◆ hasOption() [1/2]

bool hasOption ( const String & option_name) const
inline

◆ hasOption() [2/2]

bool hasOption ( const TranslatedString & option_name) const
inline

◆ ini()

INIFactory ini ( )

◆ operator!=()

bool operator!= ( const GenericOptionGroup & option_group) const

◆ operator==()

bool operator== ( const GenericOptionGroup & option_group) const

◆ setOption()

void setOption ( const GenericOption & option)
inline

◆ setValue() [1/2]

template<class t_type >
void setValue ( const String & name,
const t_type & value )
inline

◆ setValue() [2/2]

template<class t_type >
void setValue ( const TranslatedString & name,
const t_type & value )
inline

◆ toJSONNode()

JSONNode toJSONNode ( bool only_value = true) const
nodiscardvirtual

Member Data Documentation

◆ id

String id

◆ name

◆ options

◆ ordered_options

Buffer<String> ordered_options

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