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