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:
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <preprocessor.h>
|
||||
#include <user/comparatorApiDesc.h>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
#include <spinscale/co/dynamicPostingInvoker.h>
|
||||
#include <spinscale/co/invokers.h>
|
||||
@@ -137,8 +138,18 @@ struct SmoCallbacks
|
||||
*/
|
||||
void (*ComputeManager_releaseDevice)(
|
||||
std::shared_ptr<smo::compute::ComputeDevice> device);
|
||||
|
||||
std::shared_ptr<cologex::ExportedComparatorTypeDesc>
|
||||
(*ComparatorManager_getComparatorType)(
|
||||
cologex::ComparatorTypeId typeId);
|
||||
|
||||
std::unique_ptr<cologex::Comparator> (*Comparator_getNewInstance)(
|
||||
const std::shared_ptr<cologex::ExportedComparatorTypeDesc>&
|
||||
comparatorType);
|
||||
};
|
||||
|
||||
const SmoCallbacks& getSmoCallbacks();
|
||||
|
||||
struct Sal_Mgmt_LibOps
|
||||
{
|
||||
/* When Salmanoff loads a stim buff API lib, it calls this function to initialize
|
||||
|
||||
Reference in New Issue
Block a user