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

RelationalExpr.h

Go to the documentation of this file.
00001 #ifndef RELATIONALEXPR_H
00002 #define RELATIONALEXPR_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "LogicalExprBase.h"
00007 #include "Expr.h"
00008 
00009 namespace Sundance
00010 {
00011 
00012   using namespace TSF;
00013   using std::string;
00014 
00015   using std::ostream;
00016 
00017   /** \ingroup LowLevelSymbolics
00018    * \enum RelationalOperator
00019    */
00020   enum RelationalOperator {RelEQ, RelNEQ, RelLT, RelGT, RelLE, RelGE};
00021 
00022 
00023   /**
00024    * \ingroup LowLevelSymbolics
00025    */
00026   class RelationalExpr : public LogicalExprBase
00027     {
00028     public:
00029       /** construct with operands and an operator type */
00030       RelationalExpr(const Expr& left, const Expr& right,
00031                      const RelationalOperator& op)
00032         : LogicalExprBase(), left_(left), right_(right), op_(op) {;}
00033 
00034       /** */
00035       virtual ~RelationalExpr(){;}
00036 
00037       /** */
00038       virtual bool evaluate(const Cell& cell) const ;
00039 
00040       /** write to XML form */
00041       virtual XMLObject toXML() const ;
00042 
00043       /** test equality between expressions */
00044       virtual bool equals(const LogicalExpr& other) const ;
00045 
00046       /** test ordering between expressions */
00047       virtual bool lessThan(const LogicalExpr& other) const ;
00048 
00049     private:
00050       Expr left_;
00051       Expr right_;
00052       RelationalOperator op_;
00053 
00054     };
00055 
00056 
00057 
00058 }
00059 #endif
00060 
00061 
00062 
00063 
00064 

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


Documentation generated by