source: trunk/Clp/src/ClpEventHandler.cpp @ 754

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

first version

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1// Copyright (C) 2004, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#include "CoinPragma.hpp"
5
6#include "ClpEventHandler.hpp"
7#include "ClpSimplex.hpp"
8
9//#############################################################################
10// Constructors / Destructor / Assignment
11//#############################################################################
12
13//-------------------------------------------------------------------
14// Default Constructor
15//-------------------------------------------------------------------
16ClpEventHandler::ClpEventHandler (ClpSimplex * model) :
17  model_(model)
18{
19
20}
21
22//-------------------------------------------------------------------
23// Copy constructor
24//-------------------------------------------------------------------
25ClpEventHandler::ClpEventHandler (const ClpEventHandler & rhs) 
26  : model_(rhs.model_)
27{ 
28}
29
30//-------------------------------------------------------------------
31// Destructor
32//-------------------------------------------------------------------
33ClpEventHandler::~ClpEventHandler ()
34{
35}
36
37//----------------------------------------------------------------
38// Assignment operator
39//-------------------------------------------------------------------
40ClpEventHandler &
41ClpEventHandler::operator=(const ClpEventHandler& rhs)
42{
43  if (this != &rhs) {
44    model_ = rhs.model_;
45  }
46  return *this;
47}
48// Clone
49ClpEventHandler * 
50ClpEventHandler::clone() const
51{
52  return new ClpEventHandler(*this);
53}
54// Event
55int
56ClpEventHandler::event(Event whichEvent)
57{
58  if (whichEvent!=theta)
59    return -1; // do nothing
60  else
61    return 0; // say normal exit
62}
63/* set model. */
64void 
65ClpEventHandler::setSimplex(ClpSimplex * model)
66{
67  model_= model;
68}
69
70
Note: See TracBrowser for help on using the repository browser.