Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

GraphList.h

Go to the documentation of this file.
00001 //LabPlot : GraphList.h
00002 
00003 #ifndef GRAPHLIST_H
00004 #define GRAPHLIST_H
00005 
00006 #include <qtextstream.h>
00007 #include "Graph2D.h"
00008 #include "Graph3D.h"
00009 #include "GraphM.h"
00010 #include "GraphGRASS.h"
00011 #include "GraphVTK.h"
00012 #include "Graph4D.h"
00013 #include "GraphIMAGE.h"
00014 #include "defs.h"
00015 
00016 #define MAX_NR 200      // maximum number of graphs of one type
00017 
00018 class GraphList {
00019 public:
00020         GraphList();
00021         void clear();
00022         int addGraph2D(Graph2D *g);
00023         int addGraph3D(Graph3D *g);
00024         int addGraphM(GraphM *g);
00025         int addGraphGRASS(GraphGRASS *g);
00026         int addGraphVTK(GraphVTK *g);
00027         int addGraph4D(Graph4D *g);
00028         int addGraphIMAGE(GraphIMAGE *g);
00029         int delGraph(unsigned int index);
00030         GRAPHType getStruct(int index); 
00031         int getIndex(int index);        
00032         Graph *getGraph(unsigned int index);
00033         Graph2D *getGraph2D(int index);
00034         Graph3D *getGraph3D(int index);
00035         GraphM *getGraphM(int index);
00036         GraphGRASS *getGraphGRASS(int index);
00037         GraphVTK *getGraphVTK(int index);
00038         Graph4D *getGraph4D(int index);
00039         GraphIMAGE *getGraphIMAGE(int index);
00040         unsigned int getNumber() { return nr2D+nr3D+nrM+nrGRASS+nrVTK+nr4D+nrIMAGE; }
00041         unsigned int isNotFull() { return 7*MAX_NR-nr2D-nr3D-nrM-nrGRASS-nrVTK-nr4D-nrIMAGE; }
00042 private:
00043         unsigned int nr2D, nr3D, nrM, nrGRASS, nrVTK, nr4D, nrIMAGE;            // number of graphs
00044         Graph2D list2D[MAX_NR];
00045         Graph3D list3D[MAX_NR];
00046         GraphM listM[MAX_NR];
00047         GraphGRASS listGRASS[MAX_NR];
00048         GraphVTK listVTK[MAX_NR];
00049         Graph4D list4D[MAX_NR];
00050         GraphIMAGE listIMAGE[MAX_NR];
00051         int id[7*MAX_NR];       // ID īs   (0,1,-1,-1,-1,-1,...,2,4,-1,-1,...,3,-1,-1,-1,...)
00052 };
00053 
00054 #endif //GRAPHLIST_H

Generated on Sun Nov 28 22:31:17 2004 for LabPlot by doxygen 1.3.6