C++ Based OPC UA Client/Server/PubSub SDK
1.7.8.584
|
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... | |
UaEnumValueType & | operator= (const UaEnumValueType &other) |
Assignment operator. More... | |
OpcUa_EnumValueType * | copy () 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_EnumValueType * | detach (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_EnumValueType * | clone (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 OpcUa_EnumValueType data to an existing OpcUa_EnumValueType structure. More... | |
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.
UaEnumValueType::UaEnumValueType | ( | const UaEnumValueType & | other | ) |
Constructs an instance of the class UaEnumValueType with values from another UaEnumValueType object.
other | the 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.
other | the 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.
extensionObject | the 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.
extensionObject | the extension object containing the EnumValueType |
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.
pValue | [in] Parameter to attach to. |
void UaEnumValueType::clear | ( | ) |
Clear the data of the UaEnumValueType.
|
static |
Copy OpcUa_EnumValueType data to a newly allocated OpcUa_EnumValueType.
source | Source to clone. |
|
static |
Copy OpcUa_EnumValueType data to an existing OpcUa_EnumValueType structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_EnumValueType * UaEnumValueType::copy | ( | ) | const |
Copy UaEnumValueType data to a newly allocated OpcUa_EnumValueType.
void UaEnumValueType::copyTo | ( | OpcUa_EnumValueType * | pDst | ) | const |
Copy UaEnumValueType data to an existing OpcUa_EnumValueType structure.
pDst | the 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.
pDst | [out] Pointer to an OpcUa_EnumValueType structure that receives the EnumValueType data. |
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.
other | the UaEnumValueType to compare with. |
UaEnumValueType & UaEnumValueType::operator= | ( | const UaEnumValueType & | other | ) |
bool UaEnumValueType::operator== | ( | const UaEnumValueType & | other | ) | const |
Compare two UaEnumValueType for equality.
other | the UaEnumValueType to compare with. |
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.