00001
00537 #ifndef CELL_HPP
00538 #define CELL_HPP
00539
00540 #include <cstddef>
00541 #include <cstdlib>
00542 #include <iostream>
00543 #include <fstream>
00544 #include <sstream>
00545 #include <string>
00546 #include <stack>
00547
00548 using namespace std;
00549
00554 class Cell {
00555 public:
00556
00560 Cell(const int i);
00561
00565 Cell(const double d);
00566
00570 Cell(const char* const s);
00571
00580 Cell(bool is_symbol, const char* const s);
00581
00585 Cell(Cell* const my_car, Cell* const my_cdr);
00586
00591 bool is_int() const;
00592
00597 bool is_double() const;
00598
00603 bool is_string() const;
00604
00609 bool is_symbol() const;
00610
00615 bool is_cons() const;
00616
00621 int get_int() const;
00622
00627 double get_double() const;
00628
00633 string get_string() const;
00634
00639 string get_symbol() const;
00640
00645 Cell* get_car() const;
00646
00651 Cell* get_cdr() const;
00652
00657 void print(ostream& os = cout) const;
00658
00659 private:
00660
00661 string sexpr_m;
00662
00663 };
00664
00665 #endif // CELL_HPP