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

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...
 
UaEnumFieldoperator= (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)
 Copy OpcUa_EnumField data to an existing OpcUa_EnumField structure. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

UaEnumField::UaEnumField ( const UaEnumField other)

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

Parameters
otherthe 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.

Parameters
otherthe 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.

Parameters
extensionObjectthe 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.

Parameters
extensionObjectthe extension object containing the EnumField

Member Function Documentation

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.

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

Clear the data of the UaEnumField.

OpcUa_EnumField * UaEnumField::clone ( const OpcUa_EnumField &  source)
static

Copy OpcUa_EnumField data to a newly allocated OpcUa_EnumField.

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

Copy OpcUa_EnumField data to an existing OpcUa_EnumField structure.

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

Copy UaEnumField data to a newly allocated OpcUa_EnumField.

Returns
pointer to a newly allocated OpcUa_EnumField.
void UaEnumField::copyTo ( OpcUa_EnumField *  pDst) const

Copy UaEnumField data to an existing OpcUa_EnumField structure.

Parameters
pDstthe 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.

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

Compare two UaEnumField for inequality.

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

Assignment operator.

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

Compare two UaEnumField for equality.

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

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