Fcitx
Public Types | Public Member Functions | List of all members
fcitx::Option< T, Constrain, Marshaller, Annotation > Class Template Reference

Represent a Configuration option. More...

#include <fcitx-config/option.h>

Inheritance diagram for fcitx::Option< T, Constrain, Marshaller, Annotation >:
Inheritance graph
[legend]
Collaboration diagram for fcitx::Option< T, Constrain, Marshaller, Annotation >:
Collaboration graph
[legend]

Public Types

using value_type = T
 
using constrain_type = Constrain
 

Public Member Functions

 Option (Configuration *parent, std::string path, std::string description, const T &defaultValue=T(), Constrain constrain=Constrain(), Marshaller marshaller=Marshaller(), Annotation annotation=Annotation())
 
std::string typeString () const override
 
void dumpDescription (RawConfig &config) const override
 
std::unique_ptr< ConfigurationsubConfigSkeleton () const override
 
bool isDefault () const override
 
void reset () override
 
const T & value () const
 
const T & defaultValue () const
 
const T & operator* () const
 
const T * operator-> () const
 
template<typename U >
bool setValue (U &&value)
 
template<typename Dummy = int, std::enable_if_t<!std::is_same< Constrain, NoConstrain< T >>::value, Dummy > = 0>
MutableOption< OptionmutableValue ()
 
template<typename Dummy = int, std::enable_if_t< std::is_same< Constrain, NoConstrain< T >>::value, Dummy > = 0>
T * mutableValue ()
 
void marshall (RawConfig &config) const override
 
bool unmarshall (const RawConfig &config, bool partial) override
 
bool equalTo (const OptionBase &other) const override
 
void copyFrom (const OptionBase &other) override
 
bool skipDescription () const override
 
bool skipSave () const override
 
void syncDefaultValueToCurrent () override
 
auto & annotation () const
 
- Public Member Functions inherited from fcitx::OptionBase
 OptionBase (Configuration *parent, std::string path, std::string description)
 
const std::string & path () const
 
const std::string & description () const
 
bool operator== (const OptionBase &other) const
 
bool operator!= (const OptionBase &other) const
 

Detailed Description

template<typename T, typename Constrain = NoConstrain<T>, typename Marshaller = DefaultMarshaller<T>, typename Annotation = NoAnnotation>
class fcitx::Option< T, Constrain, Marshaller, Annotation >

Represent a Configuration option.

Definition at line 286 of file option.h.


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