CPN
Computational Process Networks
Public Member Functions | Private Attributes | List of all members
CPN::NodeFactory Class Referenceabstract

The node factory provides a method for the kernel to create arbitrary user defined Nodes. More...

#include <NodeFactory.h>

+ Collaboration diagram for CPN::NodeFactory:

Public Member Functions

 NodeFactory (const std::string &name_)
 
virtual ~NodeFactory ()
 
virtual shared_ptr< NodeBaseCreate (Kernel &ker, const NodeAttr &attr)=0
 
const std::string & GetName (void) const
 

Private Attributes

const std::string name
 

Detailed Description

The node factory provides a method for the kernel to create arbitrary user defined Nodes.

Definition at line 37 of file NodeFactory.h.

Constructor & Destructor Documentation

CPN::NodeFactory::NodeFactory ( const std::string &  name_)

Definition at line 29 of file NodeFactory.cc.

29  : name(name_) {
30  }
const std::string name
Definition: NodeFactory.h:61
CPN::NodeFactory::~NodeFactory ( )
virtual

Definition at line 32 of file NodeFactory.cc.

32  {
33  }

Member Function Documentation

virtual shared_ptr<NodeBase> CPN::NodeFactory::Create ( Kernel ker,
const NodeAttr attr 
)
pure virtual

Create a new node for the specific type.

Note
the shared_ptr object returned must properly delete the node. So, for shared libraries the second shared_ptr constructor parameter should be used.
Parameters
kerthe kernel
attrattributes for the new node which include the parameters
Returns
a shared pointer to a concreate node object

Referenced by CPN::Kernel::InternalCreateNode().

+ Here is the caller graph for this function:

const std::string& CPN::NodeFactory::GetName ( void  ) const
inline

Get the node type name for this factory.

Returns
the type name

Definition at line 58 of file NodeFactory.h.

58 { return name; }
const std::string name
Definition: NodeFactory.h:61

Member Data Documentation

const std::string CPN::NodeFactory::name
private

Definition at line 61 of file NodeFactory.h.


The documentation for this class was generated from the following files: