CPN
Computational Process Networks
Classes | Namespaces | Macros
NodeBase.h File Reference

The base definition of all nodes. More...

#include <cpn/common.h>
#include <cpn/NodeAttr.h>
#include <cpn/NodeFactory.h>
#include <cpn/bits/PseudoNode.h>
#include <cpn/utils/ParseBool.h>
#include <sstream>
#include <map>
#include <string>
#include <stdexcept>
+ Include dependency graph for NodeBase.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CPN::NodeBasePrivate::CoerceParam< T >
 
struct  CPN::NodeBasePrivate::CoerceParam< bool >
 
class  CPN::NodeBase
 The definition common to all nodes in the process network. More...
 

Namespaces

 CPN
 
 CPN::NodeBasePrivate
 

Macros

#define CPN_DECLARE_NODE_FACTORY(type, klass)
 
#define CPN_DECLARE_NODE_AND_FACTORY(type, klass)
 

Detailed Description

The base definition of all nodes.

Author
John Bridgman

Definition in file NodeBase.h.

Macro Definition Documentation

#define CPN_DECLARE_NODE_AND_FACTORY (   type,
  klass 
)
Value:
class klass : public CPN::NodeBase { \
public : klass(CPN::Kernel &kern, const CPN::NodeAttr& attr) : CPN::NodeBase(kern,attr) {} \
private: void Process(); }; \
Attributes for a node.
Definition: NodeAttr.h:58
The definition common to all nodes in the process network.
Definition: NodeBase.h:69
virtual void Process()=0
Override this method to implement a node.
#define CPN_DECLARE_NODE_FACTORY(type, klass)
Definition: NodeBase.h:128
The Kernel declaration.
Definition: Kernel.h:55

Definition at line 134 of file NodeBase.h.

#define CPN_DECLARE_NODE_FACTORY (   type,
  klass 
)
Value:
class type ## Factory : public CPN::NodeFactory {\
public: type ## Factory() : CPN::NodeFactory(#type) {}\
CPN::shared_ptr<CPN::NodeBase> Create(CPN::Kernel &ker, const CPN::NodeAttr &attr) { return CPN::shared_ptr<CPN::NodeBase>(new klass(ker, attr)); }};\
extern "C" CPN::shared_ptr<CPN::NodeFactory> cpninit ## type (void);\
CPN::shared_ptr<CPN::NodeFactory> cpninit ## type (void) { return CPN::shared_ptr<CPN::NodeFactory>(new type ## Factory); }
Attributes for a node.
Definition: NodeAttr.h:58
The node factory provides a method for the kernel to create arbitrary user defined Nodes...
Definition: NodeFactory.h:37
virtual shared_ptr< NodeBase > Create(Kernel &ker, const NodeAttr &attr)=0
The Kernel declaration.
Definition: Kernel.h:55

Definition at line 128 of file NodeBase.h.