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

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

#include <uaargument.h>

Public Member Functions

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

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

See also
UaArgument for information about the encapsulated structure.

Constructor & Destructor Documentation

UaArguments::UaArguments ( const UaArguments other)

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

Parameters
otherthe other UaArguments used to initialize the object
UaArguments::UaArguments ( OpcUa_Int32  length,
OpcUa_Argument data 
)

Constructs an instance of the class UaArguments using a raw OpcUa_Argument array.

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

Member Function Documentation

void UaArguments::attach ( OpcUa_UInt32  length,
OpcUa_Argument data 
)

Attach to a raw OpcUa_Argument array.

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

Attach to a raw OpcUa_Argument array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Argument * UaArguments::detach ( )

Detach from the internal OpcUa_Argument 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_Argument array
bool UaArguments::operator!= ( const UaArguments other) const

Compare two UaArguments.

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

Assignment operator.

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

Compare two UaArguments.

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

Index operator.

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

Index operator.

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