46 lines
1012 B
C++
46 lines
1012 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
struct SolverParameters{
|
|
double k1;
|
|
double k2;
|
|
double t_begin;
|
|
double t_end;
|
|
double step;
|
|
};
|
|
|
|
struct SolutionPoint{
|
|
double t;
|
|
double x1;
|
|
double x2;
|
|
double x3;
|
|
};
|
|
|
|
inline constexpr std::uint32_t PLUGIN_API_VERSION = 1;
|
|
|
|
#if defined(_WIN32) && defined(PLUGIN_BUILD)
|
|
#define PLUGIN_EXPORT extern "C" __declspec(dllexport)
|
|
#elif defined(_WIN32)
|
|
#define PLUGIN_EXPORT extern "C"
|
|
#else
|
|
#define PLUGIN_EXPORT extern "C" __attribute__((visibility("default")))
|
|
#endif
|
|
|
|
using plugin_api_version_fn = std::uint32_t (*)();
|
|
using plugin_text_fn = const char* (*)();
|
|
using function_run_fn = void (*)(
|
|
const SolverParameters*,
|
|
SolutionPoint*,
|
|
std::size_t
|
|
);
|
|
|
|
inline constexpr const char* SYMBOL_API_VERSION =
|
|
"plugin_api_version";
|
|
inline constexpr const char* SYMBOL_NAME = "plugin_name";
|
|
inline constexpr const char* SYMBOL_DESCRIPTION =
|
|
"plugin_description";
|
|
inline constexpr const char* SYMBOL_FUNCTION = "func";
|
|
|