All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
socket.h
Go to the documentation of this file.
1 #ifndef SOCKET_H_INCLUDED_
2 #define SOCKET_H_INCLUDED_
3 
4 #include "rose.h"
5 
6 //why did Tim include module.h?
7 //because the parent is a class (module or channel I guess)
8 #include "module.h"
9 #include "object.h"
10 
11 namespace risc {
12 
13 class Socket: public Object {
14 
15 public:
16 
20  explicit
21  Socket(SgVariableDefinition *ast_node, Class *parent, Type type = SocketType);
22 
27  virtual std::string get_ast_type_name();
28 
30 
31  static int socket_id_counter_;
32  int id_;
33  bool is_end_;
34 protected:
47  void helper_get_mapped_sockets(std::set<risc::Socket*> &mapped_sockets, bool is_forward);
48 
49  //TODO: currently, we dont support PSG
50  /*
51  * after loading psg, this flag of the loaded port is set to true
52  *
53  */
54  //bool bounded;
55 private:
56 
60  Socket(const Socket &p);
61 };
62 
63 typedef std::vector<Socket*> SocketVector;
64 typedef std::vector<Socket*>::iterator SocketVectorIter;
65 typedef std::vector<Socket*>::const_iterator SocketVectorConstIter;
66 
67 } // end of namespace risc
68 
69 #endif /* SOCKET_H_INCLUDED_ */
70 
71 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
static int socket_id_counter_
Definition: socket.h:31
std::vector< Socket * >::const_iterator SocketVectorConstIter
Definition: socket.h:65
Socket(SgVariableDefinition *ast_node, Class *parent, Type type=SocketType)
default constructor
Definition: socket.cpp:14
Definition: class.h:53
Definition: object.h:10
virtual std::string get_ast_type_name()
Get function for the name of the ast type of the socket.
Definition: socket.cpp:24
Definition: socket.h:13
Definition: definition.h:45
int id_
Definition: socket.h:32
bool is_end_
Definition: socket.h:33
Class * parent_
Definition: socket.h:29
Type
We are using these enums to identify type type of and instance or definition during traversal...
Definition: definition.h:20
std::vector< Socket * > SocketVector
Definition: class.h:49
std::vector< Socket * >::iterator SocketVectorIter
Definition: socket.h:64
void helper_get_mapped_sockets(std::set< risc::Socket * > &mapped_sockets, bool is_forward)
This function determines all potential mapped sockets to this socket. If this socket is an Initiatore...
Definition: socket.cpp:29