MicroModelicaCCompiler
4.5.3
built_in_functions.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
#pragma once
21
22
#include <
ir/helpers.hpp
>
23
#include <
util/table.hpp
>
24
25
namespace
MicroModelica
{
26
namespace
IR {
27
28
class
BuiltInFunction {
29
public
:
30
static
BuiltInFunction
&
instance
()
31
{
32
static
BuiltInFunction
_instance;
33
return
_instance;
34
}
35
~BuiltInFunction
() =
default
;
36
inline
CompiledFunctionTable
functions
() {
return
_functions
; };
37
inline
bool
isValid
(std::string func) {
return
_functions
[func].is_initialized(); };
38
inline
bool
lookup
(std::string func_name) {
return
_functions
.
lookup
(func_name); };
39
40
private
:
41
BuiltInFunction
();
42
CompiledFunctionTable
_functions
;
43
};
44
}
// namespace IR
45
}
// namespace MicroModelica
MicroModelica::IR::BuiltInFunction::lookup
bool lookup(std::string func_name)
Definition:
built_in_functions.hpp:89
helpers.hpp
MicroModelica::IR::BuiltInFunction::functions
CompiledFunctionTable functions()
Definition:
built_in_functions.hpp:87
MicroModelica::IR::CompiledFunctionTable
ModelTable< std::string, CompiledFunction > CompiledFunctionTable
Definition:
helpers.hpp:117
MicroModelica::IR::BuiltInFunction::isValid
bool isValid(std::string func)
Definition:
built_in_functions.hpp:88
MicroModelica
Definition:
files.cpp:45
ModelTable::lookup
bool lookup(Key key)
Definition:
table.hpp:63
MicroModelica::IR::BuiltInFunction::instance
static BuiltInFunction & instance()
Definition:
built_in_functions.hpp:81
table.hpp
MicroModelica::IR::BuiltInFunction::_functions
CompiledFunctionTable _functions
Definition:
built_in_functions.hpp:93
MicroModelica::IR::BuiltInFunction::~BuiltInFunction
~BuiltInFunction()=default
MicroModelica::IR::BuiltInFunction::BuiltInFunction
BuiltInFunction()
Definition:
built_in_functions.cpp:47
ir
built_in_functions.hpp
Generated on Fri Feb 21 2025 11:43:43 for MicroModelicaCCompiler by
1.8.17