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

Stores a groups of GenericOptions that can be used to group them. More...

#include <GenericOptions.h>

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

Public Member Functions

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

Public Attributes

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

Detailed Description

Stores a groups of GenericOptions that can be used to group them.


Constructor & Destructor Documentation

◆ GenericOptionGroup() [1/2]

GenericOptionGroup ( )
default

◆ GenericOptionGroup() [2/2]

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

◆ ~GenericOptionGroup()

virtual ~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()

virtual 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()

virtual 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 file: