LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
temp.hh
Go to the documentation of this file.
1 
6 #ifndef TEMP_TEMP_HH
7 # define TEMP_TEMP_HH
8 
9 # include <misc/list.hh>
10 # include <misc/endomap.hh>
11 # include <temp/identifier.hh>
12 
13 # ifndef MAYBE_EXTERN
14 # define MAYBE_EXTERN extern
15 # endif
16 
17 namespace temp
18 {
19 
20  template <typename Tag_>
21  struct temp_traits;
22 
23  template <>
24  struct temp_traits<misc::symbol>
25  {
26  static const std::string prefix;
27  static const int rank;
28  };
29 
30  template <>
31  struct temp_traits<unsigned>
32  {
33  static const std::string prefix;
34  static const int rank;
35  };
36 
39 
40  // Static member specialization declaration.
41  //
42  // Do not use the `Temp' typedef to make it clear that template<>
43  // is required.
44  template <> unsigned Identifier<temp_traits>::count_;
45 
48 
49 
50  // Explicit template instantiation declarations.
52 
53  MAYBE_EXTERN template
54  std::ostream& operator<<(std::ostream& ostr,
55  const Identifier<temp_traits>& obj);
56 
57 } // namespace temp
58 
59 namespace misc
60 {
61 
62  // Explicit template instantiation declarations.
63  MAYBE_EXTERN template class endo_map<temp::Temp>;
64 
65  MAYBE_EXTERN template
66  std::ostream& operator<<(std::ostream& ostr,
67  const map<temp::Temp, temp::Temp>& m);
68 
69  MAYBE_EXTERN template class list<temp::Temp>;
70  MAYBE_EXTERN template
71  list<temp::Temp>::list(misc::set<temp::Temp>::const_iterator f,
73  MAYBE_EXTERN template
74  list<temp::Temp>::list(list<temp::Temp>::const_iterator f,
75  list<temp::Temp>::const_iterator l);
76  MAYBE_EXTERN template list<temp::Temp>::list(const misc::set<temp::Temp>& s);
77  MAYBE_EXTERN template std::ostream& operator<<(std::ostream& ostr,
78  const list<temp::Temp>& l);
79  MAYBE_EXTERN template bool operator% (const temp::Temp& t,
80  const list<temp::Temp>& l);
81 }
82 
83 #endif // !TEMP_TEMP_HH