19 #ifndef __CVC4__RECORD_H 20 #define __CVC4__RECORD_H 37 RecordSelect(
const std::string& field)
throw() : d_field(field) { }
38 std::string
getField()
const throw() {
return d_field; }
46 RecordUpdate(
const std::string& field)
throw() : d_field(field) { }
47 std::string
getField()
const throw() {
return d_field; }
68 return out <<
"[" << t.
getField() <<
"]";
72 return out <<
"[" << t.
getField() <<
"]";
85 std::vector< std::pair<std::string, Type> > d_fields;
92 Record(
const std::vector< std::pair<std::string, Type> >& fields) :
96 const_iterator
find(std::string name)
const {
98 for(i = begin(); i != end(); ++i) {
99 if((*i).first == name) {
107 const_iterator i = find(name);
108 CheckArgument(i != end(), name,
"requested field `%s' does not exist in record", name.c_str());
113 return d_fields.size();
117 return d_fields.begin();
120 const_iterator
end()
const {
121 return d_fields.end();
124 std::pair<std::string, Type>
operator[](
size_t index)
const {
125 CheckArgument(index < d_fields.size(), index,
"index out of bounds for record type");
126 return d_fields[index];
130 return d_fields == r.d_fields;
134 return !(*
this == r);
size_t operator()(const RecordSelect &t) const
size_t getIndex(std::string name) const
std::vector< std::pair< std::string, Type > >::const_iterator const_iterator
bool operator==(const Record &r) const
[[ Add one-line brief description here ]]
std::ostream & operator<<(std::ostream &, const Command &)
void CheckArgument(bool cond, const T &arg, const char *fmt,...)
size_t operator()(const Record &r) const
RecordSelect(const std::string &field)
const_iterator begin() const
Record(const std::vector< std::pair< std::string, Type > > &fields)
Macros that should be defined everywhere during the building of the libraries and driver binary...
bool operator!=(const Record &r) const
bool operator==(const RecordSelect &t) const
size_t getNumFields() const
size_t operator()(const RecordUpdate &t) const
bool operator!=(const RecordSelect &t) const
const_iterator find(std::string name) const
const_iterator end() const
struct CVC4::options::out__option_t out
RecordUpdate(const std::string &field)
std::string getField() const
bool operator!=(const RecordUpdate &t) const
std::pair< std::string, Type > operator[](size_t index) const
std::string getField() const
Interface for expression types.
bool operator==(const RecordUpdate &t) const