C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaStructureDefinitionDataTypes Class Reference

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

#include <uastructuredefinitiondatatype.h>

Public Member Functions

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

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

See also
UaStructureDefinitionDataType for information about the encapsulated structure.

Constructor & Destructor Documentation

UaStructureDefinitionDataTypes::UaStructureDefinitionDataTypes ( const UaStructureDefinitionDataTypes other)

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

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

Constructs an instance of the class UaStructureDefinitionDataTypes using a raw OpcUa_StructureDefinition array.

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

Member Function Documentation

void UaStructureDefinitionDataTypes::attach ( OpcUa_UInt32  length,
OpcUa_StructureDefinition *  data 
)

Attach to a raw OpcUa_StructureDefinition array.

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

Attach to a raw OpcUa_StructureDefinition array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_StructureDefinition * UaStructureDefinitionDataTypes::detach ( )

Detach from the internal OpcUa_StructureDefinition 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_StructureDefinition array
bool UaStructureDefinitionDataTypes::operator!= ( const UaStructureDefinitionDataTypes other) const

Compare two UaStructureDefinitionDataTypes.

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

Assignment operator.

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

Compare two UaStructureDefinitionDataTypes.

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

Index operator.

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

Index operator.

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