C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

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...
 
UaRationalNumberoperator= (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)
 Copy OpcUa_RationalNumber data to an existing OpcUa_RationalNumber structure. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

UaRationalNumber::UaRationalNumber ( const UaRationalNumber other)

Constructs an instance of the class UaRationalNumber with values from another UaRationalNumber object.

Parameters
otherthe 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.

Parameters
otherthe 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.

Parameters
extensionObjectthe 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.

Parameters
extensionObjectthe extension object containing the RationalNumber

Member Function Documentation

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.

Parameters
pValue[in] Parameter to attach to.
void UaRationalNumber::clear ( )

Clear the data of the UaRationalNumber.

OpcUa_RationalNumber * UaRationalNumber::clone ( const OpcUa_RationalNumber &  source)
static

Copy OpcUa_RationalNumber data to a newly allocated OpcUa_RationalNumber.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_RationalNumber.
void UaRationalNumber::cloneTo ( const OpcUa_RationalNumber &  source,
OpcUa_RationalNumber &  copy 
)
static

Copy OpcUa_RationalNumber data to an existing OpcUa_RationalNumber structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_RationalNumber * UaRationalNumber::copy ( ) const

Copy UaRationalNumber data to a newly allocated OpcUa_RationalNumber.

Returns
pointer to a newly allocated OpcUa_RationalNumber.
void UaRationalNumber::copyTo ( OpcUa_RationalNumber *  pDst) const

Copy UaRationalNumber data to an existing OpcUa_RationalNumber structure.

Parameters
pDstthe 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.

Parameters
pDst[out] Pointer to an OpcUa_RationalNumber structure that receives the RationalNumber data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
bool UaRationalNumber::operator!= ( const UaRationalNumber other) const

Compare two UaRationalNumber for inequality.

See also
operator==
Parameters
otherthe UaRationalNumber to compare with.
Returns
true if not equal, false otherwise.
UaRationalNumber & UaRationalNumber::operator= ( const UaRationalNumber other)

Assignment operator.

Parameters
otherthe UaRationalNumber to assign.
Returns
reference to itself.
bool UaRationalNumber::operator== ( const UaRationalNumber other) const

Compare two UaRationalNumber for equality.

Parameters
otherthe UaRationalNumber to compare with.
Returns
true if equal, false if not.

The documentation for this class was generated from the following files: