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

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

#include <uafieldmetadata.h>

Public Member Functions

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

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

See also
UaFieldMetaData for information about the encapsulated structure.

Constructor & Destructor Documentation

UaFieldMetaDatas::UaFieldMetaDatas ( const UaFieldMetaDatas other)

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

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

Constructs an instance of the class UaFieldMetaDatas using a raw OpcUa_FieldMetaData array.

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

Member Function Documentation

void UaFieldMetaDatas::attach ( OpcUa_UInt32  length,
OpcUa_FieldMetaData *  data 
)

Attach to a raw OpcUa_FieldMetaData array.

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

Attach to a raw OpcUa_FieldMetaData array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_FieldMetaData * UaFieldMetaDatas::detach ( )

Detach from the internal OpcUa_FieldMetaData 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_FieldMetaData array
bool UaFieldMetaDatas::operator!= ( const UaFieldMetaDatas other) const

Compare two UaFieldMetaDatas.

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

Assignment operator.

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

Compare two UaFieldMetaDatas.

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

Index operator.

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

Index operator.

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