LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
over-table.hh
Go to the documentation of this file.
1 
6 #ifndef OVERLOAD_OVER_TABLE_HH
7 # define OVERLOAD_OVER_TABLE_HH
8 
9 # include <map>
10 # include <list>
11 
12 namespace overload
13 {
14 
15  template <typename T>
16  class OverTable
17  {
18  public:
19  typedef std::list<T*> tlist_type;
20  typedef typename tlist_type::const_iterator const_iterator;
21  typedef std::map<const misc::symbol, tlist_type> mmap_type;
22  typedef std::list<mmap_type> oversymtab_type;
23 
24  typedef std::pair<const_iterator, const_iterator> range_type;
25 
26  public:
27  OverTable();
28 
29  public:
30  void put(misc::symbol key, T& value);
31 
32  tlist_type get(misc::symbol key);
33 
34  public:
37  public:
41  void scope_begin();
42 
47  void scope_end();
51  std::ostream& print(std::ostream& ostr) const;
52 
53  protected:
55  };
56 
57 } // namespace type
58 
59 # include <overload/over-table.hxx>
60 
61 #endif // !OVERLOAD_OVER_TABLE_HH