options_list.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
35 
37 
38 using namespace std;
39 
41 
42 
43 //
44 // PUBLIC MEMBER FUNCTIONS:
45 //
46 
47 
49 {
50  optionsHaveChanged = BT_FALSE;
51 }
52 
53 
55 {
56  optionsHaveChanged = rhs.optionsHaveChanged;
57  items = rhs.items;
58 }
59 
60 
62 {}
63 
64 
66 {
67  if ( this != &rhs )
68  {
69  optionsHaveChanged = rhs.optionsHaveChanged;
70  items = rhs.items;
71  }
72 
73  return *this;
74 }
75 
76 
78 {
79  cout << "\nThis class provides the following" << items.size() << "user options:\n";
80 
81  OptionItems::const_iterator it;
82  for (it = items.begin(); it != items.end(); ++it)
83  {
84  cout << " --> set( \" ";
85  switch (it->first.second)
86  {
87  case OIT_INT:
88  cout << "\", <int> ); current value: ";
89  break;
90 
91  case OIT_DOUBLE:
92  cout << "\", <double> ); current value: ";
93  break;
94 
95  case OIT_STRING:
96  cout << "\", <string> ); current value: ";
97  break;
98 
99  default:
100  return ACADOERROR(RET_UNKNOWN_BUG);
101 
102  }
103 
104  it->second->print( cout );
105  cout << endl;
106  }
107 
108  cout << endl;
109 
110  return SUCCESSFUL_RETURN;
111 }
112 
114 
115 /*
116  * end of file
117  */
Allows to pass back messages to the calling function.
OptionsList & operator=(const OptionsList &rhs)
#define CLOSE_NAMESPACE_ACADO
returnValue printOptionsList() const
BooleanType optionsHaveChanged
Provides a generic list of options (for internal use).
void rhs(const real_t *x, real_t *f)
#define BEGIN_NAMESPACE_ACADO
#define BT_FALSE
Definition: acado_types.hpp:49
OptionItems items
#define ACADOERROR(retval)


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:55