fix: tests failing

This commit is contained in:
2025-07-19 00:54:42 +01:00
parent 2d9b9e9c70
commit 67dc55dfb2
8 changed files with 72 additions and 66 deletions

View File

@@ -1,4 +1,5 @@
#include "Engine/Operator/OperatorTable.h"
#include <boost/dll/import.hpp>
#include <iostream>
@@ -26,5 +27,18 @@ std::vector<enzo::op::OpInfo> enzo::op::OperatorTable::getData()
return opInfoStore_;
}
void enzo::op::OperatorTable::initPlugins()
{
static bool pluginsLoaded=false;
if(pluginsLoaded) return;
auto initPlugin = boost::dll::import_symbol<void(enzo::op::addOperatorPtr)>(
"build/src/OpDefs/libenzoOps1.so", "newSopOperator"
);
initPlugin(enzo::op::OperatorTable::addOperator);
pluginsLoaded = true;
}
std::vector<enzo::op::OpInfo> enzo::op::OperatorTable::opInfoStore_;

View File

@@ -20,6 +20,8 @@ public:
static void addOperator(const char* internalName, const char* displayName, nt::opConstructor ctorFunc);
static nt::opConstructor getOpConstructor(std::string name);
static std::vector<OpInfo> getData();
// TODO: move to better spot (maybe engine class)
static void initPlugins();
private:
static std::vector<OpInfo> opInfoStore_;
};