Ignore:
Timestamp:
Feb 26, 2010 12:27:59 PM (10 years ago)
Author:
mjs
Message:

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

File:
1 edited

Legend:

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

    r1502 r1525  
    2626
    2727public:
    28     /** enums for what sort of event.
     28     /** enums for what sort of event.
    2929
    30         These will also be returned in ClpModel::secondaryStatus() as int
    31     */
    32     enum Event {
    33         endOfIteration = 100, // used to set secondary status
    34         endOfFactorization,
    35         endOfValuesPass,
    36         node, // for Cbc
    37         treeStatus, // for Cbc
    38         solution, // for Cbc
    39         theta // hit in parametrics
    40     };
    41     /**@name Virtual method that the derived classe should provide.
    42      The base class instance does nothing and as event() is only useful method
    43      it would not be very useful NOT providing one!
    44     */
    45     //@{
    46     /** This can do whatever it likes.  If return code -1 then carries on
    47         if 0 sets ClpModel::status() to 5 (stopped by event) and will return to user.
    48         At present if <-1 carries on and if >0 acts as if 0 - this may change
    49     */
    50     virtual int event(Event whichEvent);
    51     //@}
     30         These will also be returned in ClpModel::secondaryStatus() as int
     31     */
     32     enum Event {
     33          endOfIteration = 100, // used to set secondary status
     34          endOfFactorization,
     35          endOfValuesPass,
     36          node, // for Cbc
     37          treeStatus, // for Cbc
     38          solution, // for Cbc
     39          theta // hit in parametrics
     40     };
     41     /**@name Virtual method that the derived classe should provide.
     42      The base class instance does nothing and as event() is only useful method
     43      it would not be very useful NOT providing one!
     44     */
     45     //@{
     46     /** This can do whatever it likes.  If return code -1 then carries on
     47         if 0 sets ClpModel::status() to 5 (stopped by event) and will return to user.
     48         At present if <-1 carries on and if >0 acts as if 0 - this may change
     49     */
     50     virtual int event(Event whichEvent);
     51     //@}
    5252
    5353
    54     /**@name Constructors, destructor */
     54     /**@name Constructors, destructor */
    5555
    56     //@{
    57     /** Default constructor. */
    58     ClpEventHandler(ClpSimplex * model = NULL);
    59     /** Destructor */
    60     virtual ~ClpEventHandler();
    61     // Copy
    62     ClpEventHandler(const ClpEventHandler&);
    63     // Assignment
    64     ClpEventHandler& operator=(const ClpEventHandler&);
    65     /// Clone
    66     virtual ClpEventHandler * clone() const;
     56     //@{
     57     /** Default constructor. */
     58     ClpEventHandler(ClpSimplex * model = NULL);
     59     /** Destructor */
     60     virtual ~ClpEventHandler();
     61     // Copy
     62     ClpEventHandler(const ClpEventHandler&);
     63     // Assignment
     64     ClpEventHandler& operator=(const ClpEventHandler&);
     65     /// Clone
     66     virtual ClpEventHandler * clone() const;
    6767
    68     //@}
     68     //@}
    6969
    70     /**@name Sets/gets */
     70     /**@name Sets/gets */
    7171
    72     //@{
    73     /** set model. */
    74     void setSimplex(ClpSimplex * model);
    75     /// Get model
    76     inline ClpSimplex * simplex() const {
    77         return model_;
    78     }
    79     //@}
     72     //@{
     73     /** set model. */
     74     void setSimplex(ClpSimplex * model);
     75     /// Get model
     76     inline ClpSimplex * simplex() const {
     77          return model_;
     78     }
     79     //@}
    8080
    8181
    8282protected:
    83     /**@name Data members
    84        The data members are protected to allow access for derived classes. */
    85     //@{
    86     /// Pointer to simplex
    87     ClpSimplex * model_;
    88     //@}
     83     /**@name Data members
     84        The data members are protected to allow access for derived classes. */
     85     //@{
     86     /// Pointer to simplex
     87     ClpSimplex * model_;
     88     //@}
    8989};
    9090/** Base class for Clp disaster handling
     
    9898
    9999public:
    100     /**@name Virtual methods that the derived classe should provide.
    101     */
    102     //@{
    103     /// Into simplex
    104     virtual void intoSimplex() = 0;
    105     /// Checks if disaster
    106     virtual bool check() const = 0;
    107     /// saves information for next attempt
    108     virtual void saveInfo() = 0;
    109     /// Type of disaster 0 can fix, 1 abort
    110     virtual int typeOfDisaster();
    111     //@}
     100     /**@name Virtual methods that the derived classe should provide.
     101     */
     102     //@{
     103     /// Into simplex
     104     virtual void intoSimplex() = 0;
     105     /// Checks if disaster
     106     virtual bool check() const = 0;
     107     /// saves information for next attempt
     108     virtual void saveInfo() = 0;
     109     /// Type of disaster 0 can fix, 1 abort
     110     virtual int typeOfDisaster();
     111     //@}
    112112
    113113
    114     /**@name Constructors, destructor */
     114     /**@name Constructors, destructor */
    115115
    116     //@{
    117     /** Default constructor. */
    118     ClpDisasterHandler(ClpSimplex * model = NULL);
    119     /** Destructor */
    120     virtual ~ClpDisasterHandler();
    121     // Copy
    122     ClpDisasterHandler(const ClpDisasterHandler&);
    123     // Assignment
    124     ClpDisasterHandler& operator=(const ClpDisasterHandler&);
    125     /// Clone
    126     virtual ClpDisasterHandler * clone() const = 0;
     116     //@{
     117     /** Default constructor. */
     118     ClpDisasterHandler(ClpSimplex * model = NULL);
     119     /** Destructor */
     120     virtual ~ClpDisasterHandler();
     121     // Copy
     122     ClpDisasterHandler(const ClpDisasterHandler&);
     123     // Assignment
     124     ClpDisasterHandler& operator=(const ClpDisasterHandler&);
     125     /// Clone
     126     virtual ClpDisasterHandler * clone() const = 0;
    127127
    128     //@}
     128     //@}
    129129
    130     /**@name Sets/gets */
     130     /**@name Sets/gets */
    131131
    132     //@{
    133     /** set model. */
    134     void setSimplex(ClpSimplex * model);
    135     /// Get model
    136     inline ClpSimplex * simplex() const {
    137         return model_;
    138     }
    139     //@}
     132     //@{
     133     /** set model. */
     134     void setSimplex(ClpSimplex * model);
     135     /// Get model
     136     inline ClpSimplex * simplex() const {
     137          return model_;
     138     }
     139     //@}
    140140
    141141
    142142protected:
    143     /**@name Data members
    144        The data members are protected to allow access for derived classes. */
    145     //@{
    146     /// Pointer to simplex
    147     ClpSimplex * model_;
    148     //@}
     143     /**@name Data members
     144        The data members are protected to allow access for derived classes. */
     145     //@{
     146     /// Pointer to simplex
     147     ClpSimplex * model_;
     148     //@}
    149149};
    150150#endif
Note: See TracChangeset for help on using the changeset viewer.