UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaEnumValueType Class Reference

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 if they are similar. More...
 
bool operator!= (const UaEnumValueType &other) const
 Returns true if the other UaEnumValueType is not equal to this. More...
 
UaEnumValueTypeoperator= (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 the data of the parameter pValue. More...
 
OpcUa_EnumValueType * detach (OpcUa_EnumValueType *pDst)
 Detaches the internal EnumValueType structure from this class. 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)
 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.

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 the data of the parameter pValue.

Don't clear the data of pValue afterwards manually, because UaEnumValueType is responsible for it now.

Parameters
[in]pValueParameter 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
new copy.
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
data 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 releasing the EnumValueType data. If more than one reference exists, the data is copied to pDst instead of being detached.

Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
Parameters
[out]pDstPointer to OpcUa_EnumValueType structure that receives the EnumValueType data.
bool UaEnumValueType::operator!= ( const UaEnumValueType other) const

Returns true if the other UaEnumValueType is not equal to this.

See Also
operator==
Parameters
otherthe UaEnumValueType to compare.
Returns
true if other is not equal to this.
UaEnumValueType & UaEnumValueType::operator= ( const UaEnumValueType other)

Assignment operator.

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

Compare two UaEnumValueType if they are similar.

Parameters
otherthe UaEnumValueType to compare.
Returns
true if similar, false if not.

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