Array class for the UA stack structure OpcUa_String.
More...
#include <uaarraytemplates.h>
Array class for the UA stack structure OpcUa_String.
This class encapsulates an array of the native OpcUa_String structure and handles memory allocation and cleanup for you.
- See also
- UaString for information about the encapsulated structure.
Constructs an instance of the class StringArray with values from another StringArray object.
- Parameters
-
other | the other StringArray used to initialize the object |
UaStringArray::UaStringArray |
( |
OpcUa_Int32 |
length, |
|
|
OpcUa_String * |
data |
|
) |
| |
void UaStringArray::attach |
( |
OpcUa_UInt32 |
length, |
|
|
OpcUa_String * |
data |
|
) |
| |
Attach to a raw OpcUa_String array.
- Note
- Don't manually free the attached data afterwards, because UaStringArray is responsible for it now.
- Parameters
-
void UaStringArray::attach |
( |
OpcUa_Int32 |
length, |
|
|
OpcUa_String * |
data |
|
) |
| |
Attach to a raw OpcUa_String array.
- Note
- Don't manually free the attached data afterwards, because UaStringArray is responsible for it now.
- Parameters
-
void UaStringArray::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_String 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_String array
bool UaStringArray::operator!= |
( |
const UaStringArray & |
other | ) |
const |
Compare two UaStringArray.
- See also
- operator==
- Parameters
-
- Returns
- true if not equal, false otherwise.
Assignment operator.
- Parameters
-
bool UaStringArray::operator== |
( |
const UaStringArray & |
other | ) |
const |
Compare two UaStringArray.
- Parameters
-
- Returns
- true if equal, false if not.
const OpcUa_String & UaStringArray::operator[] |
( |
OpcUa_UInt32 |
index | ) |
const |
Index operator.
- Parameters
-
index | the index of the structure to return. |
OpcUa_String & UaStringArray::operator[] |
( |
OpcUa_UInt32 |
index | ) |
|
Index operator.
- Parameters
-
index | the index of the structure to return. |
void UaStringArray::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:
- C:/work/uasdkcpp/src/uabase/uabasecpp/uaarraytemplates.h
- C:/work/uasdkcpp/src/uabase/uabasecpp/uaarraytemplates.cpp