UA Server SDK C++ Bundle
1.4.2.275
|
Wrapper class for the UA stack structure OpcUa_Argument. More...
#include <uaargument.h>
Public Member Functions | |
UaArgument () | |
Constructs an instance of the class UaArgument with empty default values. | |
UaArgument (const UaArgument &other) | |
Constructs an instance of the class UaArgument with values from another UaArgument object. More... | |
UaArgument (const OpcUa_Argument &other) | |
Constructs an instance of the class UaArgument with values from another OpcUa_Argument structure. More... | |
UaArgument (const UaString &name, const UaNodeId &dataType, OpcUa_Int32 valueRank, const UaUInt32Array &arrayDimensions, const UaLocalizedText &description) | |
Constructs an instance of the class UaArgument with values provided in the constructor. | |
UaArgument (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaArgument initialized with value from a UaExtensionObject. More... | |
UaArgument (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaArgument initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaArgument () | |
Destroys the UaArgument object. | |
void | clear () |
Clear the data of the UaArgument. More... | |
bool | operator== (const UaArgument &other) const |
Compare two UaArgument if they are similar. More... | |
bool | operator!= (const UaArgument &other) const |
Returns true if the other UaArgument is not equal to this. More... | |
UaArgument & | operator= (const UaArgument &other) |
Assignment operator. More... | |
OpcUa_Argument * | copy () const |
Copy UaArgument data to a newly allocated OpcUa_Argument. More... | |
void | copyTo (OpcUa_Argument *pDst) const |
Copy UaArgument data to an existing OpcUa_Argument structure. More... | |
void | attach (OpcUa_Argument *pValue) |
Attaches the data of the parameter pValue. More... | |
OpcUa_Argument * | detach (OpcUa_Argument *pDst) |
Detaches the internal Argument structure from this class. More... | |
Static Public Member Functions | |
static OpcUa_Argument * | clone (const OpcUa_Argument &source) |
Copy OpcUa_Argument data to a newly allocated OpcUa_Argument. More... | |
static void | cloneTo (const OpcUa_Argument &source, OpcUa_Argument ©) |
Copy OpcUa_Argument data to an existing OpcUa_Argument structure. More... | |
Wrapper class for the UA stack structure OpcUa_Argument.
This class encapsulates the native OpcUa_Argument structure and handles memory allocation and cleanup for you. UaArgument uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared Argument it creates a copy for that (copy-on-write). So assigning another UaArgument or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
UaArgument::UaArgument | ( | const UaArgument & | other | ) |
Constructs an instance of the class UaArgument with values from another UaArgument object.
other | the other UaArgument used to initialize the object |
UaArgument::UaArgument | ( | const OpcUa_Argument & | other | ) |
Constructs an instance of the class UaArgument with values from another OpcUa_Argument structure.
other | the other OpcUa_Argument used to initialize the object |
UaArgument::UaArgument | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaArgument initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the Argument |
UaArgument::UaArgument | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaArgument initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the Argument |
void UaArgument::attach | ( | OpcUa_Argument * | pValue | ) |
Attaches the data of the parameter pValue.
Don't clear the data of pValue afterwards manually, because UaArgument is responsible for it now.
[in] | pValue | Parameter to attach to. |
void UaArgument::clear | ( | ) |
Clear the data of the UaArgument.
|
static |
Copy OpcUa_Argument data to a newly allocated OpcUa_Argument.
source | Source to clone. |
|
static |
Copy OpcUa_Argument data to an existing OpcUa_Argument structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_Argument * UaArgument::copy | ( | ) | const |
Copy UaArgument data to a newly allocated OpcUa_Argument.
void UaArgument::copyTo | ( | OpcUa_Argument * | pDst | ) | const |
Copy UaArgument data to an existing OpcUa_Argument structure.
pDst | the destination of this copy operation. |
OpcUa_Argument * UaArgument::detach | ( | OpcUa_Argument * | pDst | ) |
Detaches the internal Argument structure from this class.
This way you take over the control of releasing the Argument data. If more than one reference exists, the data is copied to pDst instead of being detached.
[out] | pDst | Pointer to OpcUa_Argument structure that receives the Argument data. |
bool UaArgument::operator!= | ( | const UaArgument & | other | ) | const |
Returns true if the other UaArgument is not equal to this.
other | the UaArgument to compare. |
UaArgument & UaArgument::operator= | ( | const UaArgument & | other | ) |
bool UaArgument::operator== | ( | const UaArgument & | other | ) | const |
Compare two UaArgument if they are similar.
other | the UaArgument to compare. |