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