Help Center/
Atlas 300 Application (Model 3000)/
Matrix API Reference/
Model Manager APIs (C++ Language)/
Other Compilation Dependent APIs/
AIAlgAPIFactory
Updated on 2022-03-13 GMT+08:00
AIAlgAPIFactory
ALG API registration factory class. This class is defined in ai_alg_api.h.
class AIAlgAPIFactory { public: static AIAlgAPIFactory* GetInstance(); /* * @brief Obtain the API. * @param [in] name API name * @return API prototype pointer */ AI_ALG_API GetAPI(const std::string &name); /* * @brief Register an API. * @param [in] desc API description * @param [in] func API definition * @return SUCCESS Success * @return Other: failure */ AIStatus RegisterAPI(const AIAPIDescription &desc, AI_ALG_API func); /* * @brief Obtain all API descriptions. * @param [in] api_desc_list API description list */ void GetAllAPIDescription(AIAPIDescriptionList &api_desc_list); /* * @brief Deregister an API. * @param [in] api_desc API description */ AIStatus UnRegisterApi(const AIAPIDescription &api_desc); /* * @brief Obtain the API description. * @param [in] name API name * @param [in] api_desc API description * @return SUCCESS Success * @return Other: failure */ AIStatus GetAPIDescription(const std::string &name, AIAPIDescription &api_desc); private: std::map<std::string, AI_ALG_API> func_map_; std::map<std::string, AIAPIDescription> desc_map_; std::mutex api_reg_lock_; };
Parent topic: Other Compilation Dependent APIs
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot