Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (3 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpEventHandler.cpp

    r1825 r2385  
    1616// Default Constructor
    1717//-------------------------------------------------------------------
    18 ClpEventHandler::ClpEventHandler (ClpSimplex * model) :
    19     model_(model)
     18ClpEventHandler::ClpEventHandler(ClpSimplex *model)
     19  : model_(model)
    2020{
    21 
    2221}
    2322
     
    2524// Copy constructor
    2625//-------------------------------------------------------------------
    27 ClpEventHandler::ClpEventHandler (const ClpEventHandler & rhs)
    28      : model_(rhs.model_)
     26ClpEventHandler::ClpEventHandler(const ClpEventHandler &rhs)
     27  : model_(rhs.model_)
    2928{
    3029}
     
    3332// Destructor
    3433//-------------------------------------------------------------------
    35 ClpEventHandler::~ClpEventHandler ()
     34ClpEventHandler::~ClpEventHandler()
    3635{
    3736}
     
    4140//-------------------------------------------------------------------
    4241ClpEventHandler &
    43 ClpEventHandler::operator=(const ClpEventHandler& rhs)
     42ClpEventHandler::operator=(const ClpEventHandler &rhs)
    4443{
    45      if (this != &rhs) {
    46           model_ = rhs.model_;
    47      }
    48      return *this;
     44  if (this != &rhs) {
     45    model_ = rhs.model_;
     46  }
     47  return *this;
    4948}
    5049// Clone
     
    5251ClpEventHandler::clone() const
    5352{
    54      return new ClpEventHandler(*this);
     53  return new ClpEventHandler(*this);
    5554}
    5655// Event
    57 int
    58 ClpEventHandler::event(Event whichEvent)
     56int ClpEventHandler::event(Event whichEvent)
    5957{
    60      if (whichEvent != theta)
    61           return -1; // do nothing
    62      else
    63           return 0; // say normal exit
     58  if (whichEvent != theta)
     59    return -1; // do nothing
     60  else
     61    return 0; // say normal exit
    6462}
    6563/* This can do whatever it likes.  Return code -1 means no action.
    6664   This passes in something
    6765*/
    68 int
    69 ClpEventHandler::eventWithInfo(Event whichEvent, void * info)
    70 {
     66int ClpEventHandler::eventWithInfo(Event whichEvent, void *info)
     67{
    7168  return -1;
    7269}
    7370/* set model. */
    74 void
    75 ClpEventHandler::setSimplex(ClpSimplex * model)
     71void ClpEventHandler::setSimplex(ClpSimplex *model)
    7672{
    77      model_ = model;
     73  model_ = model;
    7874}
    7975//#############################################################################
     
    8480// Default Constructor
    8581//-------------------------------------------------------------------
    86 ClpDisasterHandler::ClpDisasterHandler (ClpSimplex * model) :
    87     model_(model)
     82ClpDisasterHandler::ClpDisasterHandler(ClpSimplex *model)
     83  : model_(model)
    8884{
    89 
    9085}
    9186
     
    9388// Copy constructor
    9489//-------------------------------------------------------------------
    95 ClpDisasterHandler::ClpDisasterHandler (const ClpDisasterHandler & rhs)
    96      : model_(rhs.model_)
     90ClpDisasterHandler::ClpDisasterHandler(const ClpDisasterHandler &rhs)
     91  : model_(rhs.model_)
    9792{
    9893}
     
    10196// Destructor
    10297//-------------------------------------------------------------------
    103 ClpDisasterHandler::~ClpDisasterHandler ()
     98ClpDisasterHandler::~ClpDisasterHandler()
    10499{
    105100}
     
    109104//-------------------------------------------------------------------
    110105ClpDisasterHandler &
    111 ClpDisasterHandler::operator=(const ClpDisasterHandler& rhs)
     106ClpDisasterHandler::operator=(const ClpDisasterHandler &rhs)
    112107{
    113      if (this != &rhs) {
    114           model_ = rhs.model_;
    115      }
    116      return *this;
     108  if (this != &rhs) {
     109    model_ = rhs.model_;
     110  }
     111  return *this;
    117112}
    118113/* set model. */
    119 void
    120 ClpDisasterHandler::setSimplex(ClpSimplex * model)
     114void ClpDisasterHandler::setSimplex(ClpSimplex *model)
    121115{
    122      model_ = model;
     116  model_ = model;
    123117}
    124118// Type of disaster 0 can fix, 1 abort
    125 int
    126 ClpDisasterHandler::typeOfDisaster()
     119int ClpDisasterHandler::typeOfDisaster()
    127120{
    128      return 0;
     121  return 0;
    129122}
    130123
    131 
     124/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     125*/
Note: See TracChangeset for help on using the changeset viewer.