UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaXVType Class Reference

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 if they are similar. More...
 
bool operator!= (const UaXVType &other) const
 Returns true if the other UaXVType is not equal to this. More...
 
UaXVTypeoperator= (const UaXVType &other)
 Assignment operator. More...
 
OpcUa_XVType * copy () 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 the data of the parameter pValue. More...
 
OpcUa_XVType * detach (OpcUa_XVType *pDst)
 Detaches the internal XVType structure from this class. More...
 

Static Public Member Functions

static OpcUa_XVType * clone (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.

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 the data of the parameter pValue.

Don't clear the data of pValue afterwards manually, because UaXVType is responsible for it now.

Parameters
[in]pValueParameter 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
new copy.
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
data 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 releasing the XVType data. If more than one reference exists, the data is copied to pDst instead of being detached.

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

Returns true if the other UaXVType is not equal to this.

See Also
operator==
Parameters
otherthe UaXVType to compare.
Returns
true if other is not equal to this.
UaXVType & UaXVType::operator= ( const UaXVType other)

Assignment operator.

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

Compare two UaXVType if they are similar.

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

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