The factory class used to create and destroy graph objects. More...

#include "murl_graph_i_factory.h"

Inheritance diagram for Murl::Graph::IFactory:

Public Member Functions

virtual Bool Init ()=0
 Initialize the factory. More...
 
virtual Bool DeInit ()=0
 Deinitialize the factory. More...
 
virtual Bool SetRoot (const IRoot *root)=0
 Set the graph root object. More...
 
virtual const IRootGetRoot () const =0
 Get the graph root object. More...
 
virtual IMultiTouchableCreateMultiTouchable (ITouchableTarget *touchableTarget)=0
 Create the multi-touchable object. More...
 
virtual Bool DestroyMultiTouchable (IMultiTouchable *&multiTouchable)=0
 Destroy the multi-touchable object. More...
 
virtual INodeCreateNode (const INode::ClassInfo &classInfo) const =0
 Create a single node by its class info. More...
 
virtual INodeCreateNode (const String &className) const =0
 Create a single node by its class name. More...
 
virtual INodeCreateNode (const String &className, const IAttributes *attributes, const IAttributes *parameters) const =0
 Create a single node by its class name, with given attributes and optional parameters. More...
 
virtual INodeCreateNode (const String &className, const String &baseResourcePath, const IAttributes *attributes, const IAttributes *parameters) const =0
 Create a single node by its class name, with given base resource path, attributes and optional parameters. More...
 
virtual INodeCreateGraph (const Resource::IGraph *graphResource, const IAttributes *params) const =0
 Create a node graph from a given graph resource. More...
 
virtual INodeCreateGraph (const Resource::IGraphNode *graphResourceNode, const IAttributes *params) const =0
 Create a node graph from a given graph resource node. More...
 
virtual Bool DestroyGraph (INode *&rootNode) const =0
 Recursively destroy a node graph, starting at the given root node. More...
 
virtual Bool DeserializeNodeAttributes (INode *node, const IAttributes *attributes, const IAttributes *parameters)=0
 Deserialize a given node from a set of attributes and optional parameters. More...
 
virtual Bool DeserializeNodeAttributes (INode *node, const String &baseResourcePath, const IAttributes *attributes, const IAttributes *parameters)=0
 Deserialize a given node from a set of attributes and optional parameters, with a given base resource path. More...
 
virtual IControllerCreateController (const IController::ClassInfo &classInfo, INode *owner) const =0
 Create a node controller by its class info. More...
 
virtual IControllerCreateController (const String &className, INode *owner) const =0
 Create a node controller by its class name. More...
 
virtual IControllerCreateController (const String &className, INode *owner, const IAttributes *attributes, const IAttributes *parameters) const =0
 Create a node controller by its class name, with given attributes and optional parameters. More...
 
virtual IControllerCreateController (const String &className, INode *owner, const String &baseResourcePath, const IAttributes *attributes, const IAttributes *parameters) const =0
 Create a node controller by its class name, with given base resource path, attributes and optional parameters. More...
 
virtual Bool DestroyController (IController *&controller) const =0
 Destroy a given node controller. More...
 
virtual Bool DeserializeControllerAttributes (IController *controller, const IAttributes *attributes, const IAttributes *parameters)=0
 Deserialize a given controller from a set of attributes and optional parameters. More...
 
virtual Bool DeserializeControllerAttributes (IController *controller, const String &baseResourcePath, const IAttributes *attributes, const IAttributes *parameters)=0
 Deserialize a given controller from a set of attributes and optional parameters. More...
 
- Public Member Functions inherited from Murl::Graph::IFactoryRegistry
virtual Bool RegisterNodeClass (const INode::ClassInfo &classInfo)=0
 Register a node class. More...
 
virtual Bool UnregisterNodeClass (const INode::ClassInfo &classInfo)=0
 Unregister a node class. More...
 
virtual SInt32 GetRegisteredNodeClassInfoIndex (const INode::ClassInfo &classInfo) const =0
 Get the index of a registered node class, by its class info structure. More...
 
virtual SInt32 GetRegisteredNodeClassInfoIndex (const String &className) const =0
 Get the index of a registered node class, by its class name. More...
 
virtual UInt32 GetNumberOfRegisteredNodeClassInfos () const =0
 Get the total number of registered node classes. More...
 
virtual const INode::ClassInfo * GetRegisteredNodeClassInfo (UInt32 index) const =0
 Get the class info structure of a registered node class at a given index. More...
 
