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

Array class for the UA stack structure OpcUa_RationalNumber. More...

#include <uarationalnumber.h>

Public Member Functions

 UaRationalNumbers ()
 Constructs an empty instance of the class UaRationalNumbers.
 
 UaRationalNumbers (const UaRationalNumbers &other)
 Constructs an instance of the class UaRationalNumbers with values from another UaRationalNumbers object. More...
 
 UaRationalNumbers (OpcUa_Int32 length, OpcUa_RationalNumber *data)
 Constructs an instance of the class UaRationalNumbers using a raw OpcUa_RationalNumber array. More...
 
virtual ~UaRationalNumbers ()
 Destroys the UaRationalNumbers object.
 
UaRationalNumbersoperator= (const UaRationalNumbers &other)
 Assignment operator. More...
 
const OpcUa_RationalNumber & operator[] (OpcUa_UInt32 index) const
 Index operator. More...
 
OpcUa_RationalNumber & operator[] (OpcUa_UInt32 index)
 Index operator. More...
 
bool operator== (const UaRationalNumbers &other) const
 Compare two UaRationalNumbers. More...
 
bool operator!= (const UaRationalNumbers &other) const
 Compare two UaRationalNumbers. More...
 
void attach (OpcUa_UInt32 length, OpcUa_RationalNumber *data)
 Attach to a raw OpcUa_RationalNumber array. More...
 
void attach (OpcUa_Int32 length, OpcUa_RationalNumber *data)
 Attach to a raw OpcUa_RationalNumber array. More...
 
OpcUa_RationalNumber * detach ()
 Detach from the internal OpcUa_RationalNumber array. More...
 
void create (OpcUa_UInt32 length)
 Clears the array and resizes to the given length. More...
 
void resize (OpcUa_UInt32 length)
 Resizes the array to a given length. More...
 
void clear ()
 Clears the array.
 

Detailed Description

Array class for the UA stack structure OpcUa_RationalNumber.

This class encapsulates an array of the native OpcUa_RationalNumber structure and handles memory allocation and cleanup for you.

See also
UaRationalNumber for information about the encapsulated structure.

Constructor & Destructor Documentation

UaRationalNumbers::UaRationalNumbers ( const UaRationalNumbers other)

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

Parameters
otherthe other UaRationalNumbers used to initialize the object
UaRationalNumbers::UaRationalNumbers ( OpcUa_Int32  length,
OpcUa_RationalNumber *  data 
)

Constructs an instance of the class UaRationalNumbers using a raw OpcUa_RationalNumber array.

Parameters
lengththe length of the raw OpcUa_RationalNumber array
datathe raw OpcUa_RationalNumber array

Member Function Documentation

void UaRationalNumbers::attach ( OpcUa_UInt32  length,
OpcUa_RationalNumber *  data 
)

Attach to a raw OpcUa_RationalNumber array.

Note
Don't manually free the attached data afterwards, because UaRationalNumbers is responsible for it now.
Parameters
lengththe length of the raw OpcUa_RationalNumber array
datathe raw OpcUa_RationalNumber array
void UaRationalNumbers::attach ( OpcUa_Int32  length,
OpcUa_RationalNumber *  data 
)

Attach to a raw OpcUa_RationalNumber array.

Note
Don't manually free the attached data afterwards, because UaRationalNumbers is responsible for it now.
Parameters
lengththe length of the raw OpcUa_RationalNumber array
datathe raw OpcUa_RationalNumber array
void UaRationalNumbers::create ( OpcUa_UInt32  length)

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_RationalNumber * UaRationalNumbers::detach ( )

Detach from the internal OpcUa_RationalNumber array.

After detaching, the detached array data will not be cleared automatically anymore.

Note
Remember to retrieve the length of the array before detaching.
Returns
the detached OpcUa_RationalNumber array
bool UaRationalNumbers::operator!= ( const UaRationalNumbers other) const

Compare two UaRationalNumbers.

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

Assignment operator.

Parameters
otherthe UaRationalNumbers to assign.
bool UaRationalNumbers::operator== ( const UaRationalNumbers other) const

Compare two UaRationalNumbers.

Parameters
otherthe UaRationalNumbers to compare with.
Returns
true if equal, false if not.
const OpcUa_RationalNumber & UaRationalNumbers::operator[] ( OpcUa_UInt32  index) const

Index operator.

Parameters
indexthe index of the structure to return.
OpcUa_RationalNumber & UaRationalNumbers::operator[] ( OpcUa_UInt32  index)

Index operator.

Parameters
indexthe index of the structure to return.
void UaRationalNumbers::resize ( OpcUa_UInt32  length)

Resizes the array to a given length.

Parameters
lengththe new length of the array

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