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

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

#include <uastructurefielddatatype.h>

Public Member Functions

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

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

See also
UaStructureFieldDataType for information about the encapsulated structure.

Constructor & Destructor Documentation

UaStructureFieldDataTypes::UaStructureFieldDataTypes ( const UaStructureFieldDataTypes other)

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

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

Constructs an instance of the class UaStructureFieldDataTypes using a raw OpcUa_StructureField array.

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

Member Function Documentation

void UaStructureFieldDataTypes::attach ( OpcUa_UInt32  length,
OpcUa_StructureField *  data 
)

Attach to a raw OpcUa_StructureField array.

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

Attach to a raw OpcUa_StructureField array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_StructureField * UaStructureFieldDataTypes::detach ( )

Detach from the internal OpcUa_StructureField 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_StructureField array
bool UaStructureFieldDataTypes::operator!= ( const UaStructureFieldDataTypes other) const

Compare two UaStructureFieldDataTypes.

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

Assignment operator.

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

Compare two UaStructureFieldDataTypes.

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

Index operator.

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

Index operator.

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