exprStore.hpp

Go to the documentation of this file.
00001 /* $Id: exprStore.hpp 217 2009-07-08 17:02:07Z pbelotti $
00002  *
00003  * Name:    exprStore.hpp
00004  * Author:  Pietro Belotti
00005  * Purpose: definition of a storage class for expressions
00006  *
00007  * (C) Carnegie-Mellon University, 2007.
00008  * This file is licensed under the Common Public License (CPL)
00009  */
00010 
00011 #ifndef COUENNE_EXPRSTORE_HPP
00012 #define COUENNE_EXPRSTORE_HPP
00013 
00014 #include <iostream>
00015 
00016 #include "CouenneTypes.hpp"
00017 #include "exprCopy.hpp"
00018 
00019 
00021 
00022 class exprStore: public exprCopy {
00023 
00024  protected:
00025 
00027   CouNumber value_;
00028 
00029  public:
00030 
00032   exprStore (expression *copy):
00033     exprCopy (copy) {}
00034 
00036   exprStore (const exprStore &e, Domain *d = NULL):
00037     exprCopy (e, d) {
00038     //copy_  = e.Original () -> clone ();
00039   }
00040 
00042   virtual ~exprStore () 
00043   {copy_ = NULL;}
00044 
00046   //virtual void print (std::ostream &out = std::cout, 
00047   //bool descend      = false) const
00048   //{out << "<"; copy_ -> print (out, descend); out << ">"; }
00049 
00051   virtual inline expression *clone (Domain *d = NULL) const
00052   {return new exprStore (*this, d);}
00053 
00057   virtual inline CouNumber operator () () 
00058   {return (copy_ -> Value ());}
00059 
00061   //virtual void realign (const CouenneProblem *p);
00062 };
00063 
00064 #endif

Generated on Wed Jan 20 03:03:55 2010 for Couenne by  doxygen 1.4.7