MCPcopy Create free account
hub / github.com/Norbyte/ositools / CustomFunctionManager

Class CustomFunctionManager

OsiInterface/CustomFunctions.h:187–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 };
186
187 class CustomFunctionManager
188 {
189 public:
190 // Arbitrary ID for custom extension functions
191 static constexpr uint32_t CallClassId = 1337;
192 static constexpr uint32_t QueryClassId = 1338;
193 static constexpr uint32_t EventClassId = 1339;
194
195 FunctionHandle Register(std::unique_ptr<CustomCall> call);
196 FunctionHandle Register(std::unique_ptr<CustomQuery> qry);
197 FunctionHandle Register(std::unique_ptr<CustomEvent> event);
198 CustomFunction * Find(FunctionNameAndArity const & signature);
199
200 bool Call(FunctionHandle handle, OsiArgumentDesc const & params);
201 bool Query(FunctionHandle handle, OsiArgumentDesc & params);
202
203 std::string GenerateHeaders() const;
204
205 private:
206 std::unordered_map<FunctionNameAndArity, CustomFunction *> signatures_;
207 std::vector<std::unique_ptr<CustomCall>> calls_;
208 std::vector<std::unique_ptr<CustomQuery>> queries_;
209 std::vector<std::unique_ptr<CustomEvent>> events_;
210
211 void RegisterSignature(CustomFunction * func);
212 };
213
214 struct OsiSymbolInfo
215 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected