source: trunk/Cbc/src/CbcGenOsiParam.cpp @ 2464

Last change on this file since 2464 was 2464, checked in by unxusr, 6 months ago

.clang-format with proposal for formatting code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/*
2  Copyright (C) 2007, Lou Hafer, International Business Machines Corporation
3  and others.  All Rights Reserved.
4
5  This code is licensed under the terms of the Eclipse Public License (EPL).
6
7  $Id: CbcGenOsiParam.cpp 2464 2019-01-03 19:03:23Z unxusr $
8*/
9/*
10  This file is part of cbc-generic.
11*/
12
13#if defined(_MSC_VER)
14// Turn off compiler warning about long names
15#pragma warning(disable : 4786)
16#endif
17
18#include <string>
19#include <cassert>
20
21#include "CoinParam.hpp"
22
23#include "CbcModel.hpp"
24#include "CbcGenCtlBlk.hpp"
25
26#include "CbcGenParam.hpp"
27#include "CbcGenCbcParam.hpp"
28#include "CbcGenOsiParam.hpp"
29
30namespace {
31
32char svnid[] = "$Id: CbcGenOsiParam.cpp 2464 2019-01-03 19:03:23Z unxusr $";
33
34}
35
36/*
37  Constructors and destructors
38
39  There's a generic constructor and one for integer, double, keyword, string,
40  and action parameters.
41*/
42
43/*
44  Default constructor.
45*/
46CbcOsiParam::CbcOsiParam()
47  : CoinParam()
48  , paramCode_(CbcOsiParamCode(0))
49  , obj_(0)
50{
51  /* Nothing to be done here */
52}
53
54/*
55  Constructor for double parameter
56*/
57CbcOsiParam::CbcOsiParam(CbcOsiParamCode code,
58  std::string name, std::string help,
59  double lower, double upper, double dflt,
60  bool display)
61  : CoinParam(name, help, lower, upper, dflt, display)
62  , paramCode_(code)
63  , obj_(0)
64{
65  /* Nothing to be done here */
66}
67
68/*
69  Constructor for integer parameter
70*/
71CbcOsiParam::CbcOsiParam(CbcOsiParamCode code,
72  std::string name, std::string help,
73  int lower, int upper, int dflt,
74  bool display)
75  : CoinParam(name, help, lower, upper, dflt, display)
76  , paramCode_(code)
77  , obj_(0)
78{
79  /* Nothing to be done here */
80}
81
82/*
83  Constructor for keyword parameter.
84*/
85CbcOsiParam::CbcOsiParam(CbcOsiParamCode code,
86  std::string name, std::string help,
87  std::string firstValue, int dflt,
88  bool display)
89  : CoinParam(name, help, firstValue, dflt, display)
90  , paramCode_(code)
91  , obj_(0)
92{
93  /* Nothing to be done here */
94}
95
96/*
97  Constructor for string parameter.
98*/
99CbcOsiParam::CbcOsiParam(CbcOsiParamCode code,
100  std::string name, std::string help,
101  std::string dflt,
102  bool display)
103  : CoinParam(name, help, dflt, display)
104  , paramCode_(code)
105  , obj_(0)
106{
107  /* Nothing to be done here */
108}
109
110/*
111  Constructor for action parameter.
112*/
113CbcOsiParam::CbcOsiParam(CbcOsiParamCode code,
114  std::string name, std::string help,
115  bool display)
116  : CoinParam(name, help, display)
117  , paramCode_(code)
118  , obj_(0)
119{
120  /* Nothing to be done here */
121}
122
123/*
124  Copy constructor.
125*/
126CbcOsiParam::CbcOsiParam(const CbcOsiParam &orig)
127  : CoinParam(orig)
128  , paramCode_(orig.paramCode_)
129  , obj_(orig.obj_)
130{
131  /* Nothing to be done here */
132}
133
134/*
135  Clone
136*/
137
138CbcOsiParam *CbcOsiParam::clone()
139{
140  return (new CbcOsiParam(*this));
141}
142
143CbcOsiParam &CbcOsiParam::operator=(const CbcOsiParam &rhs)
144{
145  if (this != &rhs) {
146    CoinParam::operator=(rhs);
147
148    paramCode_ = rhs.paramCode_;
149    obj_ = rhs.obj_;
150  }
151
152  return *this;
153}
154
155/*
156  Destructor
157*/
158CbcOsiParam::~CbcOsiParam()
159{ /* Nothing more to do */
160}
Note: See TracBrowser for help on using the repository browser.