open62541pp 0.17.0
C++ wrapper of open62541
|
#include <types.hpp>
UA_ExtensionObject wrapper class.
ExtensionObjects may contain scalars of any data type. Even those that are unknown to the receiver. If the received data type is unknown, the encoded string and target NodeId is stored instead of the decoded data.
Public Member Functions | |
template<typename T > | |
ExtensionObject (T *ptr) noexcept | |
template<typename T > | |
ExtensionObject (T *ptr, const UA_DataType &type) noexcept | |
template<typename T , typename = std::enable_if_t<!isExtensionObject<T>>> | |
ExtensionObject (const T &decoded) | |
template<typename T , typename = std::enable_if_t<!isExtensionObject<T>>> | |
ExtensionObject (const T &decoded, const UA_DataType &type) | |
bool | empty () const noexcept |
bool | isEmpty () const noexcept |
bool | isEncoded () const noexcept |
bool | isDecoded () const noexcept |
ExtensionObjectEncoding | encoding () const noexcept |
ExtensionObjectEncoding | getEncoding () const noexcept |
const NodeId * | encodedTypeId () const noexcept |
const NodeId * | getEncodedTypeId () const noexcept |
const ByteString * | encodedBinary () const noexcept |
const XmlElement * | encodedXml () const noexcept |
const ByteString * | getEncodedBody () const noexcept |
const UA_DataType * | decodedType () const noexcept |
const UA_DataType * | getDecodedDataType () const noexcept |
template<typename T > | |
T * | decodedData () noexcept |
template<typename T > | |
const T * | decodedData () const noexcept |
template<typename T > | |
T * | getDecodedData () noexcept |
template<typename T > | |
const T * | getDecodedData () const noexcept |
void * | decodedData () noexcept |
const void * | decodedData () const noexcept |
void * | getDecodedData () noexcept |
const void * | getDecodedData () const noexcept |
constexpr | TypeWrapper () noexcept=default |
constexpr | TypeWrapper (const T &native) |
constexpr | TypeWrapper (T &&native) noexcept |
constexpr | TypeWrapper (const TypeWrapper &other) |
constexpr | TypeWrapper (TypeWrapper &&other) noexcept |
![]() | |
constexpr | TypeWrapper () noexcept=default |
constexpr | TypeWrapper (const UA_ExtensionObject &native) |
constexpr | TypeWrapper (UA_ExtensionObject &&native) noexcept |
constexpr | TypeWrapper (const TypeWrapper &other) |
constexpr | TypeWrapper (TypeWrapper &&other) noexcept |
~TypeWrapper () | |
constexpr TypeWrapper & | operator= (const TypeWrapper &other) |
constexpr TypeWrapper & | operator= (const UA_ExtensionObject &native) |
constexpr TypeWrapper & | operator= (TypeWrapper &&other) noexcept |
constexpr TypeWrapper & | operator= (UA_ExtensionObject &&native) noexcept |
![]() | |
constexpr | Wrapper () noexcept=default |
constexpr | Wrapper (const UA_ExtensionObject &native) noexcept |
constexpr | Wrapper (UA_ExtensionObject &&native) noexcept |
constexpr Wrapper & | operator= (const UA_ExtensionObject &native) noexcept |
constexpr Wrapper & | operator= (UA_ExtensionObject &&native) noexcept |
constexpr | operator UA_ExtensionObject & () noexcept |
constexpr | operator const UA_ExtensionObject & () const noexcept |
constexpr UA_ExtensionObject * | operator-> () noexcept |
constexpr const UA_ExtensionObject * | operator-> () const noexcept |
constexpr UA_ExtensionObject * | handle () noexcept |
constexpr const UA_ExtensionObject * | handle () const noexcept |
constexpr void | swap (Wrapper &other) noexcept |
constexpr void | swap (UA_ExtensionObject &native) noexcept |
Static Public Member Functions | |
template<typename T , typename... Args> | |
static ExtensionObject | fromDecoded (T &data, Args &&... args) noexcept |
template<typename T , typename... Args> | |
static ExtensionObject | fromDecodedCopy (const T &data, Args &&... args) |
![]() | |
static constexpr TypeIndex | typeIndex () |
Additional Inherited Members | |
![]() | |
using | NativeType |
![]() | |
constexpr void | clear () noexcept |
![]() | |
constexpr const UA_ExtensionObject & | native () const noexcept |
constexpr UA_ExtensionObject & | native () noexcept |
![]() | |
constexpr WrapperType * | asWrapper (NativeType *native) noexcept |
constexpr const WrapperType * | asWrapper (const NativeType *native) noexcept |
constexpr WrapperType & | asWrapper (NativeType &native) noexcept |
constexpr const WrapperType & | asWrapper (const NativeType &native) noexcept |
constexpr NativeType * | asNative (WrapperType *wrapper) noexcept |
constexpr const NativeType * | asNative (const WrapperType *wrapper) noexcept |
constexpr NativeType & | asNative (WrapperType &wrapper) noexcept |
constexpr const NativeType & | asNative (const WrapperType &wrapper) noexcept |
|
inlineexplicitnoexcept |
Create ExtensionObject from a pointer to a decoded object (no copy).
The object will not be deleted when the ExtensionObject is destructed.
ptr | Pointer to decoded object (native or wrapper). |
Definition at line 2093 of file types.hpp.
Referenced by fromDecoded(), and fromDecodedCopy().
|
inlinenoexcept |
Create ExtensionObject from a pointer to a decoded object with a custom data type (no copy).
The object will not be deleted when the ExtensionObject is destructed.
ptr | Pointer to decoded object (native or wrapper). |
type | Data type of the decoded object. |
|
inlineexplicit |
Create ExtensionObject from a decoded object (copy).
decoded | Decoded object (native or wrapper). |
|
inlineexplicit |
Create ExtensionObject from a decoded object with a custom data type (copy).
decoded | Decoded object (native or wrapper). |
type | Data type of the decoded object. |
|
inlinestaticnodiscardnoexcept |
|
inlinestaticnodiscard |
|
inlinenoexcept |
Check if the ExtensionObject is empty.
Definition at line 2150 of file types.hpp.
Referenced by isEmpty().
|
inlinenoexcept |
|
inlinenoexcept |
Check if the ExtensionObject is encoded (usually if the data type is unknown).
Definition at line 2161 of file types.hpp.
Referenced by encodedTypeId(), and getEncodedBody().
|
inlinenoexcept |
Check if the ExtensionObject is decoded.
Definition at line 2167 of file types.hpp.
Referenced by decodedData(), decodedData(), and decodedType().
|
inlinenoexcept |
Get the encoding.
Definition at line 2173 of file types.hpp.
Referenced by empty(), getEncoding(), isDecoded(), and isEncoded().
|
inlinenoexcept |
|
inlinenoexcept |
Get the encoded type id.
Returns nullptr
if ExtensionObject is not encoded.
Definition at line 2185 of file types.hpp.
Referenced by getEncodedTypeId().
|
inlinenoexcept |
|
inlinenoexcept |
Get the encoded body in binary format.
Returns nullptr
if ExtensionObject is not encoded in binary format.
|
inlinenoexcept |
Get the encoded body in XML format.
Returns nullptr
if ExtensionObject is not encoded in XML format.
|
inlinenoexcept |
|
inlinenoexcept |
Get the decoded data type.
Returns nullptr
if ExtensionObject is not decoded.
Definition at line 2223 of file types.hpp.
Referenced by getDecodedDataType().
|
inlinenoexcept |
|
inlinenoexcept |
Get pointer to the decoded data with given template type.
Returns nullptr
if the ExtensionObject is either not decoded or the decoded data is not of type T
.
Definition at line 2239 of file types.hpp.
Referenced by decodedData(), decodedData(), getDecodedData(), and getDecodedData().
|
inlinenoexcept |
Get const pointer to the decoded data with given template type.
Returns nullptr
if the ExtensionObject is either not decoded or the decoded data is not of type T
.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Get pointer to the decoded data.
Returns nullptr
if the ExtensionObject is not decoded.
|
inlinenoexcept |
Get pointer to the decoded data.
Returns nullptr
if the ExtensionObject is not decoded.
|
inlinenoexcept |
|
inlinenoexcept |
|
constexprdefaultnoexcept |
|
inlineexplicitconstexpr |
Constructor with native object (deep copy).
Definition at line 31 of file typewrapper.hpp.
|
inlineconstexprnoexcept |
Constructor with native object (move rvalue).
Definition at line 35 of file typewrapper.hpp.
|
inlineconstexpr |
Copy constructor (deep copy).
Definition at line 43 of file typewrapper.hpp.
|
inlineconstexprnoexcept |
Move constructor.
Definition at line 47 of file typewrapper.hpp.