view src/pt-plot.h @ 454:94cc7b5fc789

[project @ 1994-06-06 00:15:43 by jwe] Initial revision
author jwe
date Mon, 06 Jun 1994 00:15:43 +0000
parents
children 2d7f9d72170c
line wrap: on
line source

// 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: ***
*/