Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_tree_h)
00024 #define octave_tree_h 1
00025
00026 #include <string>
00027
00028 #include <iosfwd>
00029
00030 class octave_function;
00031 class tree_walker;
00032
00033
00034
00035 class
00036 tree
00037 {
00038 public:
00039
00040 tree (int l = -1, int c = -1)
00041 : line_num (l), column_num (c), bp (false) { }
00042
00043 virtual ~tree (void) { }
00044
00045 virtual int line (void) const { return line_num; }
00046
00047 virtual int column (void) const { return column_num; }
00048
00049 void line (int l) { line_num = l; }
00050
00051 void column (int c) { column_num = c; }
00052
00053 virtual void set_breakpoint (void) { bp = true; }
00054
00055 virtual void delete_breakpoint (void) { bp = false; }
00056
00057 bool is_breakpoint (void) const { return bp; }
00058
00059 std::string str_print_code (void);
00060
00061 virtual void accept (tree_walker& tw) = 0;
00062
00063 private:
00064
00065
00066
00067 int line_num;
00068 int column_num;
00069
00070
00071 bool bp;
00072
00073
00074
00075 tree (const tree&);
00076
00077 tree& operator = (const tree&);
00078 };
00079
00080 #endif