C++ Based OPC UA Client/Server SDK  1.5.3.346

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

See also
UaStatusCode for information about the encapsulated structure.

Constructor & Destructor Documentation

UaStatusCodeArray::UaStatusCodeArray ( const UaStatusCodeArray other)

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

Parameters
otherthe other StatusCodeArray used to initialize the object
UaStatusCodeArray::UaStatusCodeArray ( OpcUa_Int32  length,
OpcUa_StatusCode data 
)

Constructs an instance of the class UaStatusCode using a raw OpcUa_StatusCode array.

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

Member Function Documentation

void UaStatusCodeArray::attach ( OpcUa_UInt32  length,
OpcUa_StatusCode data 
)

Attach to a raw OpcUa_StatusCode array.

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

Attach to a raw OpcUa_StatusCode array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_StatusCode * UaStatusCodeArray::detach ( )

Detach from the internal OpcUa_StatusCode 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_StatusCode array
bool UaStatusCodeArray::operator!= ( const UaStatusCodeArray other) const

Compare two UaStatusCodeArray.

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

Assignment operator.

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

Compare two UaStatusCodeArray.

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

Index operator.

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

Index operator.

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