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

Last change on this file since 1525 was 1525, checked in by mjs, 10 years ago

Formatted .cpp, .hpp, .c, .h files with "astyle -A4 -p". This matches the formatting used in the grand CBC reorganization.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1/* $Id: ClpEventHandler.cpp 1525 2010-02-26 17:27:59Z mjs $ */
2// Copyright (C) 2004, International Business Machines
3// Corporation and others.  All Rights Reserved.
4
5#include "CoinPragma.hpp"
6
7#include "ClpEventHandler.hpp"
8#include "ClpSimplex.hpp"
9
10//#############################################################################
11// Constructors / Destructor / Assignment
12//#############################################################################
13
14//-------------------------------------------------------------------
15// Default Constructor
16//-------------------------------------------------------------------
17ClpEventHandler::ClpEventHandler (ClpSimplex * model) :
18     model_(model)
19{
20
21}
22
23//-------------------------------------------------------------------
24// Copy constructor
25//-------------------------------------------------------------------
26ClpEventHandler::ClpEventHandler (const ClpEventHandler & rhs)
27     : model_(rhs.model_)
28{
29}
30
31//-------------------------------------------------------------------
32// Destructor
33//-------------------------------------------------------------------
34ClpEventHandler::~ClpEventHandler ()
35{
36}
37
38//----------------------------------------------------------------
39// Assignment operator
40//-------------------------------------------------------------------
41ClpEventHandler &
42ClpEventHandler::operator=(const ClpEventHandler& rhs)
43{
44     if (this != &rhs) {
45          model_ = rhs.model_;
46     }
47     return *this;
48}
49// Clone
50ClpEventHandler *
51ClpEventHandler::clone() const
52{
53     return new ClpEventHandler(*this);
54}
55// Event
56int
57ClpEventHandler::event(Event whichEvent)
58{
59     if (whichEvent != theta)
60          return -1; // do nothing
61     else
62          return 0; // say normal exit
63}
64/* set model. */
65void
66ClpEventHandler::setSimplex(ClpSimplex * model)
67{
68     model_ = model;
69}
70//#############################################################################
71// Constructors / Destructor / Assignment
72//#############################################################################
73
74//-------------------------------------------------------------------
75// Default Constructor
76//-------------------------------------------------------------------
77ClpDisasterHandler::ClpDisasterHandler (ClpSimplex * model) :
78     model_(model)
79{
80
81}
82
83//-------------------------------------------------------------------
84// Copy constructor
85//-------------------------------------------------------------------
86ClpDisasterHandler::ClpDisasterHandler (const ClpDisasterHandler & rhs)
87     : model_(rhs.model_)
88{
89}
90
91//-------------------------------------------------------------------
92// Destructor
93//-------------------------------------------------------------------
94ClpDisasterHandler::~ClpDisasterHandler ()
95{
96}
97
98//----------------------------------------------------------------
99// Assignment operator
100//-------------------------------------------------------------------
101ClpDisasterHandler &
102ClpDisasterHandler::operator=(const ClpDisasterHandler& rhs)
103{
104     if (this != &rhs) {
105          model_ = rhs.model_;
106     }
107     return *this;
108}
109/* set model. */
110void
111ClpDisasterHandler::setSimplex(ClpSimplex * model)
112{
113     model_ = model;
114}
115// Type of disaster 0 can fix, 1 abort
116int
117ClpDisasterHandler::typeOfDisaster()
118{
119     return 0;
120}
121
122
Note: See TracBrowser for help on using the repository browser.