C++ Based OPC UA Client/Server SDK
1.5.4.349
|
The class describes a structured data type. More...
#include <uastructuredefinition.h>
Public Member Functions | |
UaStructureDefinition () | |
Creates an empty UaStructureDefinition. More... | |
UaStructureDefinition (const UaStructureDefinition &other) | |
Copy constructor. | |
virtual | ~UaStructureDefinition () |
Destruction. | |
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... | |
void | clear () |
Clears the UaStructureDefinition. More... | |
bool | isNull () const |
Returns true if the Name of the Structure is empty. More... | |
void | setDataTypeId (const UaNodeId &nodeId) |
Sets the DataType. More... | |
UaNodeId | dataTypeId () const |
Returns the DataType. More... | |
void | setName (const UaString &sName) |
Sets the name. More... | |
UaString | name () const |
Returns the name. More... | |
void | setDocumentation (const UaLocalizedText &documentation) |
Sets the documentation. More... | |
UaLocalizedText | documentation () const |
Returns the documentation. More... | |
void | setNamespace (const UaString &sNamespace) |
Sets the NamespaceUri. More... | |
UaString | getNamespace () const |
Returns the NamespaceUri. More... | |
void | setBaseType (const UaStructureDefinition &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... | |
int | childrenCount () const |
Returns the number of fields. 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... | |
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.
int UaStructureDefinition::childrenCount | ( | ) | const |
Returns the number of fields.
void UaStructureDefinition::clear | ( | ) |
Clears the UaStructureDefinition.
UaStructureDefinition UaStructureDefinition::createSubtype | ( | ) | const |
Creates a subtype.
Adds copies for the fields.
UaNodeId UaStructureDefinition::dataTypeId | ( | ) | const |
Returns the DataType.
UaLocalizedText UaStructureDefinition::documentation | ( | ) | const |
Returns the documentation.
UaString UaStructureDefinition::getNamespace | ( | ) | const |
Returns the NamespaceUri.
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.
bool UaStructureDefinition::isNull | ( | ) | const |
Returns true if the Name of the Structure is empty.
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.
UaString UaStructureDefinition::name | ( | ) | const |
Returns the name.
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::setBinaryEncodingId | ( | const UaNodeId & | nodeId | ) |
Sets the Binary encoding id.
void UaStructureDefinition::setDataTypeId | ( | const UaNodeId & | nodeId | ) |
Sets the DataType.
void UaStructureDefinition::setDocumentation | ( | const UaLocalizedText & | documentation | ) |
Sets the documentation.
void UaStructureDefinition::setName | ( | const UaString & | sName | ) |
Sets the name.
void UaStructureDefinition::setNamespace | ( | const UaString & | sNamespace | ) |
Sets the NamespaceUri.
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.