emptyset.h
Go to the documentation of this file.
/********************* */
#include "cvc4_public.h"
#pragma once
namespace CVC4 {
// messy; Expr needs EmptySet (because it's the payload of a
// CONSTANT-kinded expression), and EmptySet needs Expr.
class CVC4_PUBLIC EmptySet;
}/* CVC4 namespace */
#include "expr/expr.h"
#include "expr/type.h"
#include <iostream>
namespace CVC4 {
class CVC4_PUBLIC EmptySet {
const SetType d_type;
EmptySet() { }
public:
EmptySet(SetType setType):d_type(setType) { }
~EmptySet() throw() {
}
SetType getType() const { return d_type; }
bool operator==(const EmptySet& es) const throw() {
return d_type == es.d_type;
}
bool operator!=(const EmptySet& es) const throw() {
return !(*this == es);
}
bool operator<(const EmptySet& es) const throw() {
return d_type < es.d_type;
}
bool operator<=(const EmptySet& es) const throw() {
return d_type <= es.d_type;
}
bool operator>(const EmptySet& es) const throw() {
return !(*this <= es);
}
bool operator>=(const EmptySet& es) const throw() {
return !(*this < es);
}
};/* class EmptySet */
std::ostream& operator<<(std::ostream& out, const EmptySet& es) CVC4_PUBLIC;
struct CVC4_PUBLIC EmptySetHashFunction {
inline size_t operator()(const EmptySet& es) const {
return TypeHashFunction()(es.getType());
}
};/* struct EmptySetHashFunction */
}/* CVC4 namespace */
CVC4::EmptySet
Definition emptyset.h:34
CVC4::EmptySet::operator!=
bool operator!=(const EmptySet &es) const
Definition emptyset.h:56
CVC4::EmptySet::operator>=
bool operator>=(const EmptySet &es) const
Definition emptyset.h:69
CVC4::EmptySet::getType
SetType getType() const
Definition emptyset.h:51
CVC4::EmptySet::~EmptySet
~EmptySet()
Definition emptyset.h:48
CVC4::EmptySet::EmptySet
EmptySet(SetType setType)
Constructs an emptyset of the specified type.
Definition emptyset.h:45
CVC4::EmptySet::operator>
bool operator>(const EmptySet &es) const
Definition emptyset.h:66
CVC4::EmptySet::operator<=
bool operator<=(const EmptySet &es) const
Definition emptyset.h:63
CVC4::EmptySet::operator==
bool operator==(const EmptySet &es) const
Definition emptyset.h:53
CVC4::EmptySet::operator<
bool operator<(const EmptySet &es) const
Definition emptyset.h:60
CVC4::SetType
Class encapsulating an set type.
Definition type.h:501
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4_PUBLIC
#define CVC4_PUBLIC
Definition cvc4_public.h:30
expr.h
CVC4
Definition expr.h:106
CVC4::operator<<
std::ostream & operator<<(std::ostream &out, const TypeCheckingException &e)
CVC4::EmptySetHashFunction
Definition emptyset.h:77
CVC4::EmptySetHashFunction::operator()
size_t operator()(const EmptySet &es) const
Definition emptyset.h:78
CVC4::TypeHashFunction
Hash function for Types.
Definition type.h:69
type.h
Interface for expression types.