# HG changeset patch # User jwe # Date 770861743 0 # Node ID 94cc7b5fc7894724b6b74b187778967425b2592a # Parent 393e95f46b5123b95d683a1c75713d321602fc73 [project @ 1994-06-06 00:15:43 by jwe] Initial revision diff -r 393e95f46b51 -r 94cc7b5fc789 src/pt-plot.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pt-plot.h Mon Jun 06 00:15:43 1994 +0000 @@ -0,0 +1,185 @@ +// tree-plot.h -*- C++ -*- +/* + +Copyright (C) 1992, 1993, 1994 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#if !defined (octave_tree_plot_h) +#define octave_tree_plot_h 1 + +#if defined (__GNUG__) +#pragma interface +#endif + +class tree_plot_limits; +class tree_plot_range; +class tree_subplot; +class tree_subplot_using; +class tree_subplot_style; +class tree_subplot_list; +class tree_plot_command; + +class ostream; + +#include "tree-base.h" +#include "tree.h" + +class +tree_plot_command : public tree_command +{ + public: + tree_plot_command (void); + tree_plot_command (tree_subplot_list *plt, int nd); + tree_plot_command (tree_subplot_list *plt, tree_plot_limits *rng, int nd); + + ~tree_plot_command (void); + + tree_constant eval (int print); + + private: + int ndim; + tree_plot_limits *range; + tree_subplot_list *plot_list; +}; + +class +tree_subplot_list : public tree +{ + public: + tree_subplot_list (void); + tree_subplot_list (tree *data); + tree_subplot_list (tree_subplot_list *t); + tree_subplot_list (tree_subplot_using *u, tree *t, tree_subplot_style *s); + + ~tree_subplot_list (void); + + tree_subplot_list *set_data (tree *data); + + tree_subplot_list *chain (tree_subplot_list *t); + + tree_subplot_list *reverse (void); + + tree_subplot_list *next_elem (void); + + tree_constant eval (int print); +// tree_constant *eval (int print, int nargout); + + int print (int ndim, ostrstream& plot_buf); + + private: + tree *plot_data; + tree_subplot_using *using; + tree *title; + tree_subplot_style *style; + tree_subplot_list *next; +}; + +class +tree_plot_limits : public tree +{ + public: + tree_plot_limits (void); + tree_plot_limits (tree_plot_range *xlim); + tree_plot_limits (tree_plot_range *xlim, tree_plot_range *ylim); + tree_plot_limits (tree_plot_range *xlim, tree_plot_range *ylim, + tree_plot_range *zlim); + + ~tree_plot_limits (void); + + tree_constant eval (int print); + + void print (int print, ostrstream& plot_buf); + + private: + tree_plot_range *x_range; + tree_plot_range *y_range; + tree_plot_range *z_range; +}; + +class +tree_plot_range : public tree +{ + public: + tree_plot_range (void); + tree_plot_range (tree *l, tree *u); + + ~tree_plot_range (void); + + tree_constant eval (int print); + + void print (ostrstream& plot_buf); + + private: + tree *lower; + tree *upper; +}; + +class +tree_subplot_using : public tree +{ + public: + tree_subplot_using (void); + tree_subplot_using (tree *fmt); + + ~tree_subplot_using (void); + + tree_subplot_using *set_format (tree *fmt); + + tree_subplot_using *add_qualifier (tree *t); + + tree_constant eval (int print); + + int print (int ndim, int n_max, ostrstream& plot_buf); + + private: + int qualifier_count; + tree *x[4]; + tree *scanf_fmt; +}; + +class +tree_subplot_style : public tree +{ + public: + tree_subplot_style (void); + tree_subplot_style (char *s); + tree_subplot_style (char *s, tree *lt); + tree_subplot_style (char *s, tree *lt, tree *pt); + + ~tree_subplot_style (void); + + tree_constant eval (int print); + + int print (ostrstream& plot_buf); + + private: + char *style; + tree *linetype; + tree *pointtype; +}; + +#endif + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; page-delimiter: "^/\\*" *** +;;; End: *** +*/