All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
port_call_path.h
Go to the documentation of this file.
1 #ifndef PORT_CALL_PATH_H_INCLUDED_
2 #define PORT_CALL_PATH_H_INCLUDED_
3 
4 #include "rose.h"
5 
6 namespace risc {
7 
8 namespace sg {
9 
10 class PortCallPath {
11 
12 public:
17  std::list<SgFunctionCallExp*> path_;
18 
19  //2018 07 18 ZC
20  //for pcp+psg, details refer to change_logs_ZC 1)
25  std::list<SgVariableDefinition*> port_;
26 
30  int pcp_type_;
31 
32  PortCallPath();
33  PortCallPath(std::list<SgVariableDefinition*>);
34  ~PortCallPath();
35 
40  void print();
41 };
42 
43 bool operator==(const PortCallPath &lhs , const PortCallPath &rhs);
44 bool operator<(const PortCallPath &lhs , const PortCallPath &rhs); // (RD, 11/22/19)
45 
47  SgVariableSymbol *symbol_;
49 
50  SymbolWithPath(SgVariableSymbol* symbol, PortCallPath pcp):
51  symbol_(symbol),
52  pcp_(pcp)
53  { }
54 
55  bool operator<(const SymbolWithPath &other) const // needed for std::set (RD, 11/22/18)
56  {
57  if(symbol_ != other.symbol_) {
58  return (symbol_ < other.symbol_); /* pointer comparison */
59  }
60  return (pcp_ < other.pcp_);
61  }
62 };
63 
64 struct NodeWithPath {
65  SgNode *node_;
67 
68  NodeWithPath(SgNode* node, PortCallPath pcp):
69  node_(node),
70  pcp_(pcp)
71  { }
72 };
73 
74 } // end of namespace sg
75 
76 } // end of namespace risc
77 
78 #endif /* PORT_CALL_PATH_H_INCLUDED_ */
79 
80 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
Definition: port_call_path.h:64
Definition: port_call_path.h:46
SymbolWithPath(SgVariableSymbol *symbol, PortCallPath pcp)
Definition: port_call_path.h:50
const bool operator<(const MappedVariable &lhs, const MappedVariable &rhs)
Definition: mapped_variable.cpp:50
PortCallPath pcp_
Definition: port_call_path.h:48
void print()
Prints the PCP.
Definition: port_call_path.cpp:18
std::list< SgFunctionCallExp * > path_
First type representation of PCP. A list of of function calls;.
Definition: port_call_path.h:17
Definition: port_call_path.h:10
NodeWithPath(SgNode *node, PortCallPath pcp)
Definition: port_call_path.h:68
PortCallPath pcp_
Definition: port_call_path.h:66
~PortCallPath()
Definition: port_call_path.cpp:13
SgNode * node_
Definition: port_call_path.h:65
SgVariableSymbol * symbol_
Definition: port_call_path.h:47
bool operator<(const SymbolWithPath &other) const
Definition: port_call_path.h:55
int pcp_type_
Type of PCP.
Definition: port_call_path.h:30
PortCallPath()
Definition: port_call_path.cpp:4
std::list< SgVariableDefinition * > port_
Second type representation of PCP. A list of of sockets/ports;.
Definition: port_call_path.h:25
bool operator==(const PortCallPath &lhs, const PortCallPath &rhs)
Definition: port_call_path.cpp:35