fix: tests failing
This commit is contained in:
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user