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

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

#include <uapublishedvariabledatatype.h>

Public Member Functions

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

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

See also
UaPublishedVariableDataType for information about the encapsulated structure.

Constructor & Destructor Documentation

UaPublishedVariableDataTypes::UaPublishedVariableDataTypes ( const UaPublishedVariableDataTypes other)

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

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

Constructs an instance of the class UaPublishedVariableDataTypes using a raw OpcUa_PublishedVariableDataType array.

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

Member Function Documentation

void UaPublishedVariableDataTypes::attach ( OpcUa_UInt32  length,
OpcUa_PublishedVariableDataType *  data 
)

Attach to a raw OpcUa_PublishedVariableDataType array.

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

Attach to a raw OpcUa_PublishedVariableDataType array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_PublishedVariableDataType * UaPublishedVariableDataTypes::detach ( )

Detach from the internal OpcUa_PublishedVariableDataType 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_PublishedVariableDataType array
bool UaPublishedVariableDataTypes::operator!= ( const UaPublishedVariableDataTypes other) const

Compare two UaPublishedVariableDataTypes.

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

Assignment operator.

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

Compare two UaPublishedVariableDataTypes.

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

Index operator.

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

Index operator.

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