C++ Based OPC UA Client/Server SDK  1.5.5.355

Wrapper class for the UA stack structure OpcUa_ComplexNumberType. More...

#include <uacomplexnumbertype.h>

Public Member Functions

 UaComplexNumberType ()
 Constructs an instance of the class UaComplexNumberType with empty default values.
 
 UaComplexNumberType (const UaComplexNumberType &other)
 Constructs an instance of the class UaComplexNumberType with values from another UaComplexNumberType object. More...
 
 UaComplexNumberType (const OpcUa_ComplexNumberType &other)
 Constructs an instance of the class UaComplexNumberType with values from another OpcUa_ComplexNumberType structure. More...
 
 UaComplexNumberType (OpcUa_Float real, OpcUa_Float imaginary)
 Constructs an instance of the class UaComplexNumberType with values provided in the constructor.
 
 UaComplexNumberType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaComplexNumberType initialized with value from a UaExtensionObject. More...
 
 UaComplexNumberType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaComplexNumberType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaComplexNumberType ()
 Destroys the UaComplexNumberType object.
 
void clear ()
 Clear the data of the UaComplexNumberType. More...
 
bool operator== (const UaComplexNumberType &other) const
 Compare two UaComplexNumberType for equality. More...
 
bool operator!= (const UaComplexNumberType &other) const
 Compare two UaComplexNumberType for inequality. More...
 
UaComplexNumberTypeoperator= (const UaComplexNumberType &other)
 Assignment operator. More...
 
OpcUa_ComplexNumberType * copy () const
 Copy UaComplexNumberType data to a newly allocated OpcUa_ComplexNumberType. More...
 
void copyTo (OpcUa_ComplexNumberType *pDst) const
 Copy UaComplexNumberType data to an existing OpcUa_ComplexNumberType structure. More...
 
void attach (OpcUa_ComplexNumberType *pValue)
 Attaches to an existing OpcUa_ComplexNumberType structure. More...
 
OpcUa_ComplexNumberType * detach (OpcUa_ComplexNumberType *pDst)
 Detaches the internal ComplexNumberType structure from this class. More...
 
OpcUa_Float getReal () const
 Returns the Real.
 
OpcUa_Float getImaginary () const
 Returns the Imaginary.
 
void setReal (OpcUa_Float real)
 Sets the Real.
 
void setImaginary (OpcUa_Float imaginary)
 Sets the Imaginary.
 

Static Public Member Functions

static OpcUa_ComplexNumberType * clone (const OpcUa_ComplexNumberType &source)
 Copy OpcUa_ComplexNumberType data to a newly allocated OpcUa_ComplexNumberType. More...
 
static void cloneTo (const OpcUa_ComplexNumberType &source, OpcUa_ComplexNumberType &copy)
 Copy OpcUa_ComplexNumberType data to an existing OpcUa_ComplexNumberType structure. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_ComplexNumberType.

This class encapsulates the native OpcUa_ComplexNumberType structure and handles memory allocation and cleanup for you. UaComplexNumberType uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared ComplexNumberType it creates a copy for that (copy-on-write). So assigning another UaComplexNumberType or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.

Constructor & Destructor Documentation

UaComplexNumberType::UaComplexNumberType ( const UaComplexNumberType other)

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

Parameters
otherthe other UaComplexNumberType used to initialize the object
UaComplexNumberType::UaComplexNumberType ( const OpcUa_ComplexNumberType &  other)

Constructs an instance of the class UaComplexNumberType with values from another OpcUa_ComplexNumberType structure.

Parameters
otherthe other OpcUa_ComplexNumberType used to initialize the object
UaComplexNumberType::UaComplexNumberType ( const UaExtensionObject extensionObject)

Constructs an instance of the class UaComplexNumberType initialized with value from a UaExtensionObject.

Parameters
extensionObjectthe extension object containing the ComplexNumberType
UaComplexNumberType::UaComplexNumberType ( const OpcUa_ExtensionObject extensionObject)

Constructs an instance of the class UaComplexNumberType initialized with value from an OpcUa_ExtensionObject structure.

Parameters
extensionObjectthe extension object containing the ComplexNumberType

Member Function Documentation

void UaComplexNumberType::attach ( OpcUa_ComplexNumberType *  pValue)

Attaches to an existing OpcUa_ComplexNumberType structure.

Don't manually free the attached structure afterwards, because UaComplexNumberType is responsible for it now.

Parameters
pValue[in] Parameter to attach to.
void UaComplexNumberType::clear ( )

Clear the data of the UaComplexNumberType.

OpcUa_ComplexNumberType * UaComplexNumberType::clone ( const OpcUa_ComplexNumberType &  source)
static

Copy OpcUa_ComplexNumberType data to a newly allocated OpcUa_ComplexNumberType.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_ComplexNumberType.
void UaComplexNumberType::cloneTo ( const OpcUa_ComplexNumberType &  source,
OpcUa_ComplexNumberType &  copy 
)
static

Copy OpcUa_ComplexNumberType data to an existing OpcUa_ComplexNumberType structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_ComplexNumberType * UaComplexNumberType::copy ( ) const

Copy UaComplexNumberType data to a newly allocated OpcUa_ComplexNumberType.

Returns
pointer to a newly allocated OpcUa_ComplexNumberType.
void UaComplexNumberType::copyTo ( OpcUa_ComplexNumberType *  pDst) const

Copy UaComplexNumberType data to an existing OpcUa_ComplexNumberType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_ComplexNumberType * UaComplexNumberType::detach ( OpcUa_ComplexNumberType *  pDst)

Detaches the internal ComplexNumberType structure from this class.

This way you take over the control of freeing the ComplexNumberType data. If more than one reference exists, the data is copied to pDst instead of being detached.

Parameters
pDst[out] Pointer to an OpcUa_ComplexNumberType structure that receives the ComplexNumberType data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
bool UaComplexNumberType::operator!= ( const UaComplexNumberType other) const

Compare two UaComplexNumberType for inequality.

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

Assignment operator.

Parameters
otherthe UaComplexNumberType to assign.
Returns
reference to itself.
bool UaComplexNumberType::operator== ( const UaComplexNumberType other) const

Compare two UaComplexNumberType for equality.

Parameters
otherthe UaComplexNumberType to compare with.
Returns
true if equal, false if not.

The documentation for this class was generated from the following files: