00001 // Copyright (C) 2004, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef ClpEventHandler_H 00004 #define ClpEventHandler_H 00005 00006 #include "ClpSimplex.hpp" 00007 00023 class ClpEventHandler { 00024 00025 public: 00030 enum Event { 00031 endOfIteration = 100, // used to set secondary status 00032 endOfFactorization, 00033 endOfValuesPass 00034 }; 00044 virtual int event(Event whichEvent); 00046 00047 00052 ClpEventHandler(ClpSimplex * model = NULL); 00054 virtual ~ClpEventHandler(); 00055 // Copy 00056 ClpEventHandler(const ClpEventHandler&); 00057 // Assignment 00058 ClpEventHandler& operator=(const ClpEventHandler&); 00060 virtual ClpEventHandler * clone() const; 00061 00063 00068 void setSimplex(ClpSimplex * model); 00070 inline ClpSimplex * simplex() const 00071 { return model_;}; 00073 00074 00075 protected: 00079 00080 ClpSimplex * model_; 00082 }; 00083 #endif