cvc4-1.4
tuple.h
Go to the documentation of this file.
1/********************* */
17#include "cvc4_public.h"
18
19#ifndef __CVC4__TUPLE_H
20#define __CVC4__TUPLE_H
21
22#include <iostream>
23#include <string>
24#include <vector>
25#include <utility>
26
27namespace CVC4 {
28
30 unsigned d_index;
31public:
32 TupleSelect(unsigned index) throw() : d_index(index) { }
33 unsigned getIndex() const throw() { return d_index; }
34 bool operator==(const TupleSelect& t) const throw() { return d_index == t.d_index; }
35 bool operator!=(const TupleSelect& t) const throw() { return d_index != t.d_index; }
36};/* class TupleSelect */
37
39 unsigned d_index;
40public:
41 TupleUpdate(unsigned index) throw() : d_index(index) { }
42 unsigned getIndex() const throw() { return d_index; }
43 bool operator==(const TupleUpdate& t) const throw() { return d_index == t.d_index; }
44 bool operator!=(const TupleUpdate& t) const throw() { return d_index != t.d_index; }
45};/* class TupleUpdate */
46
48 inline size_t operator()(const TupleSelect& t) const {
49 return t.getIndex();
50 }
51};/* struct TupleSelectHashFunction */
52
54 inline size_t operator()(const TupleUpdate& t) const {
55 return t.getIndex();
56 }
57};/* struct TupleUpdateHashFunction */
58
59std::ostream& operator<<(std::ostream& out, const TupleSelect& t) CVC4_PUBLIC;
60std::ostream& operator<<(std::ostream& out, const TupleUpdate& t) CVC4_PUBLIC;
61
62inline std::ostream& operator<<(std::ostream& out, const TupleSelect& t) {
63 return out << "[" << t.getIndex() << "]";
64}
65
66inline std::ostream& operator<<(std::ostream& out, const TupleUpdate& t) {
67 return out << "[" << t.getIndex() << "]";
68}
69
70}/* CVC4 namespace */
71
72#endif /* __CVC4__TUPLE_H */
bool operator==(const TupleSelect &t) const
Definition tuple.h:34
bool operator!=(const TupleSelect &t) const
Definition tuple.h:35
TupleSelect(unsigned index)
Definition tuple.h:32
unsigned getIndex() const
Definition tuple.h:33
bool operator==(const TupleUpdate &t) const
Definition tuple.h:43
unsigned getIndex() const
Definition tuple.h:42
bool operator!=(const TupleUpdate &t) const
Definition tuple.h:44
TupleUpdate(unsigned index)
Definition tuple.h:41
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)
size_t operator()(const TupleSelect &t) const
Definition tuple.h:48
size_t operator()(const TupleUpdate &t) const
Definition tuple.h:54