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

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

See also
UaNodeId for information about the encapsulated structure.

Constructor & Destructor Documentation

UaNodeIdArray::UaNodeIdArray ( const UaNodeIdArray other)

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

Parameters
otherthe other NodeIdArray used to initialize the object
UaNodeIdArray::UaNodeIdArray ( OpcUa_Int32  length,
OpcUa_NodeId data 
)

Constructs an instance of the class UaNodeId using a raw OpcUa_NodeId array.

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

Member Function Documentation

void UaNodeIdArray::attach ( OpcUa_UInt32  length,
OpcUa_NodeId data 
)

Attach to a raw OpcUa_NodeId array.

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

Attach to a raw OpcUa_NodeId array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_NodeId * UaNodeIdArray::detach ( )

Detach from the internal OpcUa_NodeId 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_NodeId array
bool UaNodeIdArray::operator!= ( const UaNodeIdArray other) const

Compare two UaNodeIdArray.

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

Assignment operator.

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

Compare two UaNodeIdArray.

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

Index operator.

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

Index operator.

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