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