C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

Constructor & Destructor Documentation

UaFloatArray::UaFloatArray ( const UaFloatArray other)

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

Parameters
otherthe other FloatArray used to initialize the object
UaFloatArray::UaFloatArray ( OpcUa_Int32  length,
OpcUa_Float *  data 
)

Constructs an instance of the class UaFloat using a raw OpcUa_Float array.

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

Member Function Documentation

void UaFloatArray::attach ( OpcUa_UInt32  length,
OpcUa_Float *  data 
)

Attach to a raw OpcUa_Float array.

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

Attach to a raw OpcUa_Float array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Float * UaFloatArray::detach ( )

Detach from the internal OpcUa_Float 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_Float array
bool UaFloatArray::operator!= ( const UaFloatArray other) const

Compare two UaFloatArray.

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

Assignment operator.

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

Compare two UaFloatArray.

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

Index operator.

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

Index operator.

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