Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

expander.h

00001 00002 // Math Type Library 00003 // $Id: expander.h,v 1.4 2002/04/20 06:30:17 cparpart Exp $ 00004 // (This file contains the expander specific interface) 00005 // 00006 // Copyright (c) 2002 by Christian Parpart <cparpart@surakware.net> 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // Library General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU Library General Public License 00019 // along with this library; see the file COPYING.LIB. If not, write to 00020 // the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 // Boston, MA 02111-1307, USA. 00023 #ifndef libmath_expander_h 00024 #define libmath_expander_h 00025 00026 #include <math++/nodevisitor.h> 00027 00028 namespace math { 00029 00035 template<class T> 00036 class TExpander : public TNodeVisitor<T> { 00037 public: 00041 static TNode<T> *expand(TNode<T> *AExpression); 00042 00043 private: 00044 virtual void visit(TNumberNode<T> *); 00045 virtual void visit(TSymbolNode<T> *); 00046 virtual void visit(TParamNode<T> *); 00047 00048 virtual void visit(TPlusNode<T> *); 00049 virtual void visit(TNegNode<T> *); 00050 00051 virtual void visit(TMulNode<T> *); 00052 virtual void visit(TDivNode<T> *); 00053 00054 virtual void visit(TPowNode<T> *); 00055 virtual void visit(TSqrtNode<T> *); 00056 00057 virtual void visit(TFuncNode<T> *); 00058 virtual void visit(TIfNode<T> *); 00059 00060 virtual void visit(TSinNode<T> *); 00061 virtual void visit(TCosNode<T> *); 00062 virtual void visit(TTanNode<T> *); 00063 virtual void visit(TLnNode<T> *); 00064 00065 virtual void visit(TEquNode<T> *); 00066 virtual void visit(TUnEquNode<T> *); 00067 virtual void visit(TGreaterNode<T> *); 00068 virtual void visit(TLessNode<T> *); 00069 virtual void visit(TGreaterEquNode<T> *); 00070 virtual void visit(TLessEquNode<T> *); 00071 }; 00072 00073 } // namespace math 00074 00075 #include <math++/expander.tcc> 00076 00077 #endif

Generated on Sun Aug 22 06:47:45 2004 for MathTypeLibrary(libmath++) by doxygen 1.3.7