sdbus-c++ 1.2.0
High-level C++ D-Bus library based on systemd D-Bus implementation
|
#include <Types.h>
Public Member Functions | |
template<typename _ValueType > | |
Variant (const _ValueType &value) | |
template<typename _ValueType > | |
_ValueType | get () const |
template<typename _ValueType , typename = std::enable_if_t<signature_of<_ValueType>::is_valid>> | |
operator _ValueType () const | |
template<typename _Type > | |
bool | containsValueOfType () const |
bool | isEmpty () const |
void | serializeTo (Message &msg) const |
void | deserializeFrom (Message &msg) |
std::string | peekValueType () const |
Variant can hold value of any D-Bus-supported type.
Note: Even though thread-aware, Variant objects are not thread-safe. Some const methods are conceptually const, but not physically const, thus are not thread-safe. This is by design: normally, clients should process a single Variant object in a single thread at a time. Otherwise they need to take care of synchronization by themselves.