feat(plugin): add name arguments to addOperator function
This commit is contained in:
@@ -30,4 +30,5 @@ protected:
|
||||
};
|
||||
|
||||
using opConstructor = GeometryOpDef* (*)(enzo::nt::OpId);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void enzo::op::OperatorTable::addOperator(nt::opConstructor ctorFunc)
|
||||
void enzo::op::OperatorTable::addOperator(const char* internalName, const char* displayName, nt::opConstructor ctorFunc)
|
||||
{
|
||||
std::cout << "OPERATOR TABLE ADDED\n";
|
||||
std::cout << "adding operator: " << displayName << "\n";
|
||||
ctorStore_.push_back(ctorFunc);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,11 @@ namespace enzo::op
|
||||
class BOOST_SYMBOL_EXPORT OperatorTable
|
||||
{
|
||||
public:
|
||||
static void addOperator(nt::opConstructor ctorFunc);
|
||||
static void addOperator(const char* internalName, const char* displayName, nt::opConstructor ctorFunc);
|
||||
static nt::opConstructor getOpConstructor(size_t pos);
|
||||
private:
|
||||
static std::vector<nt::opConstructor> ctorStore_;
|
||||
};
|
||||
using addOperatorPtr = void (*)(const char* internalName, const char* displayName, nt::opConstructor ctorFunc);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,5 @@ namespace enzo
|
||||
Input,
|
||||
Output
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user