API Documentation
Loading...
Searching...
No Matches
GenericOption Struct Reference

Stores a generic option of any type as well as some information about how the user might interact with that type. More...

#include <GenericOptions.h>

Collaboration diagram for GenericOption:
[legend]

Public Member Functions

 GenericOption ()
 
 GenericOption (const GenericOption &option)
 
 GenericOption (const String &id, const TranslatedString &name, const String &value)
 
template<class t_type >
 GenericOption (const String &id, const TranslatedString &name, const t_type &value)
 
template<class t_type >
t_type getAs () const
 
bool operator!= (const GenericOption &option) const
 
GenericOptionoperator= (const GenericOption &option)
 
bool operator== (const GenericOption &option) const
 
void set (const String &new_value)
 
template<class t_type >
void set (const t_type &new_value)
 
void setToDefault ()
 

Public Attributes

bool allow_custom_option = false
 
Buffer< std::pair< TranslatedString, String > > available_options
 
String default_value
 
TranslatedString description
 
String file_extensions
 
String icon
 
String id
 
bool is_editable = true
 
bool is_viewable = true
 
TranslatedString name
 
TypeInfo parameter_type
 
String regex
 
ConstPointer< Unitunit
 
Resource< Stringvalue
 
Bounds< 1, fltp08value_bounds = Constant<Bounds<1, fltp08>>::Invalid
 

Detailed Description

Stores a generic option of any type as well as some information about how the user might interact with that type.


Constructor & Destructor Documentation

◆ GenericOption() [1/4]

◆ GenericOption() [2/4]

GenericOption ( const String & id,
const TranslatedString & name,
const String & value )

◆ GenericOption() [3/4]

template<class t_type >
GenericOption ( const String & id,
const TranslatedString & name,
const t_type & value )
inline

◆ GenericOption() [4/4]

GenericOption ( const GenericOption & option)
inline

Member Function Documentation

◆ getAs()

template<class t_type >
t_type getAs ( ) const
inlinenodiscard

◆ operator!=()

bool operator!= ( const GenericOption & option) const
inline

◆ operator=()

GenericOption & operator= ( const GenericOption & option)
inline

◆ operator==()

bool operator== ( const GenericOption & option) const
inline

◆ set() [1/2]

void set ( const String & new_value)
inline

◆ set() [2/2]

template<class t_type >
void set ( const t_type & new_value)
inline

◆ setToDefault()

void setToDefault ( )
inline

Member Data Documentation

◆ allow_custom_option

bool allow_custom_option = false

◆ available_options

Buffer<std::pair<TranslatedString, String> > available_options

◆ default_value

String default_value

◆ description

TranslatedString description

◆ file_extensions

String file_extensions

◆ icon

String icon

◆ id

String id

◆ is_editable

bool is_editable = true

◆ is_viewable

bool is_viewable = true

◆ name

◆ parameter_type

TypeInfo parameter_type

◆ regex

String regex

◆ unit

◆ value

Resource<String> value

◆ value_bounds

Bounds<1, fltp08> value_bounds = Constant<Bounds<1, fltp08>>::Invalid

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