C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

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

#include <uaarraytemplates.h>

Public Member Functions

 UaBooleanArray ()
 Constructs an empty instance of the class UaBooleanArray.
 
 UaBooleanArray (const UaBooleanArray &other)
 Constructs an instance of the class BooleanArray with values from another BooleanArray object. More...
 
 UaBooleanArray (OpcUa_Int32 length, OpcUa_Boolean *data)
 Constructs an instance of the class UaBoolean using a raw OpcUa_Boolean array. More...
 
virtual ~UaBooleanArray ()
 Destroys the UaBooleanArray object.
 
UaBooleanArrayoperator= (const UaBooleanArray &other)
 Assignment operator. More...
 
const OpcUa_Boolean & operator[] (OpcUa_UInt32 index) const
 Index operator. More...
 
OpcUa_Boolean & operator[] (OpcUa_UInt32 index)
 Index operator. More...
 
bool operator== (const UaBooleanArray &other) const
 Compare two UaBooleanArray. More...
 
bool operator!= (const UaBooleanArray &other) const
 Compare two UaBooleanArray. More...
 
void attach (OpcUa_UInt32 length, OpcUa_Boolean *data)
 Attach to a raw OpcUa_Boolean array. More...
 
void attach (OpcUa_Int32 length, OpcUa_Boolean *data)
 Attach to a raw OpcUa_Boolean array. More...
 
OpcUa_Boolean * detach ()
 Detach from the internal OpcUa_Boolean 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_Boolean.

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

Constructor & Destructor Documentation

UaBooleanArray::UaBooleanArray ( const UaBooleanArray other)

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

Parameters
otherthe other BooleanArray used to initialize the object
UaBooleanArray::UaBooleanArray ( OpcUa_Int32  length,
OpcUa_Boolean *  data 
)

Constructs an instance of the class UaBoolean using a raw OpcUa_Boolean array.

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

Member Function Documentation

void UaBooleanArray::attach ( OpcUa_UInt32  length,
OpcUa_Boolean *  data 
)

Attach to a raw OpcUa_Boolean array.

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

Attach to a raw OpcUa_Boolean array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Boolean * UaBooleanArray::detach ( )

Detach from the internal OpcUa_Boolean 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_Boolean array
bool UaBooleanArray::operator!= ( const UaBooleanArray other) const

Compare two UaBooleanArray.

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

Assignment operator.

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

Compare two UaBooleanArray.

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

Index operator.

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

Index operator.

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