# CouenneExprStore.hpp

Go to the documentation of this file.

    00001 /* $Id: CouenneExprStore.hpp 645 2011-06-14 10:04:49Z 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 Eclipse Public License (EPL)
    00009  */
    00010
    00011 #ifndef COUENNE_EXPRSTORE_HPP
    00012 #define COUENNE_EXPRSTORE_HPP
    00013
    00014 #include <iostream>
    00015
    00016 #include "CouenneTypes.hpp"
    00017 #include "CouenneExprCopy.hpp"
    00018
    00019 namespace Couenne {
    00020
    00022
    00023 class exprStore: public exprCopy {
    00024
    00025  protected:
    00026
    00028   CouNumber value_;
    00029
    00030  public:
    00031
    00033   exprStore (expression *copy):
    00034     exprCopy (copy) {}
    00035
    00037   exprStore (const exprStore &e, Domain *d = NULL):
    00038     exprCopy (e, d) {
    00039     //copy_  = e.Original () -> clone ();
    00040   }
    00041
    00043   virtual ~exprStore ()
    00044   {copy_ = NULL;}
    00045
    00047   virtual void print (std::ostream &out = std::cout,
    00048                       bool descend      = false) const;
    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 };
    00060
    00061 }
    00062
    00063 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines