C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

See also
UaExtensionObject for information about the encapsulated structure.

Constructor & Destructor Documentation

UaExtensionObjectArray::UaExtensionObjectArray ( const UaExtensionObjectArray other)

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

Parameters
otherthe other ExtensionObjectArray used to initialize the object
UaExtensionObjectArray::UaExtensionObjectArray ( OpcUa_Int32  length,
OpcUa_ExtensionObject data 
)

Constructs an instance of the class UaExtensionObject using a raw OpcUa_ExtensionObject array.

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

Member Function Documentation

void UaExtensionObjectArray::attach ( OpcUa_UInt32  length,
OpcUa_ExtensionObject data 
)

Attach to a raw OpcUa_ExtensionObject array.

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

Attach to a raw OpcUa_ExtensionObject array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_ExtensionObject * UaExtensionObjectArray::detach ( )

Detach from the internal OpcUa_ExtensionObject 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_ExtensionObject array
bool UaExtensionObjectArray::operator!= ( const UaExtensionObjectArray other) const

Compare two UaExtensionObjectArray.

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

Assignment operator.

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

Compare two UaExtensionObjectArray.

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

Index operator.

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

Index operator.

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