C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaStructureDefinitionDataType Class Reference

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

#include <uastructuredefinitiondatatype.h>

Public Member Functions

 UaStructureDefinitionDataType ()
 Constructs an instance of the class UaStructureDefinitionDataType with empty default values.
 
 UaStructureDefinitionDataType (const UaStructureDefinitionDataType &other)
 Constructs an instance of the class UaStructureDefinitionDataType with values from another UaStructureDefinitionDataType object. More...
 
 UaStructureDefinitionDataType (const OpcUa_StructureDefinition &other)
 Constructs an instance of the class UaStructureDefinitionDataType with values from another OpcUa_StructureDefinition structure. More...
 
 UaStructureDefinitionDataType (const UaNodeId &defaultEncodingId, const UaNodeId &baseDataType, OpcUa_StructureType structureType, const UaStructureFieldDataTypes &fields)
 Constructs an instance of the class UaStructureDefinitionDataType with values provided in the constructor.
 
 UaStructureDefinitionDataType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaStructureDefinitionDataType initialized with value from a UaExtensionObject. More...
 
 UaStructureDefinitionDataType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaStructureDefinitionDataType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaStructureDefinitionDataType ()
 Destroys the UaStructureDefinitionDataType object.
 
void clear ()
 Clear the data of the UaStructureDefinitionDataType. More...
 
bool operator== (const UaStructureDefinitionDataType &other) const
 Compare two UaStructureDefinitionDataType for equality. More...
 
bool operator!= (const UaStructureDefinitionDataType &other) const
 Compare two UaStructureDefinitionDataType for inequality. More...
 
UaStructureDefinitionDataTypeoperator= (const UaStructureDefinitionDataType &other)
 Assignment operator. More...
 
OpcUa_StructureDefinition * copy () const
 Copy UaStructureDefinitionDataType data to a newly allocated OpcUa_StructureDefinition. More...
 
void copyTo (OpcUa_StructureDefinition *pDst) const
 Copy UaStructureDefinitionDataType data to an existing OpcUa_StructureDefinition structure. More...
 
void attach (OpcUa_StructureDefinition *pValue)
 Attaches to an existing OpcUa_StructureDefinition structure. More...
 
OpcUa_StructureDefinition * detach (OpcUa_StructureDefinition *pDst)
 Detaches the internal StructureDefinition structure from this class. More...
 
UaNodeId getDefaultEncodingId () const
 Returns the DefaultEncodingId.
 
UaNodeId getBaseDataType () const
 Returns the BaseDataType.
 
OpcUa_StructureType getStructureType () const
 Returns the StructureType.
 
void getFields (UaStructureFieldDataTypes &fields) const
 Returns the Fields.
 
void setDefaultEncodingId (const UaNodeId &defaultEncodingId)
 Sets the DefaultEncodingId.
 
void setBaseDataType (const UaNodeId &baseDataType)
 Sets the BaseDataType.
 
void setStructureType (OpcUa_StructureType structureType)
 Sets the StructureType.
 
void setFields (const UaStructureFieldDataTypes &fields)
 Sets the Fields.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_StructureDefinition.

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

Constructor & Destructor Documentation

UaStructureDefinitionDataType::UaStructureDefinitionDataType ( const UaStructureDefinitionDataType other)

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

Parameters
otherthe other UaStructureDefinitionDataType used to initialize the object
UaStructureDefinitionDataType::UaStructureDefinitionDataType ( const OpcUa_StructureDefinition &  other)

Constructs an instance of the class UaStructureDefinitionDataType with values from another OpcUa_StructureDefinition structure.

Parameters
otherthe other OpcUa_StructureDefinition used to initialize the object
UaStructureDefinitionDataType::UaStructureDefinitionDataType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the StructureDefinition
UaStructureDefinitionDataType::UaStructureDefinitionDataType ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the StructureDefinition

Member Function Documentation

void UaStructureDefinitionDataType::attach ( OpcUa_StructureDefinition *  pValue)

Attaches to an existing OpcUa_StructureDefinition structure.

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

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

Clear the data of the UaStructureDefinitionDataType.

OpcUa_StructureDefinition * UaStructureDefinitionDataType::clone ( const OpcUa_StructureDefinition &  source)
static

Copy OpcUa_StructureDefinition data to a newly allocated OpcUa_StructureDefinition.

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

Copy OpcUa_StructureDefinition data to an existing OpcUa_StructureDefinition structure.

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

Copy UaStructureDefinitionDataType data to a newly allocated OpcUa_StructureDefinition.

Returns
pointer to a newly allocated OpcUa_StructureDefinition.
void UaStructureDefinitionDataType::copyTo ( OpcUa_StructureDefinition *  pDst) const

Copy UaStructureDefinitionDataType data to an existing OpcUa_StructureDefinition structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_StructureDefinition * UaStructureDefinitionDataType::detach ( OpcUa_StructureDefinition *  pDst)

Detaches the internal StructureDefinition structure from this class.

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

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

Compare two UaStructureDefinitionDataType for inequality.

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

Assignment operator.

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

Compare two UaStructureDefinitionDataType for equality.

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

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