C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
Wrapper class for the UA stack structure OpcUa_ThreeDVector. More...
#include <uathreedvector.h>
Public Member Functions | |
UaThreeDVector () | |
Constructs an instance of the class UaThreeDVector with empty default values. | |
UaThreeDVector (const UaThreeDVector &other) | |
Constructs an instance of the class UaThreeDVector with values from another UaThreeDVector object. More... | |
UaThreeDVector (const OpcUa_ThreeDVector &other) | |
Constructs an instance of the class UaThreeDVector with values from another OpcUa_ThreeDVector structure. More... | |
UaThreeDVector (OpcUa_Double x, OpcUa_Double y, OpcUa_Double z) | |
Constructs an instance of the class UaThreeDVector with values provided in the constructor. | |
UaThreeDVector (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaThreeDVector initialized with value from a UaExtensionObject. More... | |
UaThreeDVector (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaThreeDVector initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaThreeDVector () | |
Destroys the UaThreeDVector object. | |
void | clear () |
Clear the data of the UaThreeDVector. More... | |
bool | operator== (const UaThreeDVector &other) const |
Compare two UaThreeDVector for equality. More... | |
bool | operator!= (const UaThreeDVector &other) const |
Compare two UaThreeDVector for inequality. More... | |
UaThreeDVector & | operator= (const UaThreeDVector &other) |
Assignment operator. More... | |
OpcUa_ThreeDVector * | copy () const |
Copy UaThreeDVector data to a newly allocated OpcUa_ThreeDVector. More... | |
void | copyTo (OpcUa_ThreeDVector *pDst) const |
Copy UaThreeDVector data to an existing OpcUa_ThreeDVector structure. More... | |
void | attach (OpcUa_ThreeDVector *pValue) |
Attaches to an existing OpcUa_ThreeDVector structure. More... | |
OpcUa_ThreeDVector * | detach (OpcUa_ThreeDVector *pDst) |
Detaches the internal ThreeDVector structure from this class. More... | |
OpcUa_Double | getX () const |
Returns the X. | |
OpcUa_Double | getY () const |
Returns the Y. | |
OpcUa_Double | getZ () const |
Returns the Z. | |
void | setX (OpcUa_Double x) |
Sets the X. | |
void | setY (OpcUa_Double y) |
Sets the Y. | |
void | setZ (OpcUa_Double z) |
Sets the Z. | |
Static Public Member Functions | |
static OpcUa_ThreeDVector * | clone (const OpcUa_ThreeDVector &source) |
Copy OpcUa_ThreeDVector data to a newly allocated OpcUa_ThreeDVector. More... | |
static void | cloneTo (const OpcUa_ThreeDVector &source, OpcUa_ThreeDVector ©) |
Copy OpcUa_ThreeDVector data to an existing OpcUa_ThreeDVector structure. More... | |
Wrapper class for the UA stack structure OpcUa_ThreeDVector.
This class encapsulates the native OpcUa_ThreeDVector structure and handles memory allocation and cleanup for you. UaThreeDVector uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared ThreeDVector it creates a copy for that (copy-on-write). So assigning another UaThreeDVector or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
UaThreeDVector::UaThreeDVector | ( | const UaThreeDVector & | other | ) |
Constructs an instance of the class UaThreeDVector with values from another UaThreeDVector object.
other | the other UaThreeDVector used to initialize the object |
UaThreeDVector::UaThreeDVector | ( | const OpcUa_ThreeDVector & | other | ) |
Constructs an instance of the class UaThreeDVector with values from another OpcUa_ThreeDVector structure.
other | the other OpcUa_ThreeDVector used to initialize the object |
UaThreeDVector::UaThreeDVector | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaThreeDVector initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the ThreeDVector |
UaThreeDVector::UaThreeDVector | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaThreeDVector initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the ThreeDVector |
void UaThreeDVector::attach | ( | OpcUa_ThreeDVector * | pValue | ) |
Attaches to an existing OpcUa_ThreeDVector structure.
Don't manually free the attached structure afterwards, because UaThreeDVector is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaThreeDVector::clear | ( | ) |
Clear the data of the UaThreeDVector.
|
static |
Copy OpcUa_ThreeDVector data to a newly allocated OpcUa_ThreeDVector.
source | Source to clone. |
|
static |
Copy OpcUa_ThreeDVector data to an existing OpcUa_ThreeDVector structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_ThreeDVector * UaThreeDVector::copy | ( | ) | const |
Copy UaThreeDVector data to a newly allocated OpcUa_ThreeDVector.
void UaThreeDVector::copyTo | ( | OpcUa_ThreeDVector * | pDst | ) | const |
Copy UaThreeDVector data to an existing OpcUa_ThreeDVector structure.
pDst | the destination of this copy operation. |
OpcUa_ThreeDVector * UaThreeDVector::detach | ( | OpcUa_ThreeDVector * | pDst | ) |
Detaches the internal ThreeDVector structure from this class.
This way you take over the control of freeing the ThreeDVector data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_ThreeDVector structure that receives the ThreeDVector data. |
bool UaThreeDVector::operator!= | ( | const UaThreeDVector & | other | ) | const |
Compare two UaThreeDVector for inequality.
other | the UaThreeDVector to compare with. |
UaThreeDVector & UaThreeDVector::operator= | ( | const UaThreeDVector & | other | ) |
bool UaThreeDVector::operator== | ( | const UaThreeDVector & | other | ) | const |
Compare two UaThreeDVector for equality.
other | the UaThreeDVector to compare with. |