C++ main module for gpm Package  1.0
GPM_ModelGraph.h
Go to the documentation of this file.
1 #ifndef GPM_ModelGraph_H
2 #define GPM_ModelGraph_H
3 
4 
5 #include "GPM_PortGraph.h"
6 
7 #include "GPM_ModelNode.h"
8 #include "GPM_ModelPort.h"
9 #include "GPM_ModelEdge.h"
10 
11 
21 class GPM_ModelGraph : public virtual GPM_PortGraph {
22 
23  SP_OBJECT(GPM_ModelGraph);
24  // ATTRIBUTES
25 
26 public:
27 
28 
29 
30 private:
31 
32 
33 protected:
34  // METHODS
35 
36  // CONSTRUCTORS
37 
40  GPM_ModelGraph(void);
41 
42 
43 
44  // DESTRUCTORS
45 
46 
49  virtual ~GPM_ModelGraph(void);
50 
51 
52 
53 public:
56  inline static SP::GPM_ModelGraph New() {
57  SP::GPM_ModelGraph p(new GPM_ModelGraph(),GPM_ModelGraph::Delete());
58  p->setThis(p);
59  return p;
60  };
61 
64  virtual void toDoAfterThisSetting() {
66  }
67 
68 
69 public:
72  virtual SP::GPM_Node newNode() const {
73  return GPM_ModelNode::New();
74  }
77  virtual SP::GPM_Port newPort() const {
78  return GPM_ModelPort::New();
79  }
82  virtual SP::GPM_Edge newEdge() const {
83  return GPM_ModelEdge::New();
84  }
87  virtual SP::GPM_Edge newEdge(const int& id) const {
88  SP::GPM_Edge p=GPM_ModelEdge::New(id);
89  return p;
90  }
93  virtual SP::GPM_Edge newEdge(SP::GPM_Vertex source,SP::GPM_Vertex target) const {
94  SP::GPM_Edge p=GPM_ModelEdge::New(source,target);
95  return p;
96  }
97 
100  void clearRules();
101 
104  void updateRules(const GPM_ModelClassFactory& cf);
107  int getRulesNumber() const;
111 
114  virtual void patternsMappingSignalEmit(const SVC::GPM_PatternFunction patternFunction,
115  const vector<vector<vector<tVertexIID> > >& fmappings) const;
116 
117 
118 };
119 
120 #endif
void clearRules()
clear rules
Definition: GPM_ModelGraph.cpp:49
virtual SP::GPM_Port newPort() const
create a port
Definition: GPM_ModelGraph.h:77
virtual ~GPM_ModelGraph(void)
destroy
Definition: GPM_ModelGraph.cpp:12
This class describes a model graph.
Definition: GPM_ModelGraph.h:21
virtual SP::GPM_Edge newEdge(SP::GPM_Vertex source, SP::GPM_Vertex target) const
create a node
Definition: GPM_ModelGraph.h:93
virtual SP::GPM_Edge newEdge(const int &id) const
create a node
Definition: GPM_ModelGraph.h:87
static SP::GPM_ModelPort New()
create a test class
Definition: GPM_ModelPort.h:54
#define tBoolean
Definition: types.h:35
void updateRules(const GPM_ModelClassFactory &cf)
update rules
Definition: GPM_ModelGraph.cpp:25
tBoolean orderTriggerRules()
Definition: GPM_ModelGraph.cpp:103
int getRulesNumber() const
get the rules number
Definition: GPM_ModelGraph.cpp:75
virtual void toDoAfterThisSetting()
method called after this setting
Definition: GPM_ModelGraph.h:64
This class is the class to save GPM classes.
Definition: GPM_ModelClassFactory.h:16
GPM_ModelGraph(void)
create
Definition: GPM_ModelGraph.cpp:8
DEFINE_SPTR(GPM_ModelGraph)
virtual SP::GPM_Node newNode() const
create a node
Definition: GPM_ModelGraph.h:72
This class describes a graph which is a list of vertices, ports & edges.
Definition: GPM_PortGraph.h:22
virtual SP::GPM_Edge newEdge() const
create a edge
Definition: GPM_ModelGraph.h:82
virtual void patternsMappingSignalEmit(const SVC::GPM_PatternFunction patternFunction, const vector< vector< vector< tVertexIID > > > &fmappings) const
signal emmiting when the matching of patterns is done
Definition: GPM_ModelGraph.cpp:18
static SP::GPM_ModelEdge New()
create an edge
Definition: GPM_ModelEdge.h:68
virtual void toDoAfterThisSetting()
method called after setThis() method this method can oly be called once.
Definition: CORE_Object.h:188
static SP::GPM_ModelNode New()
create a test class
Definition: GPM_ModelNode.h:52
static SP::GPM_ModelGraph New()
create a test class
Definition: GPM_ModelGraph.h:56
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106