virtual Bool RegisterControllerClass (const IController::ClassInfo &classInfo)=0
 Register a controller class. More...
 
virtual Bool UnregisterControllerClass (const IController::ClassInfo &classInfo)=0
 Unregister a controller class. More...
 
virtual SInt32 GetRegisteredControllerClassInfoIndex (const IController::ClassInfo &classInfo) const =0
 Get the index of a registered controller class, by its class info structure. More...
 
virtual SInt32 GetRegisteredControllerClassInfoIndex (const String &className) const =0
 Get the index of a registered controller class, by its class name. More...
 
virtual UInt32 GetNumberOfRegisteredControllerClassInfos () const =0
 Get the total number of registered controller classes. More...
 
virtual const IController::ClassInfo * GetRegisteredControllerClassInfo (UInt32 index) const =0
 Get the class info structure of a registered controller class at a given index. More...
 

Detailed Description

The factory class used to create and destroy graph objects.

Use the Graph::IFactoryRegistry base interface for managing registered node classes.

Member Function Documentation

◆ Init()

virtual Bool Murl::Graph::IFactory::Init ( )
pure virtual

Initialize the factory.

Returns
true if successful.

◆ DeInit()

virtual Bool Murl::Graph::IFactory::DeInit ( )
pure virtual

Deinitialize the factory.

Returns
true if successful.

◆ SetRoot()

virtual Bool Murl::Graph::IFactory::SetRoot ( const IRoot root)
pure virtual

Set the graph root object.

Parameters
rootThe root object.
Returns
true if successful.

◆ GetRoot()

virtual const IRoot* Murl::Graph::IFactory::GetRoot ( ) const
pure virtual

Get the graph root object.

Returns
The root object, or null if not set.

◆ CreateMultiTouchable()

virtual IMultiTouchable* Murl::Graph::IFactory::CreateMultiTouchable ( ITouchableTarget touchableTarget)
pure virtual

Create the multi-touchable object.

Parameters
touchableTargetThe ITouchableTarget interface.
Returns
The created multi-touchable object, or null if failed.

◆ DestroyMultiTouchable()

virtual Bool Murl::Graph::IFactory::DestroyMultiTouchable ( IMultiTouchable *&  multiTouchable)
pure virtual

Destroy the multi-touchable object.

Parameters
multiTouchableA reference to the multi-touchable pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ CreateNode() [1/4]

virtual INode* Murl::Graph::IFactory::CreateNode ( const INode::ClassInfo &  classInfo) const
pure virtual

Create a single node by its class info.

Parameters
classInfoThe class info structure of the node to create.
Returns
The newly created node, or null if failed.

◆ CreateNode() [2/4]

virtual INode* Murl::Graph::IFactory::CreateNode ( const String className) const
pure virtual

Create a single node by its class name.

Parameters
classNameThe class name of the node to create.
Returns
The newly created node, or null if failed.

◆ CreateNode() [3/4]

virtual INode* Murl::Graph::IFactory::CreateNode ( const String className,
const IAttributes attributes,
const IAttributes parameters 
) const
pure virtual

Create a single node by its class name, with given attributes and optional parameters.

Parameters
classNameThe class name of the node to create.
attributesThe attributes to deserialize.
parametersThe optional parameters.
Returns
The newly created node, or null if failed.

◆ CreateNode() [4/4]

virtual INode* Murl::Graph::IFactory::CreateNode ( const String className,
const String baseResourcePath,
const IAttributes attributes,
const IAttributes parameters 
) const
pure virtual

Create a single node by its class name, with given base resource path, attributes and optional parameters.

Parameters
classNameThe class name of the node to create.
baseResourcePathThe base path for referencing relative resource IDs.
attributesThe attributes to deserialize.
parametersThe optional parameters.
Returns
The newly created node, or null if failed.

◆ CreateGraph() [1/2]

virtual INode* Murl::Graph::IFactory::CreateGraph ( const Resource::IGraph graphResource,
const IAttributes params 
) const
pure virtual

Create a node graph from a given graph resource.

Parameters
graphResourceThe graph resource object holding the graph creation template.
paramsOptional parameters used for graph node deserialization, or null if no parameters should be used.
Returns
The root node of the newly created graoh, or null if failed.

◆ CreateGraph() [2/2]

virtual INode* Murl::Graph::IFactory::CreateGraph ( const Resource::IGraphNode graphResourceNode,
const IAttributes params 
) const
pure virtual

Create a node graph from a given graph resource node.

