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

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

#include <uarange.h>

Public Member Functions

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

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

See also
UaRange for information about the encapsulated structure.

Constructor & Destructor Documentation

UaRanges::UaRanges ( const UaRanges other)

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

Parameters
otherthe other UaRanges used to initialize the object
UaRanges::UaRanges ( OpcUa_Int32  length,
OpcUa_Range data 
)

Constructs an instance of the class UaRanges using a raw OpcUa_Range array.

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

Member Function Documentation

void UaRanges::attach ( OpcUa_UInt32  length,
OpcUa_Range data 
)

Attach to a raw OpcUa_Range array.

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

Attach to a raw OpcUa_Range array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Range * UaRanges::detach ( )

Detach from the internal OpcUa_Range 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_Range array
bool UaRanges::operator!= ( const UaRanges other) const

Compare two UaRanges.

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

Assignment operator.

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

Compare two UaRanges.

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

Index operator.

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

Index operator.

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