cvc4-1.4
|
A simple S-expression. More...
#include <sexpr.h>
Public Types | |
typedef SExprKeyword | Keyword |
Public Member Functions | |
SExpr () | |
SExpr (const CVC4::Integer &value) | |
SExpr (int value) | |
SExpr (long int value) | |
SExpr (unsigned int value) | |
SExpr (unsigned long int value) | |
SExpr (const CVC4::Rational &value) | |
SExpr (const std::string &value) | |
SExpr (const char *value) | |
This constructs a string expression from a const char* value. | |
SExpr (bool value) | |
This adds a convenience wrapper to SExpr to cast from bools. | |
SExpr (const Keyword &value) | |
SExpr (const std::vector< SExpr > &children) | |
bool | isAtom () const |
Is this S-expression an atom? | |
bool | isInteger () const |
Is this S-expression an integer? | |
bool | isRational () const |
Is this S-expression a rational? | |
bool | isString () const |
Is this S-expression a string? | |
bool | isKeyword () const |
Is this S-expression a keyword? | |
std::string | getValue () const |
Get the string value of this S-expression. | |
const CVC4::Integer & | getIntegerValue () const |
Get the integer value of this S-expression. | |
const CVC4::Rational & | getRationalValue () const |
Get the rational value of this S-expression. | |
const std::vector< SExpr > & | getChildren () const |
Get the children of this S-expression. | |
bool | operator== (const SExpr &s) const |
Is this S-expression equal to another? | |
bool | operator!= (const SExpr &s) const |
Is this S-expression different from another? | |
A simple S-expression.
An S-expression is either an atom with a string value, or a list of other S-expressions.
typedef SExprKeyword CVC4::SExpr::Keyword |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the children of this S-expression.
This will cause an error if this S-expression is not a list.
Definition at line 283 of file sexpr.h.
References CVC4::CheckArgument(), and isAtom().
|
inline |
Get the integer value of this S-expression.
This will cause an error if this S-expression is not an integer.
Definition at line 273 of file sexpr.h.
References CVC4::CheckArgument(), and isInteger().
|
inline |
Get the rational value of this S-expression.
This will cause an error if this S-expression is not a rational.
Definition at line 278 of file sexpr.h.
References CVC4::CheckArgument(), and isRational().
|
inline |
Get the string value of this S-expression.
This will cause an error if this S-expression is not an atom.
Definition at line 250 of file sexpr.h.
References CVC4::CheckArgument(), CVC4::Rational::getDouble(), isAtom(), and CVC4::Integer::toString().
|
inline |
Is this S-expression an atom?
Definition at line 230 of file sexpr.h.
Referenced by getChildren(), and getValue().
|
inline |
Is this S-expression an integer?
Definition at line 234 of file sexpr.h.
Referenced by getIntegerValue().
|
inline |
|
inline |
Is this S-expression a rational?
Definition at line 238 of file sexpr.h.
Referenced by getRationalValue().
|
inline |
|
inline |
|
inline |