C++ Based OPC UA Client/Server SDK
1.6.1.391
|
The class describes a structured data type. More...
#include <uastructuredefinition.h>
Inherits UaAbstractDefinition.
Public Member Functions | |
UaStructureDefinition () | |
Creates an empty UaStructureDefinition. More... | |
UaStructureDefinition (const UaStructureDefinition &other) | |
Copy constructor. | |
bool | operator== (const UaStructureDefinition &other) const |
Checks whether two UaStructureDefinitions are equal. More... | |
bool | operator!= (const UaStructureDefinition &other) const |
Checks wheter two UaStructureDefinitions are not equal. More... | |
virtual int | childrenCount () const |
Returns the number of fields. More... | |
virtual void | clear () |
Clears the UaStructureDefinition. More... | |
virtual bool | isNull () const |
Returns true if the Name of the Structure is empty. More... | |
void | setBaseType (const UaStructureDefinition &newBaseType) |
Sets the base type of a UaStructureDefinition. More... | |
void | setBaseType (const UaNodeId &newBaseType) |
Sets the base type of a UaStructureDefinition. More... | |
UaNodeId | baseTypeId () const |
Returns the BaseType of the the UaStructureDefinition. More... | |
UaStructureDefinition | createSubtype () const |
Creates a subtype. More... | |
UaStructureField | child (int i) const |
Returns the field at position i. More... | |
void | addChild (const UaStructureField &newChild) |
Adds a field. More... | |
void | setBinaryEncodingId (const UaNodeId &nodeId) |
Sets the Binary encoding id. More... | |
UaNodeId | binaryEncodingId () const |
Returns the Binary encoding id. More... | |
void | setXmlEncodingId (const UaNodeId &nodeId) |
Sets the XML encoding id. More... | |
UaNodeId | xmlEncodingId () const |
Returns the XML encoding id. More... | |
void | remove (const UaString &sFieldName) |
Removes the field with the name sFieldName if the field exists. More... | |
bool | isUnion () const |
Returns true if UaStructureDefinition describes a Union. More... | |
void | setUnion (bool bUnion) |
Specifies if the structure is a union. More... | |
bool | hasOptionalFields () const |
Returns 'true' if at least one of the children is optional. More... | |
void | setUserData (UserDataReferenceCounted *pUserData) |
Allows setting of reference counted user data handled by the UaStructureDefinition. More... | |
UserDataReferenceCounted * | getUserData () const |
Returns user data set by the user. More... | |
Public Member Functions inherited from UaAbstractDefinition | |
void | setDataTypeId (const UaNodeId &nodeId) |
Sets the DataTypeId of the UaAbstractDefinition. | |
UaNodeId | dataTypeId () const |
Returns the DataTypeId of the UaAbstractDefinition. More... | |
void | setName (const UaString &sName) |
Sets the Name of the UaAbstractDefinition. | |
UaString | name () const |
Returns the name of the UaAbstractDefinition. More... | |
void | setDocumentation (const UaLocalizedText &documentation) |
Sets the Documentation of the UaAbstractDefinition. | |
UaLocalizedText | documentation () const |
Returns the documentation of the UaAbstractDefinition. More... | |
void | setNamespace (const UaString &sNamespace) |
Sets the Namespace of the UaAbstractDefinition. | |
UaString | getNamespace () const |
Returns the NamespaceUri of the UaAbstractDefinition. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from UaAbstractDefinition | |
UaAbstractDefinition (UaAbstractDefinitionPrivate *pBody) | |
Creates an instance. More... | |
The class describes a structured data type.
Structured DataTypes that are not known at compile time can be described using this class. This class can be used to add a structured DataType on server side as well as as result of reading the DataType Dictionary of a server on client side.
Each UaStructureDefinition is described by its name, its DataTypeId, the encoding Ids and a list of UaStructureFields.
This class is used by UaGenericValue for storing DataType information and for accessing the fields.
UaStructureDefinition::UaStructureDefinition | ( | ) |
Creates an empty UaStructureDefinition.
void UaStructureDefinition::addChild | ( | const UaStructureField & | newChild | ) |
Adds a field.
UaNodeId UaStructureDefinition::baseTypeId | ( | ) | const |
Returns the BaseType of the the UaStructureDefinition.
UaNodeId UaStructureDefinition::binaryEncodingId | ( | ) | const |
Returns the Binary encoding id.
UaStructureField UaStructureDefinition::child | ( | int | i | ) | const |
Returns the field at position i.
|
virtual |
Returns the number of fields.
Implements UaAbstractDefinition.
|
virtual |
Clears the UaStructureDefinition.
Implements UaAbstractDefinition.
UaStructureDefinition UaStructureDefinition::createSubtype | ( | ) | const |
Creates a subtype.
Adds copies for the fields.
UserDataReferenceCounted * UaStructureDefinition::getUserData | ( | ) | const |
Returns user data set by the user.
Returns NULL if not set by the user.
bool UaStructureDefinition::hasOptionalFields | ( | ) | const |
Returns 'true' if at least one of the children is optional.
|
virtual |
Returns true if the Name of the Structure is empty.
Reimplemented from UaAbstractDefinition.
bool UaStructureDefinition::isUnion | ( | ) | const |
Returns true if UaStructureDefinition describes a Union.
Do not call this method since Unions are not specified in a released version of the OPC UA Specification.
bool UaStructureDefinition::operator!= | ( | const UaStructureDefinition & | other | ) | const |
Checks wheter two UaStructureDefinitions are not equal.
If the definitions are created separately but have the same content, this method returns true.
bool UaStructureDefinition::operator== | ( | const UaStructureDefinition & | other | ) | const |
Checks whether two UaStructureDefinitions are equal.
If the definitions are created separately but have the same content, this method returns false.
void UaStructureDefinition::remove | ( | const UaString & | sFieldName | ) |
Removes the field with the name sFieldName if the field exists.
void UaStructureDefinition::setBaseType | ( | const UaStructureDefinition & | newBaseType | ) |
Sets the base type of a UaStructureDefinition.
Call this method if another structured DataType is the base type of this type. This method does not craete fields for the current UaStructureDefinition. The fields of the base type must match the first fields of the current UaStructureDefinition.
This method should only be used for reading bsd files.
void UaStructureDefinition::setBaseType | ( | const UaNodeId & | newBaseType | ) |
Sets the base type of a UaStructureDefinition.
void UaStructureDefinition::setBinaryEncodingId | ( | const UaNodeId & | nodeId | ) |
Sets the Binary encoding id.
void UaStructureDefinition::setUnion | ( | bool | bUnion | ) |
Specifies if the structure is a union.
bUnion | If 'true' the structure is a union |
void UaStructureDefinition::setUserData | ( | UserDataReferenceCounted * | pUserData | ) |
Allows setting of reference counted user data handled by the UaStructureDefinition.
The user data is cleared when the UaStructureDefinition object is deleted.
void UaStructureDefinition::setXmlEncodingId | ( | const UaNodeId & | nodeId | ) |
Sets the XML encoding id.
UaNodeId UaStructureDefinition::xmlEncodingId | ( | ) | const |
Returns the XML encoding id.