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