Add ComparatorApiManager with SmoCallbacks hooks and startup load.
Register comparator types via a dedicated manager and expose lookup/create hooks through SmoCallbacks so stimbuff libs can resolve comparators at load time. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <deviceManager/deviceManager.h>
|
||||
#include <mind.h>
|
||||
#include <stimBuffApis/stimBuffApiManager.h>
|
||||
#include <comparatorLibs/comparatorApiManager.h>
|
||||
|
||||
namespace smo {
|
||||
namespace body {
|
||||
@@ -37,6 +38,10 @@ BodyViralPostingInvoker<void> Body::initializeCReq()
|
||||
*/
|
||||
// Upcast to Mind to access Mind-specific members
|
||||
Mind &mind = static_cast<Mind&>(parent);
|
||||
|
||||
comparator_lib::ComparatorApiManager::getInstance()
|
||||
.loadComparatorLib("libcomparatorCore.so");
|
||||
|
||||
stim_buff::StimBuffApiManager::getInstance()
|
||||
.loadAllStimBuffApiLibsFromOptions(mind.body.thread);
|
||||
|
||||
@@ -99,6 +104,10 @@ BodyViralPostingInvoker<void> Body::finalizeCReq()
|
||||
std::cout << "Mrntt: About to unload all stim buff api libs." << "\n";
|
||||
stim_buff::StimBuffApiManager::getInstance().unloadAllStimBuffApiLibs();
|
||||
|
||||
std::cout << "Mrntt: About to unload all comparator libs." << "\n";
|
||||
comparator_lib::ComparatorApiManager::getInstance()
|
||||
.unloadAllComparatorLibs();
|
||||
|
||||
co_return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user