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

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

Constructor & Destructor Documentation

UaInt32Array::UaInt32Array ( const UaInt32Array other)

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

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

Constructs an instance of the class UaInt32 using a raw OpcUa_Int32 array.

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

Member Function Documentation

void UaInt32Array::attach ( OpcUa_UInt32  length,
OpcUa_Int32 *  data 
)

Attach to a raw OpcUa_Int32 array.

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

Attach to a raw OpcUa_Int32 array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Int32 * UaInt32Array::detach ( )

Detach from the internal OpcUa_Int32 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_Int32 array
bool UaInt32Array::operator!= ( const UaInt32Array other) const

Compare two UaInt32Array.

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

Assignment operator.

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

Compare two UaInt32Array.

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

Index operator.

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

Index operator.

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