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

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

#include <uaenumfield.h>

Public Member Functions

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

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

See also
UaEnumField for information about the encapsulated structure.

Constructor & Destructor Documentation

UaEnumFields::UaEnumFields ( const UaEnumFields other)

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

Parameters
otherthe other UaEnumFields used to initialize the object
UaEnumFields::UaEnumFields ( OpcUa_Int32  length,
OpcUa_EnumField *  data 
)

Constructs an instance of the class UaEnumFields using a raw OpcUa_EnumField array.

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

Member Function Documentation

void UaEnumFields::attach ( OpcUa_UInt32  length,
OpcUa_EnumField *  data 
)

Attach to a raw OpcUa_EnumField array.

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

Attach to a raw OpcUa_EnumField array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_EnumField * UaEnumFields::detach ( )

Detach from the internal OpcUa_EnumField 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_EnumField array
bool UaEnumFields::operator!= ( const UaEnumFields other) const

Compare two UaEnumFields.

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

Assignment operator.

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

Compare two UaEnumFields.

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

Index operator.

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

Index operator.

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