MicroModelicaCCompiler  4.5.3
mmo_settings.hpp
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  This file is part of QSS Solver.
4 
5  QSS Solver is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  QSS Solver is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QSS Solver. If not, see <http://www.gnu.org/licenses/>.
17 
18  ******************************************************************************/
19 
20 #ifndef MMO_SETTINGS_H_
21 #define MMO_SETTINGS_H_
22 
23 #include <string>
24 
25 #include <ast/ast_types.hpp>
26 #include "../util/ast_util.hpp"
27 #include "class.hpp"
28 
29 namespace MicroModelica {
30 namespace IR {
31 
35 class Settings : public AST_Visitor {
36  public:
41  Settings(string name);
45  ~Settings();
50  void visit(AST_Class x);
55  void leave(AST_Class x);
60  void visit(AST_Composition x);
65  void leave(AST_Composition x);
70  void visit(AST_CompositionElement x);
75  void leave(AST_CompositionElement x);
80  void visit(AST_CompositionEqsAlgs x);
85  void leave(AST_CompositionEqsAlgs x);
90  void visit(AST_External_Function_Call);
95  void visit(AST_Element x);
100  void visit(AST_Modification x);
105  void leave(AST_Modification x);
110  void visit(AST_Comment x);
115  void visit(AST_Equation x);
120  void visit(AST_ForIndex x);
125  void visit(AST_Equation_Else x);
130  void visit(AST_Expression x);
135  void visit(AST_Argument x);
140  void visit(AST_Statement x);
145  void leave(AST_Statement x);
150  void visit(AST_Statement_Else x);
155  void visit(AST_StoredDefinition x);
160  void leave(AST_StoredDefinition x);
166  int apply(AST_Node x);
167  ModelAnnotation annotations();
168 
169  private:
170  Model _model;
171  bool _insertAnnotation;
172  bool _processFunction;
173  bool _processModel;
174  bool _classModification;
175 };
176 } // namespace IR
177 } // namespace MicroModelica
178 
179 #endif /* MMO_SETTINGS_H_ */
MicroModelica::IR::Settings::Settings
Settings(string name)
Definition: mmo_settings.cpp:48
MicroModelica::IR::Settings::leave
void leave(AST_Class x)
Definition: mmo_settings.cpp:72
MicroModelica::IR::Settings::_classModification
bool _classModification
Definition: mmo_settings.hpp:225
MicroModelica::IR::Settings::_processModel
bool _processModel
Definition: mmo_settings.hpp:224
MicroModelica::IR::Settings::visit
void visit(AST_Class x)
Definition: mmo_settings.cpp:55
MicroModelica::IR::Settings::_processFunction
bool _processFunction
Definition: mmo_settings.hpp:223
MicroModelica::IR::Settings::annotations
ModelAnnotation annotations()
Definition: mmo_settings.cpp:148
MicroModelica::Generator::WRITER::Model
@ Model
Definition: writer.hpp:79
MicroModelica::IR::Settings::_insertAnnotation
bool _insertAnnotation
Definition: mmo_settings.hpp:222
MicroModelica::IR::Settings::apply
int apply(AST_Node x)
Definition: mmo_settings.cpp:142
MicroModelica::IR::Settings::_model
Model _model
Definition: mmo_settings.hpp:221
MicroModelica::IR::Settings::~Settings
~Settings()
Definition: mmo_settings.cpp:53
MicroModelica
Definition: files.cpp:45
ast_types.hpp
AST_Visitor
Definition: ast_util.hpp:224
class.hpp