Fcitx
|
Variant type to be used to box or unbox the dbus variant type. More...
#include <fcitx-utils/dbus/variant.h>
Public Member Functions | |
Variant ()=default | |
Construct an empty variant. | |
template<typename Value , typename Dummy = std::enable_if_t< !std::is_same_v<std::remove_cv_t<std::remove_reference_t<Value>>, Variant>, void>> | |
Variant (Value &&value) | |
Construct a variant from some existing data. | |
Variant (const Variant &v) | |
Copy Construct a variant from another variant. | |
Variant (Variant &&v)=default | |
Copy another variant data to current. | |
Variant & | operator= (const Variant &v) |
Variant & | operator= (Variant &&v)=default |
template<typename Value , typename = std::enable_if_t<!std::is_same< std::remove_cv_t<std::remove_reference_t<Value>>, dbus::Variant>::value>> | |
void | setData (Value &&value) |
Set variant data from some existing data. | |
void | setData (const Variant &v) |
Copy variant data from another variant. | |
void | setData (Variant &&v) |
Set variant data from anthoer variant. | |
void | setData (const char *str) |
Set variant data with a C-string. | |
void | setRawData (std::shared_ptr< void > data, std::shared_ptr< VariantHelperBase > helper) |
template<typename Value > | |
const Value & | dataAs () const |
Return data as given type. More... | |
void | writeToMessage (dbus::Message &msg) const |
const std::string & | signature () const |
Return the signature of the data. | |
void | printData (LogMessageBuilder &builder) const |
Print the variant data to log. | |
Variant type to be used to box or unbox the dbus variant type.