#include <Cell.hpp>
Public Member Functions | |
Cell (const int i) | |
Constructor to make int cell. | |
Cell (const double d) | |
Constructor to make double cell. | |
Cell (const char *const s) | |
Constructor to make string cell. | |
Cell (bool is_symbol, const char *const s) | |
Constructor to make symbol cell. | |
Cell (Cell *const my_car, Cell *const my_cdr) | |
Constructor to make cons cell. | |
bool | is_int () const |
Check if this is an int cell. | |
bool | is_double () const |
Check if this is a double cell. | |
bool | is_string () const |
Check if this is a string cell. | |
bool | is_symbol () const |
Check if this is a symbol cell. | |
bool | is_cons () const |
Check if this is a cons cell. | |
int | get_int () const |
Accessor (error if this is not an int cell). | |
double | get_double () const |
Accessor (error if this is not a double cell). | |
string | get_string () const |
Accessor (error if this is not a string cell). | |
string | get_symbol () const |
Accessor (error if this is not a symbol cell). | |
Cell * | get_car () const |
Accessor (error if this is not a cons cell). | |
Cell * | get_cdr () const |
Accessor (error if this is not a cons cell). | |
void | print (ostream &os=cout) const |
Print the subtree rooted at this cell, in s-expression notation. | |
Private Attributes | |
string | sexpr_m |
|
Constructor to make int cell.
|
|
Constructor to make double cell.
|
|
Constructor to make string cell.
|
|
Constructor to make symbol cell.
|
|
Constructor to make cons cell.
|
|
Accessor (error if this is not a cons cell).
|
|
Accessor (error if this is not a cons cell).
|
|
Accessor (error if this is not a double cell).
|
|
Accessor (error if this is not an int cell).
|
|
Accessor (error if this is not a string cell).
|
|
Accessor (error if this is not a symbol cell).
|
|
Check if this is a cons cell.
|
|
Check if this is a double cell.
|
|
Check if this is an int cell.
|
|
Check if this is a string cell.
|
|
Check if this is a symbol cell.
|
|
Print the subtree rooted at this cell, in s-expression notation.
|
|
|