modelica_parser.cpp
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 #include "modelica_parser_internal.hpp"
27 
28 namespace casadi {
29 
31 }
32 
33 ModelicaParser::ModelicaParser(const std::string& name) {
34  own(ModelicaParserInternal::getPlugin(name).creator());
35 }
36 
38 }
39 
41  return static_cast<const ModelicaParserInternal*>(SharedObject::operator->());
42 }
43 
45  return static_cast<ModelicaParserInternal*>(SharedObject::operator->());
46 }
47 
48 void ModelicaParser::parse(const std::string& filename, const std::string& output_dir) {
49  return (*this)->parse(filename, output_dir);
50 }
51 
52 void ModelicaParser::load_plugin(const std::string& name) {
54 }
55 
56 std::string ModelicaParser::doc(const std::string& name) {
57  return ModelicaParserInternal::getPlugin(name).doc;
58 }
59 
60 bool has_modelicaparser(const std::string& name) {
62 }
63 
64 void load_modelicaparser(const std::string& name) {
66 }
67 
68 std::string doc_modelicaparser(const std::string& name) {
69  return ModelicaParser::doc(name);
70 }
71 
72 } // namespace casadi
SharedObjectInternal * operator->() const
Access a member function or object.
static std::string doc(const std::string &name)
Get solver specific documentation.
static void load_plugin(const std::string &name)
Load a plugin dynamically.
void parse(const std::string &filename, const std::string &output_dir)
ModelicaParserInternal * operator->()
Access functions of the node.
static bool has_plugin(const std::string &pname, bool verbose=false)
Check if a plugin is available or can be loaded.
static Plugin & getPlugin(const std::string &pname)
Load and get the creator function.
static Plugin load_plugin(const std::string &pname, bool register_plugin=true, bool needs_lock=true)
Load a plugin dynamically.
The casadi namespace.
Definition: archiver.cpp:28
std::string doc_modelicaparser(const std::string &name)
Get solver specific documentation.
void load_modelicaparser(const std::string &name)
Explicitly load a plugin dynamically.
bool has_modelicaparser(const std::string &name)
Check if a particular plugin is available.
std::string filename(const std::string &path)
Definition: ghc.cpp:55