LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
type.hh
Go to the documentation of this file.
1 
5 #ifndef TYPE_TYPE_HH
6 # define TYPE_TYPE_HH
7 
8 # include <type/fwd.hh>
9 # include <misc/xalloc.hh>
10 
11 namespace type
12 {
14  class Type
15  {
18  public:
20  virtual ~Type();
26  public:
28  virtual const Type& actual() const;
32  public:
46  virtual bool compatible_with(const Type& other) const;
47 
48  public:
50  virtual std::ostream& dump(std::ostream& ostr) const = 0;
51  };
52 
54  std::ostream& operator<<(std::ostream& ostr, const Type& t);
55 
56 
62  bool operator==(const Type& lhs, const Type& rhs);
64  bool operator!=(const Type& lhs, const Type& rhs);
65 
68 
69 } // namespace type
70 
71 # include <type/type.hxx>
72 
73 #endif // !TYPE_TYPE_HH