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

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

#include <uapubsubconnectiondatatype.h>

Public Member Functions

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

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

See also
UaPubSubConnectionDataType for information about the encapsulated structure.

Constructor & Destructor Documentation

UaPubSubConnectionDataTypes::UaPubSubConnectionDataTypes ( const UaPubSubConnectionDataTypes other)

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

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

Constructs an instance of the class UaPubSubConnectionDataTypes using a raw OpcUa_PubSubConnectionDataType array.

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

Member Function Documentation

void UaPubSubConnectionDataTypes::attach ( OpcUa_UInt32  length,
OpcUa_PubSubConnectionDataType *  data 
)

Attach to a raw OpcUa_PubSubConnectionDataType array.

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

Attach to a raw OpcUa_PubSubConnectionDataType array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_PubSubConnectionDataType * UaPubSubConnectionDataTypes::detach ( )

Detach from the internal OpcUa_PubSubConnectionDataType 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_PubSubConnectionDataType array
bool UaPubSubConnectionDataTypes::operator!= ( const UaPubSubConnectionDataTypes other) const

Compare two UaPubSubConnectionDataTypes.

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

Assignment operator.

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

Compare two UaPubSubConnectionDataTypes.

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

Index operator.

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

Index operator.

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