1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Andrew Reynolds, Aina Niemetz |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* A class representing an index to a datatype living in NodeManager. |
14 |
|
*/ |
15 |
|
#include "expr/datatype_index.h" |
16 |
|
|
17 |
|
#include <sstream> |
18 |
|
#include <string> |
19 |
|
#include "util/hash.h" |
20 |
|
#include "util/integer.h" |
21 |
|
|
22 |
|
using namespace std; |
23 |
|
|
24 |
|
namespace cvc5 { |
25 |
|
|
26 |
5525 |
DatatypeIndexConstant::DatatypeIndexConstant(uint32_t index) : d_index(index) {} |
27 |
|
std::ostream& operator<<(std::ostream& out, const DatatypeIndexConstant& dic) |
28 |
|
{ |
29 |
|
return out << "index_" << dic.getIndex(); |
30 |
|
} |
31 |
|
|
32 |
29113 |
size_t DatatypeIndexConstantHashFunction::operator()( |
33 |
|
const DatatypeIndexConstant& dic) const |
34 |
|
{ |
35 |
29113 |
return IntegerHashFunction()(dic.getIndex()); |
36 |
|
} |
37 |
|
|
38 |
29514 |
} // namespace cvc5 |