C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
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... | |
UaStructureDefinitionDataType & | operator= (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 OpcUa_StructureDefinition data to an existing OpcUa_StructureDefinition structure. More... | |
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.
UaStructureDefinitionDataType::UaStructureDefinitionDataType | ( | const UaStructureDefinitionDataType & | other | ) |
Constructs an instance of the class UaStructureDefinitionDataType with values from another UaStructureDefinitionDataType object.
other | the 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.
other | the 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.
extensionObject | the 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.
extensionObject | the extension object containing the StructureDefinition |
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.
pValue | [in] Parameter to attach to. |
void UaStructureDefinitionDataType::clear | ( | ) |
Clear the data of the UaStructureDefinitionDataType.
|
static |
Copy OpcUa_StructureDefinition data to a newly allocated OpcUa_StructureDefinition.
source | Source to clone. |
|
static |
Copy OpcUa_StructureDefinition data to an existing OpcUa_StructureDefinition structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_StructureDefinition * UaStructureDefinitionDataType::copy | ( | ) | const |
Copy UaStructureDefinitionDataType data to a newly allocated OpcUa_StructureDefinition.
void UaStructureDefinitionDataType::copyTo | ( | OpcUa_StructureDefinition * | pDst | ) | const |
Copy UaStructureDefinitionDataType data to an existing OpcUa_StructureDefinition structure.
pDst | the 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.
pDst | [out] Pointer to an OpcUa_StructureDefinition structure that receives the StructureDefinitionDataType data. |
bool UaStructureDefinitionDataType::operator!= | ( | const UaStructureDefinitionDataType & | other | ) | const |
Compare two UaStructureDefinitionDataType for inequality.
other | the UaStructureDefinitionDataType to compare with. |
UaStructureDefinitionDataType & UaStructureDefinitionDataType::operator= | ( | const UaStructureDefinitionDataType & | other | ) |
Assignment operator.
other | the UaStructureDefinitionDataType to assign. |
bool UaStructureDefinitionDataType::operator== | ( | const UaStructureDefinitionDataType & | other | ) | const |
Compare two UaStructureDefinitionDataType for equality.
other | the UaStructureDefinitionDataType to compare with. |