Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

FuncExprBase.h

Go to the documentation of this file.
00001 #ifndef FUNCEXPRBASE_H
00002 #define FUNCEXPRBASE_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "Expr.h"
00007 #include "MultiIndex.h"
00008 
00009 
00010 namespace Sundance
00011 {
00012 
00013   using namespace TSF;
00014   using std::string;
00015 
00016   using std::ostream;
00017 
00018   /** \ingroup LowLevelSymbolics
00019    * Base class for expression objects that are functions
00020    */
00021 
00022   class FuncExprBase : public ExprBase
00023     {
00024     public:
00025       /** \name Developer-only methods */
00026       //@{
00027       /** no detailed doc available */
00028       FuncExprBase(const string& name);
00029       /** */
00030       virtual ~FuncExprBase(){;}
00031 
00032       // ordering
00033       /** */
00034       virtual bool operator==(const Expr& other) const = 0 ;
00035       /** */
00036       virtual bool operator<(const Expr& other) const = 0 ;
00037       /** */
00038       virtual int sortPriority() const {return FUNCEXPRBASE;}
00039 
00040       // misc
00041       /** */
00042       virtual ExprBase* clone() const = 0 ;
00043       /** */
00044       virtual void print(ostream& os, bool paren=false) const = 0 ;
00045 
00046 
00047       /** */
00048       virtual const string& name() const {return name_;}
00049 
00050       // function ID number
00051       /** */
00052       virtual int funcID() const {return funcID_;}
00053       //@}
00054     protected:
00055       static int topID_;
00056       string name_;
00057       int funcID_;
00058     };
00059 
00060 }
00061 #endif

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by