C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaarraytemplates.h>

Public Member Functions

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

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

Constructor & Destructor Documentation

UaReadValueIds::UaReadValueIds ( const UaReadValueIds other)

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

Parameters
otherthe other ReadValueIds used to initialize the object
UaReadValueIds::UaReadValueIds ( OpcUa_Int32  length,
OpcUa_ReadValueId data 
)

Constructs an instance of the class UaReadValueId using a raw OpcUa_ReadValueId array.

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

Member Function Documentation

void UaReadValueIds::attach ( OpcUa_UInt32  length,
OpcUa_ReadValueId data 
)

Attach to a raw OpcUa_ReadValueId array.

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

Attach to a raw OpcUa_ReadValueId array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_ReadValueId * UaReadValueIds::detach ( )

Detach from the internal OpcUa_ReadValueId 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_ReadValueId array
bool UaReadValueIds::operator!= ( const UaReadValueIds other) const

Compare two UaReadValueIds.

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

Assignment operator.

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

Compare two UaReadValueIds.

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

Index operator.

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

Index operator.

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