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

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

#include <uaarraytemplates.h>

Public Member Functions

 UaDoubleArray ()
 Constructs an empty instance of the class UaDoubleArray.
 
 UaDoubleArray (const UaDoubleArray &other)
 Constructs an instance of the class DoubleArray with values from another DoubleArray object. More...
 
 UaDoubleArray (OpcUa_Int32 length, OpcUa_Double *data)
 Constructs an instance of the class UaDouble using a raw OpcUa_Double array. More...
 
virtual ~UaDoubleArray ()
 Destroys the UaDoubleArray object.
 
UaDoubleArrayoperator= (const UaDoubleArray &other)
 Assignment operator. More...
 
const OpcUa_Double & operator[] (OpcUa_UInt32 index) const
 Index operator. More...
 
OpcUa_Double & operator[] (OpcUa_UInt32 index)
 Index operator. More...
 
bool operator== (const UaDoubleArray &other) const
 Compare two UaDoubleArray. More...
 
bool operator!= (const UaDoubleArray &other) const
 Compare two UaDoubleArray. More...
 
void attach (OpcUa_UInt32 length, OpcUa_Double *data)
 Attach to a raw OpcUa_Double array. More...
 
void attach (OpcUa_Int32 length, OpcUa_Double *data)
 Attach to a raw OpcUa_Double array. More...
 
OpcUa_Double * detach ()
 Detach from the internal OpcUa_Double 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_Double.

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

Constructor & Destructor Documentation

UaDoubleArray::UaDoubleArray ( const UaDoubleArray other)

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

Parameters
otherthe other DoubleArray used to initialize the object
UaDoubleArray::UaDoubleArray ( OpcUa_Int32  length,
OpcUa_Double *  data 
)

Constructs an instance of the class UaDouble using a raw OpcUa_Double array.

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

Member Function Documentation

void UaDoubleArray::attach ( OpcUa_UInt32  length,
OpcUa_Double *  data 
)

Attach to a raw OpcUa_Double array.

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

Attach to a raw OpcUa_Double array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Double * UaDoubleArray::detach ( )

Detach from the internal OpcUa_Double 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_Double array
bool UaDoubleArray::operator!= ( const UaDoubleArray other) const

Compare two UaDoubleArray.

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

Assignment operator.

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

Compare two UaDoubleArray.

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

Index operator.

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

Index operator.

Parameters
indexthe index of the structure to return.
void UaDoubleArray::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: