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

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

#include <uastructurefielddatatype.h>

Public Member Functions

 UaStructureFieldDataType ()
 Constructs an instance of the class UaStructureFieldDataType with empty default values.
 
 UaStructureFieldDataType (const UaStructureFieldDataType &other)
 Constructs an instance of the class UaStructureFieldDataType with values from another UaStructureFieldDataType object. More...
 
 UaStructureFieldDataType (const OpcUa_StructureField &other)
 Constructs an instance of the class UaStructureFieldDataType with values from another OpcUa_StructureField structure. More...
 
 UaStructureFieldDataType (const UaString &name, const UaLocalizedText &description, const UaNodeId &dataType, OpcUa_Int32 valueRank, const UaUInt32Array &arrayDimensions, OpcUa_UInt32 maxStringLength, OpcUa_Boolean isOptional)
 Constructs an instance of the class UaStructureFieldDataType with values provided in the constructor.
 
 UaStructureFieldDataType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaStructureFieldDataType initialized with value from a UaExtensionObject. More...
 
 UaStructureFieldDataType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaStructureFieldDataType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaStructureFieldDataType ()
 Destroys the UaStructureFieldDataType object.
 
void clear ()
 Clear the data of the UaStructureFieldDataType. More...
 
bool operator== (const UaStructureFieldDataType &other) const
 Compare two UaStructureFieldDataType for equality. More...
 
bool operator!= (const UaStructureFieldDataType &other) const
 Compare two UaStructureFieldDataType for inequality. More...
 
UaStructureFieldDataTypeoperator= (const UaStructureFieldDataType &other)
 Assignment operator. More...
 
OpcUa_StructureField * copy () const
 Copy UaStructureFieldDataType data to a newly allocated OpcUa_StructureField. More...
 
void copyTo (OpcUa_StructureField *pDst) const
 Copy UaStructureFieldDataType data to an existing OpcUa_StructureField structure. More...
 
void attach (OpcUa_StructureField *pValue)
 Attaches to an existing OpcUa_StructureField structure. More...
 
OpcUa_StructureField * detach (OpcUa_StructureField *pDst)
 Detaches the internal StructureField structure from this class. More...
 
UaString getName () const
 Returns the Name.
 
UaLocalizedText getDescription () const
 Returns the Description.
 
UaNodeId getDataType () const
 Returns the DataType.
 
OpcUa_Int32 getValueRank () const
 Returns the ValueRank.
 
void getArrayDimensions (UaUInt32Array &arrayDimensions) const
 Returns the ArrayDimensions.
 
OpcUa_UInt32 getMaxStringLength () const
 Returns the MaxStringLength.
 
OpcUa_Boolean getIsOptional () const
 Returns the IsOptional.
 
void setName (const UaString &name)
 Sets the Name.
 
void setDescription (const UaLocalizedText &description)
 Sets the Description.
 
void setDataType (const UaNodeId &dataType)
 Sets the DataType.
 
void setValueRank (OpcUa_Int32 valueRank)
 Sets the ValueRank.
 
void setArrayDimensions (const UaUInt32Array &arrayDimensions)
 Sets the ArrayDimensions.
 
void setMaxStringLength (OpcUa_UInt32 maxStringLength)
 Sets the MaxStringLength.
 
void setIsOptional (OpcUa_Boolean isOptional)
 Sets the IsOptional.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_StructureField.

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

Constructor & Destructor Documentation

UaStructureFieldDataType::UaStructureFieldDataType ( const UaStructureFieldDataType other)

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

Parameters
otherthe other UaStructureFieldDataType used to initialize the object
UaStructureFieldDataType::UaStructureFieldDataType ( const OpcUa_StructureField &  other)

Constructs an instance of the class UaStructureFieldDataType with values from another OpcUa_StructureField structure.

Parameters
otherthe other OpcUa_StructureField used to initialize the object
UaStructureFieldDataType::UaStructureFieldDataType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the StructureField
UaStructureFieldDataType::UaStructureFieldDataType ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the StructureField

Member Function Documentation

void UaStructureFieldDataType::attach ( OpcUa_StructureField *  pValue)

Attaches to an existing OpcUa_StructureField structure.

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

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

Clear the data of the UaStructureFieldDataType.

OpcUa_StructureField * UaStructureFieldDataType::clone ( const OpcUa_StructureField &  source)
static

Copy OpcUa_StructureField data to a newly allocated OpcUa_StructureField.

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

Copy OpcUa_StructureField data to an existing OpcUa_StructureField structure.

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

Copy UaStructureFieldDataType data to a newly allocated OpcUa_StructureField.

Returns
pointer to a newly allocated OpcUa_StructureField.
void UaStructureFieldDataType::copyTo ( OpcUa_StructureField *  pDst) const

Copy UaStructureFieldDataType data to an existing OpcUa_StructureField structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_StructureField * UaStructureFieldDataType::detach ( OpcUa_StructureField *  pDst)

Detaches the internal StructureField structure from this class.

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

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

Compare two UaStructureFieldDataType for inequality.

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

Assignment operator.

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

Compare two UaStructureFieldDataType for equality.

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

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