modelica_parser.hpp
1 /*
2  * This file is part of CasADi.
3  *
4  * CasADi -- A symbolic framework for dynamic optimization.
5  * Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl,
6  * KU Leuven. All rights reserved.
7  * Copyright (C) 2011-2014 Greg Horn
8  *
9  * CasADi is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 3 of the License, or (at your option) any later version.
13  *
14  * CasADi is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with CasADi; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 
26 #ifndef CASADI_MODELICA_PARSER_HPP
27 #define CASADI_MODELICA_PARSER_HPP
28 
29 #include "modelica_parser.hpp"
30 #include "shared_object.hpp"
31 #include "printable.hpp"
32 
33 namespace casadi {
34 
36  class ModelicaParserInternal;
37 
46  class CASADI_EXPORT ModelicaParser
47  : public SharedObject,
48  public SWIG_IF_ELSE(PrintableCommon, Printable<ModelicaParser>) {
49  public:
53  static std::string type_name() {return "ModelicaParser";}
54 
55  // Default constructor
57 
58  // Constructor
59  ModelicaParser(const std::string& name);
60 
61  // Destructor
63 
65  static void load_plugin(const std::string& name);
66 
68  static std::string doc(const std::string& name);
69 
70 #ifndef SWIG
74  ModelicaParserInternal* operator->();
75 
79  const ModelicaParserInternal* operator->() const;
80 #endif // SWIG
81 
82  // Parse a Modelica file and generate output in the given directory
83  void parse(const std::string& filename, const std::string& output_dir);
84  };
85 
87  CASADI_EXPORT bool has_modelicaparser(const std::string& name);
88 
90  CASADI_EXPORT void load_modelicaparser(const std::string& name);
91 
93  CASADI_EXPORT std::string doc_modelicaparser(const std::string& name);
94 
95 } // namespace casadi
96 
97 #endif // CASADI_MODELICA_PARSER_HPP
void parse(const std::string &filename, const std::string &output_dir)
ModelicaParser(const std::string &name)
static std::string type_name()
Get type name.
static std::string doc(const std::string &name)
Get solver specific documentation.
static void load_plugin(const std::string &name)
Load a plugin dynamically.
GenericShared implements a reference counting framework similar for efficient and.
The casadi namespace.
Definition: archiver.hpp:32
CASADI_EXPORT std::string doc_modelicaparser(const std::string &name)
Get solver specific documentation.
CASADI_EXPORT void load_modelicaparser(const std::string &name)
Explicitly load a plugin dynamically.
CASADI_EXPORT bool has_modelicaparser(const std::string &name)
Check if a particular plugin is available.