open62541++ 0.13.0
C++ wrapper of open62541
|
#include <ExtensionObject.h>
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.
Definition at line 39 of file ExtensionObject.h.
Public Member Functions | |
bool | isEmpty () const noexcept |
bool | isEncoded () const noexcept |
bool | isDecoded () const noexcept |
ExtensionObjectEncoding | getEncoding () const noexcept |
const NodeId * | getEncodedTypeId () const noexcept |
const ByteString * | getEncodedBody () const noexcept |
const UA_DataType * | getDecodedDataType () const noexcept |
template<typename T > | |
T * | getDecodedData () noexcept |
template<typename T > | |
const T * | getDecodedData () const noexcept |
void * | getDecodedData () noexcept |
const void * | getDecodedData () const noexcept |
constexpr | TypeWrapper ()=default |
constexpr | TypeWrapper (const T &native) |
constexpr | TypeWrapper (T &&native) noexcept |
constexpr | TypeWrapper (const TypeWrapper &other) |
constexpr | TypeWrapper (TypeWrapper &&other) noexcept |
Public Member Functions inherited from opcua::TypeWrapper< UA_ExtensionObject, UA_TYPES_EXTENSIONOBJECT > | |
constexpr | TypeWrapper ()=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 void | swap (TypeWrapper &other) noexcept |
constexpr void | swap (UA_ExtensionObject &native) noexcept |
Public Member Functions inherited from opcua::Wrapper< T > | |
constexpr | Wrapper ()=default |
constexpr | Wrapper (const T &native) |
constexpr | Wrapper (T &&native) noexcept |
constexpr | operator T& () noexcept |
constexpr | operator const T & () const noexcept |
constexpr T * | operator-> () noexcept |
constexpr const T * | operator-> () const noexcept |
constexpr T * | handle () noexcept |
constexpr const T * | handle () const noexcept |
Static Public Member Functions | |
template<typename T > | |
static ExtensionObject | fromDecoded (T &data) noexcept |
static ExtensionObject | fromDecoded (void *data, const UA_DataType &type) noexcept |
template<typename T > | |
static ExtensionObject | fromDecodedCopy (const T &data) |
static ExtensionObject | fromDecodedCopy (const void *data, const UA_DataType &type) |
Static Public Member Functions inherited from opcua::TypeWrapper< UA_ExtensionObject, UA_TYPES_EXTENSIONOBJECT > | |
static constexpr TypeIndex | getTypeIndex () |
Additional Inherited Members | |
Public Types inherited from opcua::Wrapper< T > | |
using | NativeType = T |
Protected Member Functions inherited from opcua::TypeWrapper< UA_ExtensionObject, UA_TYPES_EXTENSIONOBJECT > | |
constexpr void | clear () noexcept |
Protected Member Functions inherited from opcua::Wrapper< T > | |
constexpr const T & | native () const noexcept |
constexpr T & | native () noexcept |
|
inlinestaticnoexcept |
Create an ExtensionObject from a decoded object (reference).
The data will not be deleted when the ExtensionObject is destructed.
data | Decoded data |
Definition at line 47 of file ExtensionObject.h.
Referenced by fromDecoded(), and opcua::services::detail::wrapNodeAttributes().
|
inlinestaticnoexcept |
Create an ExtensionObject from a decoded object (reference).
The data will not be deleted when the ExtensionObject is destructed.
data | Decoded data |
type | Data type of the decoded data |
Definition at line 56 of file ExtensionObject.h.
|
inlinestatic |
Create an ExtensionObject from a decoded object (copy).
Set the "decoded" data to a copy of the given object.
data | Decoded data |
Definition at line 68 of file ExtensionObject.h.
Referenced by fromDecodedCopy(), and opcua::Subscription< Connection >::subscribeEvent().
|
inlinestatic |
Create an ExtensionObject from a decoded object (copy).
data | Decoded data |
type | Data type of the decoded data |
Definition at line 76 of file ExtensionObject.h.
|
inlinenoexcept |
Check if the ExtensionObject is empty.
Definition at line 90 of file ExtensionObject.h.
|
inlinenoexcept |
Check if the ExtensionObject is encoded (usually if the data type is unknown).
Definition at line 95 of file ExtensionObject.h.
Referenced by getEncodedBody(), and getEncodedTypeId().
|
inlinenoexcept |
Check if the ExtensionObject is decoded.
Definition at line 101 of file ExtensionObject.h.
Referenced by getDecodedData(), getDecodedData(), and getDecodedDataType().
|
inlinenoexcept |
Get the encoding.
Definition at line 107 of file ExtensionObject.h.
|
inlinenoexcept |
Get the encoded type id.
Returns nullptr
if ExtensionObject is not encoded.
Definition at line 113 of file ExtensionObject.h.
|
inlinenoexcept |
Get the encoded body.
Returns nullptr
if ExtensionObject is not encoded.
Definition at line 120 of file ExtensionObject.h.
|
inlinenoexcept |
Get the decoded data type.
Returns nullptr
if ExtensionObject is not decoded.
Definition at line 127 of file ExtensionObject.h.
|
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 136 of file ExtensionObject.h.
Referenced by 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
.
Definition at line 144 of file ExtensionObject.h.
|
inlinenoexcept |
Get pointer to the decoded data.
Returns nullptr
if the ExtensionObject is not decoded.
Definition at line 151 of file ExtensionObject.h.
|
inlinenoexcept |
Get pointer to the decoded data.
Returns nullptr
if the ExtensionObject is not decoded.
Definition at line 159 of file ExtensionObject.h.
|
constexprdefault |
|
inlineexplicitconstexpr |
Constructor with native object (deep copy).
Definition at line 36 of file TypeWrapper.h.
|
inlineconstexprnoexcept |
Constructor with native object (move rvalue).
Definition at line 40 of file TypeWrapper.h.
|
inlineconstexpr |
Copy constructor (deep copy).
Definition at line 48 of file TypeWrapper.h.
|
inlineconstexprnoexcept |
Move constructor.
Definition at line 52 of file TypeWrapper.h.