1 ///////////////////////////////////////////////////////////////////////////////
3 // This file implements different kind of graph edges
5 ///////////////////////////////////////////////////////////////////////////////
9 #include "graphtype.ph"
11 ///////////////////////////////////////////////////////////////////////////////
13 // Class to represent an single valued map
15 ///////////////////////////////////////////////////////////////////////////////
16 class MapEdge : public EdgeDef
17 { MapEdge(const MapEdge&);
18 void operator = (const MapEdge&);
20 typedef EdgeDef Super;
21 MapEdge(GraphTypeDef *, Id, NodeDef*, NodeDef*, GraphIndexing, LabTys = #[]);
24 virtual void generate_dom_rep(CodeGen&);
25 virtual void generate_ran_rep(CodeGen&);
26 virtual void generate_interf (CodeGen&);
27 virtual void generate_impl (CodeGen&);
28 virtual void choose_representation ();
29 virtual void print_report(CodeGen&);
31 virtual void gen_in (CodeGen&);
32 virtual void gen_image (CodeGen&);
33 virtual void gen_update_image (CodeGen&);
34 virtual void gen_in_dom(CodeGen&);
37 ///////////////////////////////////////////////////////////////////////////////
39 // Class to represent an multivalued map
41 ///////////////////////////////////////////////////////////////////////////////
42 class MultiMapEdge : public EdgeDef
43 { MultiMapEdge(const MultiMapEdge&);
44 void operator = (const MultiMapEdge&);
46 typedef EdgeDef Super;
48 (GraphTypeDef *, Id, NodeDef*, NodeDef*, GraphIndexing, LabTys = #[]);
51 virtual void generate_dom_rep(CodeGen&);
52 virtual void generate_ran_rep(CodeGen&);
53 virtual void generate_interf (CodeGen&);
54 virtual void generate_impl (CodeGen&);
55 virtual void choose_representation ();
56 virtual void print_report(CodeGen&);
58 virtual void gen_in (CodeGen&);
59 virtual void gen_image (CodeGen&);
60 virtual void gen_update_image (CodeGen&);
61 virtual void gen_in_dom(CodeGen&);
64 ///////////////////////////////////////////////////////////////////////////////
66 // Class to represent an bijection
68 ///////////////////////////////////////////////////////////////////////////////
69 class BijectionEdge : public MapEdge
70 { BijectionEdge(const BijectionEdge&);
71 void operator = (const BijectionEdge&);
73 typedef MapEdge Super;
75 (GraphTypeDef *, Id, NodeDef*, NodeDef*, GraphIndexing, LabTys = #[]);
78 virtual void generate_dom_rep(CodeGen&);
79 virtual void generate_ran_rep(CodeGen&);
80 virtual void generate_interf (CodeGen&);
81 virtual void generate_impl (CodeGen&);
82 virtual void choose_representation ();
83 virtual void print_report(CodeGen&);
86 ///////////////////////////////////////////////////////////////////////////////
88 // Class to represent an equivalence relation
90 ///////////////////////////////////////////////////////////////////////////////
91 class EquivRelationEdge : public MapEdge
92 { EquivRelationEdge(const EquivRelationEdge&);
93 void operator = (const EquivRelationEdge&);
95 typedef MapEdge Super;
97 (GraphTypeDef *, Id, NodeDef*, NodeDef*, GraphIndexing, LabTys = #[]);
100 virtual void generate_dom_rep (CodeGen&);
101 virtual void generate_ran_rep (CodeGen&);
102 virtual void generate_interf (CodeGen&);
103 virtual void generate_impl (CodeGen&);
104 virtual void choose_representation ();
105 virtual void print_report(CodeGen&);