Home

Download

Features

Screenshots

Handbook

Browse Source

Authors

SourceForge.net Logo
Hosted by SourceForge.net

OSI Certified


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Search  

expression.h

00001 /***************************************************************************
00002                           expression.h  -  simple class to hold a few parameters for an expression
00003                              -------------------
00004     begin                : Wed Oct 9 2002
00005     copyright            : (C) 2002-2003 by Fungmeista
00006     email                : mizunoami44@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef EXPRESSION_H
00019 #define EXPRESSION_H
00020 
00021 //#include <qstring.h>
00022 #include <qcolor.h>
00023 #ifdef GLGRAPH
00024 #include <qgl.h>
00025 #endif //GLGRAPH
00026 
00027 #include <string>
00028 //#include <map>
00029 
00030 class FungParser;
00031 
00037 class Expression
00038 {
00039     public:
00040         Expression(){}
00041         Expression(const Expression &);
00042 
00043         Expression( const char * expression1, bool show = true, QColor color = QColor());
00044         Expression( const char * expression1, const char * expression2, bool show, QColor color);
00045         #ifdef GLGRAPH
00046         Expression( std::string & expression1, bool show, QColor color, GLuint callListNumber);
00047         #endif //GLGRAPH
00048 
00049         ~Expression();
00050 
00051         std::string getExpression(const char * functionName) const;
00052 
00053         void setParsedExpression( FungParser * fp, const char * functionName );
00054         FungParser * getParsedExpression( const char * functionName ) const;
00055 
00056         bool show;
00057         QColor color;
00058 
00059         #ifdef GLGRAPH
00060         GLuint name;
00061         #endif //GLGRAPH
00062         
00063     private:
00064         bool deleteable;
00065 
00066         std::string expression1;
00067         std::string expression2;
00068         
00069         FungParser *parsedExpression;
00070         FungParser *parsedExpression2;
00071         
00072 };
00073 
00074 #endif