C++ Based OPC UA Client/Server SDK  1.6.2.402
UaEnumDefinitionDataTypes Class Reference

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

#include <uaenumdefinitiondatatype.h>

Public Member Functions

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

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

See also
UaEnumDefinitionDataType for information about the encapsulated structure.

Constructor & Destructor Documentation

UaEnumDefinitionDataTypes::UaEnumDefinitionDataTypes ( const UaEnumDefinitionDataTypes other)

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

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

Constructs an instance of the class UaEnumDefinitionDataTypes using a raw OpcUa_EnumDefinition array.

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

Member Function Documentation

void UaEnumDefinitionDataTypes::attach ( OpcUa_UInt32  length,
OpcUa_EnumDefinition *  data 
)

Attach to a raw OpcUa_EnumDefinition array.

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

Attach to a raw OpcUa_EnumDefinition array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_EnumDefinition * UaEnumDefinitionDataTypes::detach ( )

Detach from the internal OpcUa_EnumDefinition 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_EnumDefinition array
bool UaEnumDefinitionDataTypes::operator!= ( const UaEnumDefinitionDataTypes other) const

Compare two UaEnumDefinitionDataTypes.

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

Assignment operator.

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

Compare two UaEnumDefinitionDataTypes.

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

Index operator.

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

Index operator.

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