C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Wrapper class for the UA stack structure OpcUa_EnumField. More...
#include <uaenumfield.h>
Public Member Functions | |
UaEnumField () | |
Constructs an instance of the class UaEnumField with empty default values. | |
UaEnumField (const UaEnumField &other) | |
Constructs an instance of the class UaEnumField with values from another UaEnumField object. More... | |
UaEnumField (const OpcUa_EnumField &other) | |
Constructs an instance of the class UaEnumField with values from another OpcUa_EnumField structure. More... | |
UaEnumField (OpcUa_Int64 value, const UaLocalizedText &displayName, const UaLocalizedText &description, const UaString &name) | |
Constructs an instance of the class UaEnumField with values provided in the constructor. | |
UaEnumField (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaEnumField initialized with value from a UaExtensionObject. More... | |
UaEnumField (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaEnumField initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaEnumField () | |
Destroys the UaEnumField object. | |
void | clear () |
Clear the data of the UaEnumField. More... | |
bool | operator== (const UaEnumField &other) const |
Compare two UaEnumField for equality. More... | |
bool | operator!= (const UaEnumField &other) const |
Compare two UaEnumField for inequality. More... | |
UaEnumField & | operator= (const UaEnumField &other) |
Assignment operator. More... | |
OpcUa_EnumField * | copy () const |
Copy UaEnumField data to a newly allocated OpcUa_EnumField. More... | |
void | copyTo (OpcUa_EnumField *pDst) const |
Copy UaEnumField data to an existing OpcUa_EnumField structure. More... | |
void | attach (OpcUa_EnumField *pValue) |
Attaches to an existing OpcUa_EnumField structure. More... | |
OpcUa_EnumField * | detach (OpcUa_EnumField *pDst) |
Detaches the internal EnumField structure from this class. More... | |
OpcUa_Int64 | getValue () const |
Returns the Value. | |
UaLocalizedText | getDisplayName () const |
Returns the DisplayName. | |
UaLocalizedText | getDescription () const |
Returns the Description. | |
UaString | getName () const |
Returns the Name. | |
void | setValue (OpcUa_Int64 value) |
Sets the Value. | |
void | setDisplayName (const UaLocalizedText &displayName) |
Sets the DisplayName. | |
void | setDescription (const UaLocalizedText &description) |
Sets the Description. | |
void | setName (const UaString &name) |
Sets the Name. | |
Static Public Member Functions | |
static OpcUa_EnumField * | clone (const OpcUa_EnumField &source) |
Copy OpcUa_EnumField data to a newly allocated OpcUa_EnumField. More... | |
static void | cloneTo (const OpcUa_EnumField &source, OpcUa_EnumField ©) |
Copy OpcUa_EnumField data to an existing OpcUa_EnumField structure. More... | |
Wrapper class for the UA stack structure OpcUa_EnumField.
This class encapsulates the native OpcUa_EnumField structure and handles memory allocation and cleanup for you. UaEnumField uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared EnumField it creates a copy for that (copy-on-write). So assigning another UaEnumField or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
UaEnumField::UaEnumField | ( | const UaEnumField & | other | ) |
Constructs an instance of the class UaEnumField with values from another UaEnumField object.
other | the other UaEnumField used to initialize the object |
UaEnumField::UaEnumField | ( | const OpcUa_EnumField & | other | ) |
Constructs an instance of the class UaEnumField with values from another OpcUa_EnumField structure.
other | the other OpcUa_EnumField used to initialize the object |
UaEnumField::UaEnumField | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaEnumField initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the EnumField |
UaEnumField::UaEnumField | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaEnumField initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the EnumField |
void UaEnumField::attach | ( | OpcUa_EnumField * | pValue | ) |
Attaches to an existing OpcUa_EnumField structure.
Don't manually free the attached structure afterwards, because UaEnumField is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaEnumField::clear | ( | ) |
Clear the data of the UaEnumField.
|
static |
Copy OpcUa_EnumField data to a newly allocated OpcUa_EnumField.
source | Source to clone. |
|
static |
Copy OpcUa_EnumField data to an existing OpcUa_EnumField structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_EnumField * UaEnumField::copy | ( | ) | const |
Copy UaEnumField data to a newly allocated OpcUa_EnumField.
void UaEnumField::copyTo | ( | OpcUa_EnumField * | pDst | ) | const |
Copy UaEnumField data to an existing OpcUa_EnumField structure.
pDst | the destination of this copy operation. |
OpcUa_EnumField * UaEnumField::detach | ( | OpcUa_EnumField * | pDst | ) |
Detaches the internal EnumField structure from this class.
This way you take over the control of freeing the EnumField data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_EnumField structure that receives the EnumField data. |
bool UaEnumField::operator!= | ( | const UaEnumField & | other | ) | const |
Compare two UaEnumField for inequality.
other | the UaEnumField to compare with. |
UaEnumField & UaEnumField::operator= | ( | const UaEnumField & | other | ) |
bool UaEnumField::operator== | ( | const UaEnumField & | other | ) | const |
Compare two UaEnumField for equality.
other | the UaEnumField to compare with. |