Parameters
graphResourceNodeThe graph resource node object holding the graph creation template.
paramsOptional parameters used for graph node deserialization, or null if no parameters should be used.
Returns
The root node of the newly created graoh, or null if failed.

◆ DestroyGraph()

virtual Bool Murl::Graph::IFactory::DestroyGraph ( INode *&  rootNode) const
pure virtual

Recursively destroy a node graph, starting at the given root node.

Parameters
rootNodeA reference to the root node pointer. After destruction, the pointer will be set to null.
Returns
true if successful.

◆ DeserializeNodeAttributes() [1/2]

virtual Bool Murl::Graph::IFactory::DeserializeNodeAttributes ( INode node,
const IAttributes attributes,
const IAttributes parameters 
)
pure virtual

Deserialize a given node from a set of attributes and optional parameters.

Parameters
nodeThe node to deserialize.
attributesThe attributes.
parametersThe optional parameters.
Returns
true if successful.

◆ DeserializeNodeAttributes() [2/2]

virtual Bool Murl::Graph::IFactory::DeserializeNodeAttributes ( INode node,
const String baseResourcePath,
const IAttributes attributes,
const IAttributes parameters 
)
pure virtual

Deserialize a given node from a set of attributes and optional parameters, with a given base resource path.

Parameters
nodeThe node to deserialize.
baseResourcePathThe base path for referencing relative resource IDs.
attributesThe attributes.
parametersThe optional parameters.
Returns
true if successful.

◆ CreateController() [1/4]

virtual IController* Murl::Graph::IFactory::CreateController ( const IController::ClassInfo &  classInfo,
INode owner 
) const
pure virtual

Create a node controller by its class info.

Parameters
classInfoThe class info structure of the controller to create.
ownerThe owner node of the controller.
Returns
The newly created controller, or null if failed.

◆ CreateController() [2/4]

virtual IController* Murl::Graph::IFactory::CreateController ( const String className,
INode owner 
) const
pure virtual

Create a node controller by its class name.

Parameters
classNameThe class name of the controller to create.
ownerThe owner node of the controller.
Returns
The newly created controller, or null if failed.

◆ CreateController() [3/4]

virtual IController* Murl::Graph::IFactory::CreateController ( const String className,
INode owner,
const IAttributes attributes,
const IAttributes parameters 
) const
pure virtual

Create a node controller by its class name, with given attributes and optional parameters.

Parameters
classNameThe class name of the controller to create.
ownerThe owner node of the controller.
attributesThe attributes to deserialize.
parametersThe optional parameters.
Returns
The newly created controller, or null if failed.

◆ CreateController() [4/4]

virtual IController* Murl::Graph::IFactory::CreateController ( const String className,
INode owner,
const String baseResourcePath,
const IAttributes attributes,
const IAttributes parameters 
) const
pure virtual

Create a node controller by its class name, with given base resource path, attributes and optional parameters.

Parameters
classNameThe class name of the controller to create.
ownerThe owner node of the controller.
baseResourcePathThe base path for referencing relative resource IDs.
attributesThe attributes to deserialize.
parametersThe optional parameters.
Returns
The newly created controller, or null if failed.

◆ DestroyController()

virtual Bool Murl::Graph::IFactory::DestroyController ( IController *&  controller) const
pure virtual

Destroy a given node controller.

Parameters
controllerA reference to the controller pointer. After destruction, the pointer will be set to null.
Returns
true if successful.

◆ DeserializeControllerAttributes() [1/2]

virtual Bool Murl::Graph::IFactory::DeserializeControllerAttributes ( IController controller,
const IAttributes attributes,
const IAttributes parameters 
)
pure virtual

Deserialize a given controller from a set of attributes and optional parameters.

Parameters
controllerThe controller to deserialize.
attributesThe attributes.
parametersThe optional parameters.
Returns
true if successful.

◆ DeserializeControllerAttributes() [2/2]

virtual Bool Murl::Graph::IFactory::DeserializeControllerAttributes ( IController controller,
const String baseResourcePath,
const IAttributes attributes,
const IAttributes parameters 
)
pure virtual

Deserialize a given controller from a set of attributes and optional parameters.

Parameters
controllerThe controller to deserialize.
baseResourcePathThe base path for referencing relative resource IDs.
attributesThe attributes.
parametersThe optional parameters.
Returns
true if successful.

The documentation for this interface was generated from the following file:
  • murl_graph_i_factory.h


Copyright © 2011-2018 Spraylight GmbH.