C++ Based OPC UA Client/Server SDK
1.5.3.346
|
The manager of the factories for creating instances. More...
#include <instancefactory.h>
Public Member Functions | |
XmlUaNodeFactoryManager () | |
Creates an instance of the XmlUaNodeFactoryManager. More... | |
void | addNamespace (XmlUaNodeFactoryNamespace *pFactoryNamespace) |
Adds an additional XmlUaNodeFactoryNamespace to be managed by this instance. More... | |
UaVariable * | createVariable (UaBase::Variable *pVariable, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates a Variable with all components. More... | |
UaObject * | createObject (UaBase::Object *pObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates an Object with all components. More... | |
virtual UaMethod * | createMethod (UaBase::Method *pMethod, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates a Method with all variables. More... | |
virtual UaDataType * | createDataType (UaBase::DataType *pDataType, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates a DataType node and all properties of the node. More... | |
virtual UaReferenceType * | createReferenceType (UaBase::ReferenceType *pReferenceType, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates a ReferenceType node. More... | |
virtual UaObjectType * | createObjectType (UaBase::ObjectType *pObjectType, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates an ObjectType node including all children. More... | |
virtual UaVariableType * | createVariableType (UaBase::VariableType *pVariableType, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) |
Creates a VariableType node including all children. More... | |
UaVariant | defaultValue (const UaNodeId &dataTypeId, OpcUa_Int32 valueRank) const |
Returns the default value for a DataType with ValueRank valueRank. More... | |
The manager of the factories for creating instances.
The main use case for this class is to parse a NodeSet XML file using NodeManagerNodeSetXml and to create instances of toolkit classes using the resulting UaBase::BaseNodes.
XmlUaNodeFactoryManager::XmlUaNodeFactoryManager | ( | ) |
Creates an instance of the XmlUaNodeFactoryManager.
The XmlUaNodeFactoryNamespace for namespace 0 is added by this constructor.
void XmlUaNodeFactoryManager::addNamespace | ( | XmlUaNodeFactoryNamespace * | pFactoryNamespace | ) |
Adds an additional XmlUaNodeFactoryNamespace to be managed by this instance.
The caller has to delete the XmlUaNodeFactoryNamespace.
|
virtual |
Creates a DataType node and all properties of the node.
|
virtual |
Creates a Method with all variables.
pMethod | The temporary data representation of the method to create. |
pNodeConfig | If pNodeConfig can be casted to NodeManagerNodeSetXml, the callback NodeManagerNodeSetXml::methodCreated is called for each child. |
pSharedMutex | An optional mutex that is used across different objects. |
UaObject * XmlUaNodeFactoryManager::createObject | ( | UaBase::Object * | pObject, |
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Creates an Object with all components.
If the namespace of the type definition is not managed by this instance, a generic object with generic children is created.
pObject | The temporary data representation of the object to create. |
pNodeConfig | The NodeManager to add the children of pObject. |
pSharedMutex | An optional mutex that is used across different objects. |
|
virtual |
Creates an ObjectType node including all children.
|
virtual |
Creates a ReferenceType node.
UaVariable * XmlUaNodeFactoryManager::createVariable | ( | UaBase::Variable * | pVariable, |
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Creates a Variable with all components.
If the namespace of the type definition is not managed by this instance, a generic variable with generic children is created.
pVariable | The temporary data representation of the variable to create. |
pNodeConfig | The NodeManager to add the children of pVariable. |
pSharedMutex | An optional mutex that is used across different variables. |
|
virtual |
Creates a VariableType node including all children.
UaVariant XmlUaNodeFactoryManager::defaultValue | ( | const UaNodeId & | dataTypeId, |
OpcUa_Int32 | valueRank | ||
) | const |
Returns the default value for a DataType with ValueRank valueRank.
If the DataType is unknown, a null value is returned.