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

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

#include <uathreedvector.h>

Public Member Functions

 UaThreeDVector ()
 Constructs an instance of the class UaThreeDVector with empty default values.
 
 UaThreeDVector (const UaThreeDVector &other)
 Constructs an instance of the class UaThreeDVector with values from another UaThreeDVector object. More...
 
 UaThreeDVector (const OpcUa_ThreeDVector &other)
 Constructs an instance of the class UaThreeDVector with values from another OpcUa_ThreeDVector structure. More...
 
 UaThreeDVector (OpcUa_Double x, OpcUa_Double y, OpcUa_Double z)
 Constructs an instance of the class UaThreeDVector with values provided in the constructor.
 
 UaThreeDVector (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaThreeDVector initialized with value from a UaExtensionObject. More...
 
 UaThreeDVector (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaThreeDVector initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaThreeDVector ()
 Destroys the UaThreeDVector object.
 
void clear ()
 Clear the data of the UaThreeDVector. More...
 
bool operator== (const UaThreeDVector &other) const
 Compare two UaThreeDVector for equality. More...
 
bool operator!= (const UaThreeDVector &other) const
 Compare two UaThreeDVector for inequality. More...
 
UaThreeDVectoroperator= (const UaThreeDVector &other)
 Assignment operator. More...
 
OpcUa_ThreeDVector * copy () const
 Copy UaThreeDVector data to a newly allocated OpcUa_ThreeDVector. More...
 
void copyTo (OpcUa_ThreeDVector *pDst) const
 Copy UaThreeDVector data to an existing OpcUa_ThreeDVector structure. More...
 
void attach (OpcUa_ThreeDVector *pValue)
 Attaches to an existing OpcUa_ThreeDVector structure. More...
 
OpcUa_ThreeDVector * detach (OpcUa_ThreeDVector *pDst)
 Detaches the internal ThreeDVector structure from this class. More...
 
OpcUa_Double getX () const
 Returns the X.
 
OpcUa_Double getY () const
 Returns the Y.
 
OpcUa_Double getZ () const
 Returns the Z.
 
void setX (OpcUa_Double x)
 Sets the X.
 
void setY (OpcUa_Double y)
 Sets the Y.
 
void setZ (OpcUa_Double z)
 Sets the Z.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_ThreeDVector.

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

Constructor & Destructor Documentation

UaThreeDVector::UaThreeDVector ( const UaThreeDVector other)

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

Parameters
otherthe other UaThreeDVector used to initialize the object
UaThreeDVector::UaThreeDVector ( const OpcUa_ThreeDVector &  other)

Constructs an instance of the class UaThreeDVector with values from another OpcUa_ThreeDVector structure.

Parameters
otherthe other OpcUa_ThreeDVector used to initialize the object
UaThreeDVector::UaThreeDVector ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the ThreeDVector
UaThreeDVector::UaThreeDVector ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the ThreeDVector

Member Function Documentation

void UaThreeDVector::attach ( OpcUa_ThreeDVector *  pValue)

Attaches to an existing OpcUa_ThreeDVector structure.

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

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

Clear the data of the UaThreeDVector.

OpcUa_ThreeDVector * UaThreeDVector::clone ( const OpcUa_ThreeDVector &  source)
static

Copy OpcUa_ThreeDVector data to a newly allocated OpcUa_ThreeDVector.

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

Copy OpcUa_ThreeDVector data to an existing OpcUa_ThreeDVector structure.

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

Copy UaThreeDVector data to a newly allocated OpcUa_ThreeDVector.

Returns
pointer to a newly allocated OpcUa_ThreeDVector.
void UaThreeDVector::copyTo ( OpcUa_ThreeDVector *  pDst) const

Copy UaThreeDVector data to an existing OpcUa_ThreeDVector structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_ThreeDVector * UaThreeDVector::detach ( OpcUa_ThreeDVector *  pDst)

Detaches the internal ThreeDVector structure from this class.

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

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

Compare two UaThreeDVector for inequality.

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

Assignment operator.

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

Compare two UaThreeDVector for equality.

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

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