source: XIOS/dev/dev_trunk_graph/src/workflow_graph.hpp @ 2338

Last change on this file since 2338 was 2028, checked in by yushan, 3 years ago

Graph intermediate commit to a tmp branch.

File size: 2.5 KB
RevLine 
[1653]1#ifndef __WORKFLOW_GRAPH_HPP__
2#define __WORKFLOW_GRAPH_HPP__
3
4#include "xios_spl.hpp"
5#include "field.hpp"
[1686]6#include "grid.hpp"
[1653]7#include "garbage_collector.hpp"
[1686]8#include "date.hpp"
9#include "duration.hpp"
[2019]10#include "context.hpp"
[1653]11
12namespace xios
13{
[1686]14  class CField;
[1653]15
[2019]16  struct graph_node_object
[1653]17  {
[2019]18    StdString filter_name;
[1653]19
[2019]20    int filter_class;
21    bool filter_filled;
22    int expected_entry_nb;
23    CDate date;
24    Time timestamp;
25    StdString transform_type;
26    StdString attributes;
27    StdString field_id;
28    bool inputs_complete;
29    int filter_tag;
30    int clusterID;
31    int distance;
32    StdString context_id;
33    int context;
[2023]34    StdString label_field_id;
[2026]35    bool show;
36
37
38    graph_node_object():show(true){}
39
[2019]40  };
[1653]41
[2019]42  struct graph_edge_object
43  {
44    int from;
45    int to;
46
47    StdString field_id;
48    StdString field_name;
49    StdString grid_id;
50    CDate date;
51    Time timestamp;
52    CField *field;
53    StdString attributes;
54    StdString context_id;
55    int context;
[2026]56    bool show;
[2028]57    StdString label_info;
[2026]58   
[2028]59    graph_edge_object():show(true), label_info("none"){}
[2019]60  };
61
62  class CWorkflowGraph
63  {
[1653]64    public:
65
66      CWorkflowGraph();
67
68      /*! Map between fields identified by its id and their filters identified by an integer.
69       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()).
70      */
71
[2019]72      static std::vector<graph_node_object> *vectorOfNodes_;
73      static std::vector<graph_edge_object> *vectorOfEdges_; 
74      static std::vector<StdString> *vectorOfContexts_; 
[1653]75
[2019]76      static std::vector<graph_node_object> *vectorOfNodes_srv_;
77      static std::vector<graph_edge_object> *vectorOfEdges_srv_;
78      static std::vector<StdString> *vectorOfContexts_srv_; 
[1653]79
[2026]80      // these variables are not yet used
[2019]81      static bool clientGraphBuilt;
82      static bool serverGraphBuilt;
[2026]83      static bool build_begin;
[2019]84
85
86      static void drawWorkFlowGraph_client();
87      static void drawWorkFlowGraph_server();
88
89
90      static void addNode(StdString filterName, int filter_class, bool filter_filled, int entry_nb, CDataPacketPtr packet);
91      static void addEdge(int from, int to, CDataPacketPtr packet);
[2026]92     
93      // write to file the graph info
[2019]94      static void outputWorkflowGraph_client();
95      static void outputWorkflowGraph_server();
[2026]96     
97      // output on screen the graph info
98      static void outputWorkflowGraph_client_stdout();
99      static void outputWorkflowGraph_server_stdout();
[2019]100
[2026]101      static int  getNodeSize();
[2019]102
[1653]103  };
[2019]104
[1653]105}
106
107#endif
[2019]108
Note: See TracBrowser for help on using the repository browser.