Array class for the UA stack structure OpcUa_Variant.
More...
#include <uaarraytemplates.h>
Array class for the UA stack structure OpcUa_Variant.
This class encapsulates an array of the native OpcUa_Variant structure and handles memory allocation and cleanup for you.
- See also
- UaVariant for information about the encapsulated structure.
Constructs an instance of the class VariantArray with values from another VariantArray object.
- Parameters
-
other | the other VariantArray used to initialize the object |
UaVariantArray::UaVariantArray |
( |
OpcUa_Int32 |
length, |
|
|
OpcUa_Variant * |
data |
|
) |
| |
void UaVariantArray::attach |
( |
OpcUa_UInt32 |
length, |
|
|
OpcUa_Variant * |
data |
|
) |
| |
Attach to a raw OpcUa_Variant array.
- Note
- Don't manually free the attached data afterwards, because UaVariantArray is responsible for it now.
- Parameters
-
void UaVariantArray::attach |
( |
OpcUa_Int32 |
length, |
|
|
OpcUa_Variant * |
data |
|
) |
| |
Attach to a raw OpcUa_Variant array.
- Note
- Don't manually free the attached data afterwards, because UaVariantArray is responsible for it now.
- Parameters
-
void UaVariantArray::create |
( |
OpcUa_UInt32 |
length | ) |
|
Clears the array and resizes to the given length.
- Parameters
-
length | the new length of the array |
Detach from the internal OpcUa_Variant 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_Variant array
Compare two UaVariantArray.
- See also
- operator==
- Parameters
-
- Returns
- true if not equal, false otherwise.
Assignment operator.
- Parameters
-
Compare two UaVariantArray.
- Parameters
-
- Returns
- true if equal, false if not.
const OpcUa_Variant & UaVariantArray::operator[] |
( |
OpcUa_UInt32 |
index | ) |
const |
Index operator.
- Parameters
-
index | the index of the structure to return. |
Index operator.
- Parameters
-
index | the index of the structure to return. |
void UaVariantArray::resize |
( |
OpcUa_UInt32 |
length | ) |
|
Resizes the array to a given length.
- Parameters
-
length | the new length of the array |
The documentation for this class was generated from the following files:
- D:/work/uasdkcpp/src/uabase/uabasecpp/uaarraytemplates.h
- D:/work/uasdkcpp/src/uabase/uabasecpp/uaarraytemplates.cpp