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

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

#include <uacurrencyunittype.h>

Public Member Functions

 UaCurrencyUnitType ()
 Constructs an instance of the class UaCurrencyUnitType with empty default values.
 
 UaCurrencyUnitType (const UaCurrencyUnitType &other)
 Constructs an instance of the class UaCurrencyUnitType with values from another UaCurrencyUnitType object. More...
 
 UaCurrencyUnitType (const OpcUa_CurrencyUnitType &other)
 Constructs an instance of the class UaCurrencyUnitType with values from another OpcUa_CurrencyUnitType structure. More...
 
 UaCurrencyUnitType (OpcUa_Int16 numericCode, OpcUa_SByte exponent, const UaString &alphabeticCode, const UaLocalizedText &currency)
 Constructs an instance of the class UaCurrencyUnitType with values provided in the constructor.
 
 UaCurrencyUnitType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaCurrencyUnitType initialized with value from a UaExtensionObject. More...
 
 UaCurrencyUnitType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaCurrencyUnitType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaCurrencyUnitType ()
 Destroys the UaCurrencyUnitType object.
 
void clear ()
 Clear the data of the UaCurrencyUnitType. More...
 
bool operator== (const UaCurrencyUnitType &other) const
 Compare two UaCurrencyUnitType for equality. More...
 
bool operator!= (const UaCurrencyUnitType &other) const
 Compare two UaCurrencyUnitType for inequality. More...
 
UaCurrencyUnitTypeoperator= (const UaCurrencyUnitType &other)
 Assignment operator. More...
 
OpcUa_CurrencyUnitType * copy () const
 Copy UaCurrencyUnitType data to a newly allocated OpcUa_CurrencyUnitType. More...
 
void copyTo (OpcUa_CurrencyUnitType *pDst) const
 Copy UaCurrencyUnitType data to an existing OpcUa_CurrencyUnitType structure. More...
 
void attach (OpcUa_CurrencyUnitType *pValue)
 Attaches to an existing OpcUa_CurrencyUnitType structure. More...
 
OpcUa_CurrencyUnitType * detach (OpcUa_CurrencyUnitType *pDst)
 Detaches the internal CurrencyUnitType structure from this class. More...
 
OpcUa_Int16 getNumericCode () const
 Returns the NumericCode.
 
OpcUa_SByte getExponent () const
 Returns the Exponent.
 
UaString getAlphabeticCode () const
 Returns the AlphabeticCode.
 
UaLocalizedText getCurrency () const
 Returns the Currency.
 
void setNumericCode (OpcUa_Int16 numericCode)
 Sets the NumericCode.
 
void setExponent (OpcUa_SByte exponent)
 Sets the Exponent.
 
void setAlphabeticCode (const UaString &alphabeticCode)
 Sets the AlphabeticCode.
 
void setCurrency (const UaLocalizedText &currency)
 Sets the Currency.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_CurrencyUnitType.

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

Constructor & Destructor Documentation

UaCurrencyUnitType::UaCurrencyUnitType ( const UaCurrencyUnitType other)

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

Parameters
otherthe other UaCurrencyUnitType used to initialize the object
UaCurrencyUnitType::UaCurrencyUnitType ( const OpcUa_CurrencyUnitType &  other)

Constructs an instance of the class UaCurrencyUnitType with values from another OpcUa_CurrencyUnitType structure.

Parameters
otherthe other OpcUa_CurrencyUnitType used to initialize the object
UaCurrencyUnitType::UaCurrencyUnitType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the CurrencyUnitType
UaCurrencyUnitType::UaCurrencyUnitType ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the CurrencyUnitType

Member Function Documentation

void UaCurrencyUnitType::attach ( OpcUa_CurrencyUnitType *  pValue)

Attaches to an existing OpcUa_CurrencyUnitType structure.

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

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

Clear the data of the UaCurrencyUnitType.

OpcUa_CurrencyUnitType * UaCurrencyUnitType::clone ( const OpcUa_CurrencyUnitType &  source)
static

Copy OpcUa_CurrencyUnitType data to a newly allocated OpcUa_CurrencyUnitType.

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

Copy OpcUa_CurrencyUnitType data to an existing OpcUa_CurrencyUnitType structure.

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

Copy UaCurrencyUnitType data to a newly allocated OpcUa_CurrencyUnitType.

Returns
pointer to a newly allocated OpcUa_CurrencyUnitType.
void UaCurrencyUnitType::copyTo ( OpcUa_CurrencyUnitType *  pDst) const

Copy UaCurrencyUnitType data to an existing OpcUa_CurrencyUnitType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_CurrencyUnitType * UaCurrencyUnitType::detach ( OpcUa_CurrencyUnitType *  pDst)

Detaches the internal CurrencyUnitType structure from this class.

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

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

Compare two UaCurrencyUnitType for inequality.

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

Assignment operator.

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

Compare two UaCurrencyUnitType for equality.

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

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