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

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

#include <uafieldmetadata.h>

Public Member Functions

 UaFieldMetaData ()
 Constructs an instance of the class UaFieldMetaData with empty default values.
 
 UaFieldMetaData (const UaFieldMetaData &other)
 Constructs an instance of the class UaFieldMetaData with values from another UaFieldMetaData object. More...
 
 UaFieldMetaData (const OpcUa_FieldMetaData &other)
 Constructs an instance of the class UaFieldMetaData with values from another OpcUa_FieldMetaData structure. More...
 
 UaFieldMetaData (const UaString &name, const UaLocalizedText &description, OpcUa_DataSetFieldFlags fieldFlags, OpcUa_Byte builtInType, const UaNodeId &dataType, OpcUa_Int32 valueRank, const UaUInt32Array &arrayDimensions, OpcUa_UInt32 maxStringLength, const UaGuid &dataSetFieldId, const UaKeyValuePairs &properties)
 Constructs an instance of the class UaFieldMetaData with values provided in the constructor.
 
 UaFieldMetaData (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaFieldMetaData initialized with value from a UaExtensionObject. More...
 
 UaFieldMetaData (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaFieldMetaData initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaFieldMetaData ()
 Destroys the UaFieldMetaData object.
 
void clear ()
 Clear the data of the UaFieldMetaData. More...
 
bool operator== (const UaFieldMetaData &other) const
 Compare two UaFieldMetaData for equality. More...
 
bool operator!= (const UaFieldMetaData &other) const
 Compare two UaFieldMetaData for inequality. More...
 
UaFieldMetaDataoperator= (const UaFieldMetaData &other)
 Assignment operator. More...
 
OpcUa_FieldMetaData * copy () const
 Copy UaFieldMetaData data to a newly allocated OpcUa_FieldMetaData. More...
 
void copyTo (OpcUa_FieldMetaData *pDst) const
 Copy UaFieldMetaData data to an existing OpcUa_FieldMetaData structure. More...
 
void attach (OpcUa_FieldMetaData *pValue)
 Attaches to an existing OpcUa_FieldMetaData structure. More...
 
OpcUa_FieldMetaData * detach (OpcUa_FieldMetaData *pDst)
 Detaches the internal FieldMetaData structure from this class. More...
 
UaString getName () const
 Returns the Name.
 
UaLocalizedText getDescription () const
 Returns the Description.
 
OpcUa_DataSetFieldFlags getFieldFlags () const
 Returns the FieldFlags.
 
OpcUa_Byte getBuiltInType () const
 Returns the BuiltInType.
 
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.
 
UaGuid getDataSetFieldId () const
 Returns the DataSetFieldId.
 
void getProperties (UaKeyValuePairs &properties) const
 Returns the Properties.
 
void setName (const UaString &name)
 Sets the Name.
 
void setDescription (const UaLocalizedText &description)
 Sets the Description.
 
void setFieldFlags (OpcUa_DataSetFieldFlags fieldFlags)
 Sets the FieldFlags.
 
void setBuiltInType (OpcUa_Byte builtInType)
 Sets the BuiltInType.
 
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 setDataSetFieldId (const UaGuid &dataSetFieldId)
 Sets the DataSetFieldId.
 
void setProperties (const UaKeyValuePairs &properties)
 Sets the Properties.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_FieldMetaData.

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

Constructor & Destructor Documentation

UaFieldMetaData::UaFieldMetaData ( const UaFieldMetaData other)

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

Parameters
otherthe other UaFieldMetaData used to initialize the object
UaFieldMetaData::UaFieldMetaData ( const OpcUa_FieldMetaData &  other)

Constructs an instance of the class UaFieldMetaData with values from another OpcUa_FieldMetaData structure.

Parameters
otherthe other OpcUa_FieldMetaData used to initialize the object
UaFieldMetaData::UaFieldMetaData ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the FieldMetaData
UaFieldMetaData::UaFieldMetaData ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the FieldMetaData

Member Function Documentation

void UaFieldMetaData::attach ( OpcUa_FieldMetaData *  pValue)

Attaches to an existing OpcUa_FieldMetaData structure.

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

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

Clear the data of the UaFieldMetaData.

OpcUa_FieldMetaData * UaFieldMetaData::clone ( const OpcUa_FieldMetaData &  source)
static

Copy OpcUa_FieldMetaData data to a newly allocated OpcUa_FieldMetaData.

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

Copy OpcUa_FieldMetaData data to an existing OpcUa_FieldMetaData structure.

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

Copy UaFieldMetaData data to a newly allocated OpcUa_FieldMetaData.

Returns
pointer to a newly allocated OpcUa_FieldMetaData.
void UaFieldMetaData::copyTo ( OpcUa_FieldMetaData *  pDst) const

Copy UaFieldMetaData data to an existing OpcUa_FieldMetaData structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_FieldMetaData * UaFieldMetaData::detach ( OpcUa_FieldMetaData *  pDst)

Detaches the internal FieldMetaData structure from this class.

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

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

Compare two UaFieldMetaData for inequality.

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

Assignment operator.

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

Compare two UaFieldMetaData for equality.

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

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