Console and CSV output as pugins

This commit is contained in:
ParkSuMin committed 2026-09-19 20:53:16 +03:00
1 parent 8400abab18
commit fd2e4f265c
7 files changed
+300 -97

No files matched your search

+21 -6
View File
@@ -18,7 +18,19 @@ struct SolutionPoint{
double x3;
};
inline constexpr std::uint32_t PLUGIN_API_VERSION = 1;
enum PluginType{
Solver,
Output
};
struct OutputParameters{
const char* solver_name;
const char* destination_path;
const SolutionPoint* points;
size_t point_count;
};
inline constexpr std::uint32_t PLUGIN_API_VERSION = 2;
#if defined(_WIN32) && defined(PLUGIN_BUILD)
#define PLUGIN_EXPORT extern "C" __declspec(dllexport)
@@ -29,17 +41,20 @@ inline constexpr std::uint32_t PLUGIN_API_VERSION = 1;
#endif
using plugin_api_version_fn = std::uint32_t (*)();
using plugin_type_fn = PluginType (*)();
using plugin_text_fn = const char* (*)();
using function_run_fn = void (*)(
using solver_run_fn = void (*)(
const SolverParameters*,
SolutionPoint*,
std::size_t
size_t
);
using output_write_fn = int (*)(const OutputParameters*);
inline constexpr const char* SYMBOL_API_VERSION =
"plugin_api_version";
inline constexpr const char* SYMBOL_TYPE = "plugin_type";
inline constexpr const char* SYMBOL_NAME = "plugin_name";
inline constexpr const char* SYMBOL_DESCRIPTION =
"plugin_description";
inline constexpr const char* SYMBOL_FUNCTION = "func";
inline constexpr const char* SYMBOL_DESCRIPTION = "plugin_description";
inline constexpr const char* SYMBOL_TRANSFORM = "transform";
inline constexpr const char* SYMBOL_WRITE_OUTPUT = "write_output";