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