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" 00024 class ClpEventHandler { 00025 00026 public: 00031 enum Event { 00032 endOfIteration = 100, // used to set secondary status 00033 endOfFactorization, 00034 endOfValuesPass, 00035 node, // for Cbc 00036 treeStatus, // for Cbc 00037 solution, // for Cbc 00038 theta // hit in parametrics 00039 }; 00049 virtual int event(Event whichEvent); 00051 00052 00057 ClpEventHandler(ClpSimplex * model = NULL); 00059 virtual ~ClpEventHandler(); 00060 // Copy 00061 ClpEventHandler(const ClpEventHandler&); 00062 // Assignment 00063 ClpEventHandler& operator=(const ClpEventHandler&); 00065 virtual ClpEventHandler * clone() const; 00066 00068 00073 void setSimplex(ClpSimplex * model); 00075 inline ClpSimplex * simplex() const 00076 { return model_;}; 00078 00079 00080 protected: 00084 00085 ClpSimplex * model_; 00087 }; 00088 #endif