|
3 | 3 | * @file src/jres_json_converter.cpp |
4 | 4 | * @brief JSON conversion functions for the JRES Solver library. |
5 | 5 | */ |
6 | | -#include "jres_solver/jres_json_converter.hpp" |
| 6 | +#include "jres_solver/jres_solver.hpp" |
7 | 7 | #include "nlohmann/json.hpp" |
8 | 8 | #include <iostream> |
9 | 9 | #include <cstring> |
@@ -57,7 +57,7 @@ char* allocate_and_copy(const std::string& s) { |
57 | 57 | return cstr; |
58 | 58 | } |
59 | 59 |
|
60 | | -JresSolverInput* jres_input_from_json(const char* jsonData) { |
| 60 | +JRES_SOLVER_API JresSolverInput* jres_input_from_json(const char* jsonData) { |
61 | 61 | last_error_message.clear(); // Clear previous error |
62 | 62 | try { |
63 | 63 | json j = json::parse(jsonData); |
@@ -125,7 +125,7 @@ JresSolverInput* jres_input_from_json(const char* jsonData) { |
125 | 125 | } |
126 | 126 |
|
127 | 127 |
|
128 | | -char* jres_output_to_json(const JresSolverOutput* output) { |
| 128 | +JRES_SOLVER_API char* jres_output_to_json(const JresSolverOutput* output) { |
129 | 129 | last_error_message.clear(); // Clear previous error |
130 | 130 | if (!output) { |
131 | 131 | last_error_message = "Output is nullptr."; |
@@ -194,11 +194,11 @@ char* jres_output_to_json(const JresSolverOutput* output) { |
194 | 194 | } |
195 | 195 | } |
196 | 196 |
|
197 | | -const char* jres_get_last_error() { |
| 197 | +JRES_SOLVER_API const char* jres_get_last_error() { |
198 | 198 | return last_error_message.c_str(); |
199 | 199 | } |
200 | 200 |
|
201 | | -void free_jres_solver_output(JresSolverOutput* output) { |
| 201 | +JRES_SOLVER_API void free_jres_solver_output(JresSolverOutput* output) { |
202 | 202 | if (!output) { |
203 | 203 | return; |
204 | 204 | } |
@@ -232,7 +232,7 @@ void free_jres_solver_output(JresSolverOutput* output) { |
232 | 232 | delete output; |
233 | 233 | } |
234 | 234 |
|
235 | | -void free_jres_solver_input(JresSolverInput* input) { |
| 235 | +JRES_SOLVER_API void free_jres_solver_input(JresSolverInput* input) { |
236 | 236 | if (!input) { |
237 | 237 | return; |
238 | 238 | } |
|
0 commit comments