open62541++ 0.13.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::TypeConverter< T, Enable > Struct Template Reference

Detailed Description

template<typename T, typename Enable = void>
struct opcua::TypeConverter< T, Enable >

Type conversion from and to native types.

Native types can be both UA_* types and wrapper classes (like UA_Guid and Guid). The TypeConverter is mainly used within the Variant class to set/get non-native types.

Template specializations can be added for conversions of arbitrary types:

namespace ::opcua {
template <>
struct TypeConverter<MyCustomType> {
using NativeType = Guid;
static void fromNative(const NativeType& src, MyCustomType& dst) {
// ...
}
static void toNative(const MyCustomType& src, NativeType& dst) {
// ...
}
};
}
UA_Guid wrapper class.
Definition Builtin.h:139
Type conversion from and to native types.

Definition at line 65 of file TypeConverter.h.