C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaannotation.h>

Public Member Functions

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

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

See also
UaAnnotation for information about the encapsulated structure.

Constructor & Destructor Documentation

UaAnnotations::UaAnnotations ( const UaAnnotations other)

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

Parameters
otherthe other UaAnnotations used to initialize the object
UaAnnotations::UaAnnotations ( OpcUa_Int32  length,
OpcUa_Annotation data 
)

Constructs an instance of the class UaAnnotations using a raw OpcUa_Annotation array.

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

Member Function Documentation

void UaAnnotations::attach ( OpcUa_UInt32  length,
OpcUa_Annotation data 
)

Attach to a raw OpcUa_Annotation array.

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

Attach to a raw OpcUa_Annotation array.

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

Clears the array and resizes to the given length.

Parameters
lengththe new length of the array
OpcUa_Annotation * UaAnnotations::detach ( )

Detach from the internal OpcUa_Annotation 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_Annotation array
bool UaAnnotations::operator!= ( const UaAnnotations other) const

Compare two UaAnnotations.

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

Assignment operator.

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

Compare two UaAnnotations.

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

Index operator.

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

Index operator.

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