source: stable/1.6/Clp/src/MyMessageHandler.hpp @ 1609

Last change on this file since 1609 was 755, checked in by andreasw, 14 years ago

finished Clp (create now bin/clp_solver)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1// Copyright (C) 2003, International Business Machines
2// Corporation and others.  All Rights Reserved.
3#ifndef MyMessageHandler_H
4#define MyMessageHandler_H
5
6#include <deque>
7
8#include "CoinPragma.hpp"
9#include <stdio.h>
10#include "CoinMessageHandler.hpp"
11
12/** This just adds a model to CoinMessage and a void pointer so
13    user can trap messages and do useful stuff. 
14    This is used in Clp/Test/unitTest.cpp
15
16    The file pointer is just there as an example of user stuff.
17    In practice you might have
18
19*/
20class ClpSimplex;
21
22
23typedef std::vector<double> StdVectorDouble;
24
25class MyMessageHandler : public CoinMessageHandler {
26 
27public:
28  /**@name Overrides */
29  //@{
30  virtual int print();
31  //@}
32  /**@name set and get */
33  //@{
34  /// Model
35  const ClpSimplex * model() const;
36  void setModel(ClpSimplex * model);
37  /// Get queue of feasible extreme points
38  const std::deque<StdVectorDouble> & getFeasibleExtremePoints() const;
39  /// Empty queue of feasible extreme points
40  void clearFeasibleExtremePoints();
41  //@}
42
43  /**@name Constructors, destructor */
44  //@{
45  /** Default constructor. */
46  MyMessageHandler();
47  /// Constructor with pointer to model
48  MyMessageHandler(ClpSimplex * model,
49                           FILE * userPointer=NULL);
50  /** Destructor */
51  virtual ~MyMessageHandler();
52  //@}
53
54  /**@name Copy method */
55  //@{
56  /** The copy constructor. */
57  MyMessageHandler(const MyMessageHandler&);
58  /** The copy constructor from an CoinSimplexMessageHandler. */
59  MyMessageHandler(const CoinMessageHandler&);
60 
61  MyMessageHandler& operator=(const MyMessageHandler&);
62  /// Clone
63  virtual CoinMessageHandler * clone() const ;
64  //@}
65   
66   
67protected:
68  /**@name Data members
69     The data members are protected to allow access for derived classes. */
70  //@{
71  /// Pointer back to model
72  ClpSimplex * model_;
73  /// Saved extreme points
74  std::deque<StdVectorDouble> feasibleExtremePoints_;
75  /// Iteration number so won't do same one twice
76  int iterationNumber_;
77  //@}
78};
79
80#endif
Note: See TracBrowser for help on using the repository browser.