C++ main module for gpm Package  1.0
GPM_ModelNode.h
Go to the documentation of this file.
1 #ifndef GPM_ModelNode_H
2 #define GPM_ModelNode_H
3 
4 
5 #include "GPM_Node.h"
6 
8 
18 class GPM_ModelNode : public virtual GPM_Node , public virtual GPM_ModelGraphElement{
19 
20  SP_OBJECT(GPM_ModelNode);
21  // ATTRIBUTES
22 
23 public:
24 
25 
26 
27 private:
28 
29 protected:
30  // METHODS
31 
32  // CONSTRUCTORS
33 
36  GPM_ModelNode(void);
37 
38 
39 
40  // DESTRUCTORS
41 
42 
45  virtual ~GPM_ModelNode(void);
46 
47 
48 
49 public:
52  inline static SP::GPM_ModelNode New() {
53  SP::GPM_ModelNode p(new GPM_ModelNode(),GPM_ModelNode::Delete());
54  p->setThis(p);
55  return p;
56  };
59  virtual SP::GPM_GraphElement NewInstance() const {
60  return New();
61  }
62  // SET & GET methods
65  virtual void copy(const GPM_GraphElement& node) {
66  GPM_Node::copy(node);
67  const GPM_ModelGraphElement *modelGraphElement=dynamic_cast<const GPM_ModelGraphElement*>(&node);
68  if (modelGraphElement!=null) GPM_ModelGraphElement::copy(*modelGraphElement);
69  }
70 
73  virtual void updateEnvironment(const map<tString,SP::GPM_Variable>& env) {
76 
77  }
78 
79 
80 };
81 
82 #endif
This class describes a model GraphElement interface.
Definition: GPM_ModelGraphElement.h:21
GPM_ModelNode(void)
create
Definition: GPM_ModelNode.cpp:4
DEFINE_SPTR(GPM_ModelNode)
virtual void updateEnvironment(const map< tString, SP::GPM_Variable > &env)
update the environment
Definition: GPM_ModelGraphElement.cpp:29
#define null
Definition: types.h:13
virtual void updateEnvironment(const map< tString, SP::GPM_Variable > &env)
update the environment
Definition: GPM_ModelNode.h:73
virtual void copy(const GPM_GraphElement &node)
copy
Definition: GPM_ModelNode.h:65
virtual ~GPM_ModelNode(void)
destroy
Definition: GPM_ModelNode.cpp:7
This class describes a model Node.
Definition: GPM_ModelNode.h:18
virtual void updateEnvironment(const map< tString, SP::GPM_Variable > &env)
update environment
Definition: GPM_GraphElement.cpp:114
virtual void copy(const GPM_GraphElement &node)
copy
Definition: GPM_Node.cpp:19
virtual SP::GPM_GraphElement NewInstance() const
create a new instance
Definition: GPM_ModelNode.h:59
static SP::GPM_ModelNode New()
create a test class
Definition: GPM_ModelNode.h:52
This class describes an element of a graph.
Definition: GPM_GraphElement.h:17
virtual void copy(const GPM_ModelGraphElement &vertex)
copy
Definition: GPM_ModelGraphElement.cpp:13
This class describes a node.
Definition: GPM_Node.h:14
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106