Ignore:
Timestamp:
01/22/21 12:00:29 (3 years ago)
Author:
yushan
Message:

Graph intermedia commit to a tmp branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_graph/src/workflow_graph.hpp

    r1686 r2019  
    88#include "date.hpp" 
    99#include "duration.hpp" 
    10  
     10#include "context.hpp" 
    1111 
    1212namespace xios 
     
    1414  class CField; 
    1515 
     16   
    1617  struct graph_info_box_node 
    1718  { 
     
    3031    int clusterID; 
    3132    int distance; 
     33    StdString node_context_id; 
    3234  }; 
    3335 
     
    4345    CField *field; 
    4446    StdString attributes; 
    45      
     47    StdString edge_context_id; 
     48  }; 
     49 
     50  struct graph_node_object 
     51  { 
     52    StdString filter_name; 
     53 
     54    int filter_class; 
     55    bool filter_filled; 
     56    int expected_entry_nb; 
     57    CDate date; 
     58    Time timestamp; 
     59    StdString transform_type; 
     60    StdString attributes; 
     61    StdString field_id; 
     62    bool inputs_complete; 
     63    int filter_tag; 
     64    int clusterID; 
     65    int distance; 
     66    StdString context_id; 
     67    int context; 
     68  }; 
     69 
     70  struct graph_edge_object 
     71  { 
     72    int from; 
     73    int to; 
     74 
     75    StdString field_id; 
     76    StdString field_name; 
     77    StdString grid_id; 
     78    CDate date; 
     79    Time timestamp; 
     80    CField *field; 
     81    StdString attributes; 
     82    StdString context_id; 
     83    int context; 
    4684  }; 
    4785 
    4886  class CWorkflowGraph 
    4987  { 
    50  
    51     friend class CGraphviz; 
    52  
    5388    public: 
    5489 
     
    5893       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()). 
    5994      */ 
    60       // static std::unordered_map <StdString, vector <int> > *mapFieldToFilters_ptr; 
    61       // #pragma omp threadprivate(mapFieldToFilters_ptr) 
    6295 
     96      static std::vector<graph_node_object> *vectorOfNodes_; 
     97      static std::vector<graph_edge_object> *vectorOfEdges_;  
     98      static std::vector<StdString> *vectorOfContexts_;  
     99 
     100      static std::vector<graph_node_object> *vectorOfNodes_srv_; 
     101      static std::vector<graph_edge_object> *vectorOfEdges_srv_; 
     102      static std::vector<StdString> *vectorOfContexts_srv_;  
     103 
     104      static bool clientGraphBuilt; 
     105      static bool serverGraphBuilt; 
     106 
     107      static int filterIdGenerator; 
     108      static int edgeIdGenerator; 
     109 
     110      static void drawWorkFlowGraph_client(); 
     111      static void drawWorkFlowGraph_server(); 
     112 
     113 
     114      static void addNode(StdString filterName, int filter_class, bool filter_filled, int entry_nb, CDataPacketPtr packet); 
     115      static void addEdge(int from, int to, CDataPacketPtr packet); 
     116      static int getNodeSize(); 
     117      static void outputWorkflowGraph_client(); 
     118      static void outputWorkflowGraph_server(); 
    63119 
    64120 
     
    68124 
    69125      static std::unordered_map <size_t, int> *mapHashFilterID_ptr; 
     126       
     127      static std::unordered_map <StdString, int> *mapContext_ptr; 
    70128 
    71129 
    72130      static bool build_begin; 
    73131 
    74       static void addNode(int nodeID, StdString filterName, int filter_class, bool filter_filled, int entry_nb, CDataPacketPtr packet); 
    75       static void addEdge(int edgeID, int toID, CDataPacketPtr packet); 
     132      static void addNode2(int nodeID, StdString filterName, int filter_class, bool filter_filled, int entry_nb, CDataPacketPtr packet); 
     133      static void addEdge2(int from, int to, CDataPacketPtr packet); 
    76134      static void allocNodeEdge(); 
    77135 
     
    88146 
    89147      static void buildStaticWorkflow(); 
    90       static void buildStaticWorkflow_with_info(); 
    91       static void showStaticWorkflow(); 
    92148 
    93        
    94149 
    95150 
    96151  }; 
     152 
    97153} 
    98154 
    99155#endif 
     156 
Note: See TracChangeset for help on using the changeset viewer.