C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaxvtype.h>

Public Member Functions

 UaXVType ()
 Constructs an instance of the class UaXVType with empty default values.
 
 UaXVType (const UaXVType &other)
 Constructs an instance of the class UaXVType with values from another UaXVType object. More...
 
 UaXVType (const OpcUa_XVType &other)
 Constructs an instance of the class UaXVType with values from another OpcUa_XVType structure. More...
 
 UaXVType (OpcUa_Double x, OpcUa_Float value)
 Constructs an instance of the class UaXVType with values provided in the constructor.
 
 UaXVType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaXVType initialized with value from a UaExtensionObject. More...
 
 UaXVType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaXVType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaXVType ()
 Destroys the UaXVType object.
 
void clear ()
 Clear the data of the UaXVType. More...
 
bool operator== (const UaXVType &other) const
 Compare two UaXVType for equality. More...
 
bool operator!= (const UaXVType &other) const
 Compare two UaXVType for inequality. More...
 
UaXVTypeoperator= (const UaXVType &other)
 Assignment operator. More...
 
OpcUa_XVTypecopy () const
 Copy UaXVType data to a newly allocated OpcUa_XVType. More...
 
void copyTo (OpcUa_XVType *pDst) const
 Copy UaXVType data to an existing OpcUa_XVType structure. More...
 
void attach (OpcUa_XVType *pValue)
 Attaches to an existing OpcUa_XVType structure. More...
 
OpcUa_XVTypedetach (OpcUa_XVType *pDst)
 Detaches the internal XVType structure from this class. More...
 
OpcUa_Double getX () const
 Position on the X axis of this value.
 
OpcUa_Float getValue () const
 The value itself.
 
void setX (OpcUa_Double x)
 Position on the X axis of this value.
 
void setValue (OpcUa_Float value)
 The value itself.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_XVType.

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

Defines a physical value relative to a X axis and it is used as the DataType of the Value of XYArrayItemType.

Most analysers can produce values that can perfectly be represented with a float IEEE 32 bits, but they can position them on the X axis with an accuracy that requires double IEEE 64 bits. For example, the peak value in an absorbance spectrum where the amplitude of the peak can be represented by a float IEEE 32 bits, but its frequency position required 10 digits which implies the use of a double IEEE 64 bits.

Constructor & Destructor Documentation

UaXVType::UaXVType ( const UaXVType other)

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

Parameters
otherthe other UaXVType used to initialize the object
UaXVType::UaXVType ( const OpcUa_XVType other)

Constructs an instance of the class UaXVType with values from another OpcUa_XVType structure.

Parameters
otherthe other OpcUa_XVType used to initialize the object
UaXVType::UaXVType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the XVType
UaXVType::UaXVType ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the XVType

Member Function Documentation

void UaXVType::attach ( OpcUa_XVType pValue)

Attaches to an existing OpcUa_XVType structure.

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

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

Clear the data of the UaXVType.

OpcUa_XVType * UaXVType::clone ( const OpcUa_XVType source)
static

Copy OpcUa_XVType data to a newly allocated OpcUa_XVType.

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

Copy OpcUa_XVType data to an existing OpcUa_XVType structure.

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

Copy UaXVType data to a newly allocated OpcUa_XVType.

Returns
pointer to a newly allocated OpcUa_XVType.
void UaXVType::copyTo ( OpcUa_XVType pDst) const

Copy UaXVType data to an existing OpcUa_XVType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_XVType * UaXVType::detach ( OpcUa_XVType pDst)

Detaches the internal XVType structure from this class.

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

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

Compare two UaXVType for inequality.

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

Assignment operator.

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

Compare two UaXVType for equality.

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

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