#include <llvmexpr/frontend/infix2postfix/StandardLibrary.hpp>
Definition at line 100 of file StandardLibrary.hpp.
◆ getExports()
| std::optional< std::vector< ExportedFunction > > infix2postfix::StandardLibraryManager::getExports |
( |
std::string_view | library_name | ) |
|
|
static |
Definition at line 80 of file StandardLibrary.cpp.
80 {
81 std::optional<std::vector<ExportedFunction>> result;
82
83 std::apply(
84 [&](auto... libs) {
85 (
86 [&] {
87 using LibType = std::decay_t<decltype(libs)>;
88 if (!result.has_value() && LibType::NAME == library_name) {
89 std::vector<ExportedFunction> out;
90 out.reserve(std::size(LibType::EXPORTS));
91 for (const auto& e : LibType::EXPORTS) {
92 out.push_back(e);
93 }
94 result = std::move(out);
95 }
96 }(),
97 ...);
98 },
100
101 return result;
102}
std::tuple< stdlib::Algorithms, stdlib::Meta, stdlib::Std > AllStandardLibraries
◆ getLibraryCode()
| std::optional< std::string_view > infix2postfix::StandardLibraryManager::getLibraryCode |
( |
std::string_view | library_name | ) |
|
|
static |
Definition at line 60 of file StandardLibrary.cpp.
60 {
61 std::optional<std::string_view> result;
62
63 std::apply(
64 [&](auto... libs) {
65 (
66 [&] {
67 using LibType = std::decay_t<decltype(libs)>;
68 if (!result.has_value() && LibType::NAME == library_name) {
69 result = LibType::CODE;
70 }
71 }(),
72 ...);
73 },
75
76 return result;
77}
◆ resolveDependencies()
| std::vector< std::string_view > infix2postfix::StandardLibraryManager::resolveDependencies |
( |
std::string_view | library_name | ) |
|
|
static |
Definition at line 28 of file StandardLibrary.cpp.
28 {
29 std::vector<std::string_view> result;
30
31 std::apply(
32 [&](auto... libs) {
33 (
34 [&] {
35 using LibType = std::decay_t<decltype(libs)>;
36 if (result.empty() && LibType::NAME == library_name) {
38 std::apply(
39 [&](auto... rs) {
40 (result.push_back(
41 std::decay_t<decltype(rs)>::NAME),
42 ...);
43 },
44 Resolved{});
45 }
46 }(),
47 ...);
48 },
50
51 if (result.empty()) {
52 throw std::runtime_error(std::string("Library '") +
53 std::string(library_name) + "' not found");
54 }
55
56 return result;
57}
typename detail::ResolveOne< Lib, std::tuple<>, std::tuple<> >::type ResolveLibraryDependencies
The documentation for this class was generated from the following files: