C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

Constructor & Destructor Documentation

UaWriteValues::UaWriteValues ( const UaWriteValues other)

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

Parameters
otherthe other WriteValues used to initialize the object
UaWriteValues::UaWriteValues ( OpcUa_Int32  length,
OpcUa_WriteValue data 
)

Constructs an instance of the class UaWriteValue using a raw OpcUa_WriteValue array.

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

Member Function Documentation

void UaWriteValues::attach ( OpcUa_UInt32  length,
OpcUa_WriteValue data 
)

Attach to a raw OpcUa_WriteValue array.

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

Attach to a raw OpcUa_WriteValue array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_WriteValue * UaWriteValues::detach ( )

Detach from the internal OpcUa_WriteValue 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_WriteValue array
bool UaWriteValues::operator!= ( const UaWriteValues other) const

Compare two UaWriteValues.

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

Assignment operator.

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

Compare two UaWriteValues.

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

Index operator.

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

Index operator.

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