cvc4-1.4
ascription_type.h
Go to the documentation of this file.
1/********************* */
17#include "cvc4_public.h"
18
19#ifndef __CVC4__ASCRIPTION_TYPE_H
20#define __CVC4__ASCRIPTION_TYPE_H
21
22#include "expr/type.h"
23
24namespace CVC4 {
25
34 Type d_type;
35public:
36 AscriptionType(Type t) throw() : d_type(t) {}
37 Type getType() const throw() { return d_type; }
38 bool operator==(const AscriptionType& other) const throw() {
39 return d_type == other.d_type;
40 }
41 bool operator!=(const AscriptionType& other) const throw() {
42 return d_type != other.d_type;
43 }
44};/* class AscriptionType */
45
50 inline size_t operator()(const AscriptionType& at) const {
51 return TypeHashFunction()(at.getType());
52 }
53};/* struct AscriptionTypeHashFunction */
54
56inline std::ostream& operator<<(std::ostream& out, AscriptionType at) {
57 out << at.getType();
58 return out;
59}
60
61}/* CVC4 namespace */
62
63#endif /* __CVC4__ASCRIPTION_TYPE_H */
A class used to parameterize a type ascription.
bool operator!=(const AscriptionType &other) const
bool operator==(const AscriptionType &other) const
Class encapsulating CVC4 expression types.
Definition type.h:89
Macros that should be defined everywhere during the building of the libraries and driver binary,...
#define CVC4_PUBLIC
Definition cvc4_public.h:30
Definition expr.h:106
std::ostream & operator<<(std::ostream &out, const TypeCheckingException &e)
A hash function for type ascription operators.
size_t operator()(const AscriptionType &at) const
Hash function for Types.
Definition type.h:69
Interface for expression types.