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

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

#include <uaenumvaluetype.h>

Public Member Functions

 UaEnumValueType ()
 Constructs an instance of the class UaEnumValueType with empty default values.
 
 UaEnumValueType (const UaEnumValueType &other)
 Constructs an instance of the class UaEnumValueType with values from another UaEnumValueType object. More...
 
 UaEnumValueType (const OpcUa_EnumValueType &other)
 Constructs an instance of the class UaEnumValueType with values from another OpcUa_EnumValueType structure. More...
 
 UaEnumValueType (OpcUa_Int64 value, const UaLocalizedText &displayName, const UaLocalizedText &description)
 Constructs an instance of the class UaEnumValueType with values provided in the constructor.
 
 UaEnumValueType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaEnumValueType initialized with value from a UaExtensionObject. More...
 
 UaEnumValueType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaEnumValueType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaEnumValueType ()
 Destroys the UaEnumValueType object.
 
void clear ()
 Clear the data of the UaEnumValueType. More...
 
bool operator== (const UaEnumValueType &other) const
 Compare two UaEnumValueType for equality. More...
 
bool operator!= (const UaEnumValueType &other) const
 Compare two UaEnumValueType for inequality. More...
 
UaEnumValueTypeoperator= (const UaEnumValueType &other)
 Assignment operator. More...
 
OpcUa_EnumValueTypecopy () const
 Copy UaEnumValueType data to a newly allocated OpcUa_EnumValueType. More...
 
void copyTo (OpcUa_EnumValueType *pDst) const
 Copy UaEnumValueType data to an existing OpcUa_EnumValueType structure. More...
 
void attach (OpcUa_EnumValueType *pValue)
 Attaches to an existing OpcUa_EnumValueType structure. More...
 
OpcUa_EnumValueTypedetach (OpcUa_EnumValueType *pDst)
 Detaches the internal EnumValueType structure from this class. More...
 
OpcUa_Int64 getValue () const
 The Integer representation of an Enumeration.
 
UaLocalizedText getDisplayName () const
 A human-readable representation of the Value of the Enumeration.
 
UaLocalizedText getDescription () const
 A localized description of the enumeration value. More...
 
void setValue (OpcUa_Int64 value)
 The Integer representation of an Enumeration.
 
void setDisplayName (const UaLocalizedText &displayName)
 A human-readable representation of the Value of the Enumeration.
 
void setDescription (const UaLocalizedText &description)
 A localized description of the enumeration value. More...
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_EnumValueType.

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

A mapping between a value of an enumerated type and a name and description.

When this type is used in an array representing human readable representations of an enumeration, each Value shall be unique in that array.

Constructor & Destructor Documentation

UaEnumValueType::UaEnumValueType ( const UaEnumValueType other)

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

Parameters
otherthe other UaEnumValueType used to initialize the object
UaEnumValueType::UaEnumValueType ( const OpcUa_EnumValueType other)

Constructs an instance of the class UaEnumValueType with values from another OpcUa_EnumValueType structure.

Parameters
otherthe other OpcUa_EnumValueType used to initialize the object
UaEnumValueType::UaEnumValueType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the EnumValueType
UaEnumValueType::UaEnumValueType ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the EnumValueType

Member Function Documentation

void UaEnumValueType::attach ( OpcUa_EnumValueType pValue)

Attaches to an existing OpcUa_EnumValueType structure.

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

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

Clear the data of the UaEnumValueType.

OpcUa_EnumValueType * UaEnumValueType::clone ( const OpcUa_EnumValueType source)
static

Copy OpcUa_EnumValueType data to a newly allocated OpcUa_EnumValueType.

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

Copy OpcUa_EnumValueType data to an existing OpcUa_EnumValueType structure.

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

Copy UaEnumValueType data to a newly allocated OpcUa_EnumValueType.

Returns
pointer to a newly allocated OpcUa_EnumValueType.
void UaEnumValueType::copyTo ( OpcUa_EnumValueType pDst) const

Copy UaEnumValueType data to an existing OpcUa_EnumValueType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_EnumValueType * UaEnumValueType::detach ( OpcUa_EnumValueType pDst)

Detaches the internal EnumValueType structure from this class.

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

Parameters
pDst[out] Pointer to an OpcUa_EnumValueType structure that receives the EnumValueType data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
UaLocalizedText UaEnumValueType::getDescription ( ) const

A localized description of the enumeration value.

This field can contain an empty string if no description is available.

bool UaEnumValueType::operator!= ( const UaEnumValueType other) const

Compare two UaEnumValueType for inequality.

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

Assignment operator.

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

Compare two UaEnumValueType for equality.

Parameters
otherthe UaEnumValueType to compare with.
Returns
true if equal, false if not.
void UaEnumValueType::setDescription ( const UaLocalizedText description)

A localized description of the enumeration value.

This field can contain an empty string if no description is available.


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