/
NNModelPluginFactory

NNModelPluginFactory

class NNModelPluginFactory { public: static std::shared_ptr<NNModelPluginFactory> getInstance(); public: int scanPluginInfosFromPath(std::string path, bool forceReload = false); public: std::vector<std::string> getModelNames(); std::vector<std::string> getExternalModelNames(); std::vector<std::string> getIntegretedModelNames(); std::shared_ptr<NNModelPluginInfo> getPluginInfo(std::string modelName); public: int addIntegretedPluginInfo(std::shared_ptr<NNModelPluginInfo> pluginInfo); }

Introduction to the Class

Class representing a factory for neural network model plugin information.

The NNModelPluginFactory class manages the loading, storing, and retrieval of plugin information for neural network models. It employs the Singleton design pattern to ensure a unique instance of the factory is globally accessible.

Introduction to the Class's Methods

  1. static std::shared_ptr<NNModelPluginFactory> getInstance()

    • brief: Static method to obtain the singleton instance of the factory.

    • return std::shared_ptr<NNModelPluginFactory>: A shared pointer to the unique instance of the NNModelPluginFactory.

  2. int scanPluginInfosFromPath(std::string path, bool forceReload = false)

    • brief: Scans a specified path for plugin information files. This method scans the given directory for files containing plugin information. If forceReload is true, it will reload the plugin information even if it has been previously scanned.

    • param

      • path: The directory path to scan for plugin information files.

      • forceReload: If true, forces a reload of plugin information. Default is false.

    • return int: An integer indicating the success or failure of the scanning operation.

  3. std::vector<std::string> getModelNames()

    • brief: Retrieves a list of all model names managed by the factory.

    • return std::vector<std::string>: A vector of strings containing the names of all models..

  4. std::vector<std::string> getExternalModelNames()

    • brief: Retrieves a list of all external model names managed by the factory.

    • return std::vector<std::string>: A vector of strings containing the names of all external models.

  5. std::vector<std::string> getIntegretedModelNames()

    • brief: Retrieves a list of all integrated model names managed by the factory.

    • return std::vector<std::string>: A vector of strings containing the names of all integrated models.

  6. std::shared_ptr<NNModelPluginInfo> getPluginInfo(std::string modelName)

    • brief: Retrieves detailed information about a specific model plugin.

    • param

      • path: The name of the model plugin to retrieve information for.

    • return shared_ptr<NNModelPluginInfo>: A shared pointer to the NNModelPluginInfo object containing detailed information about the model.

  7. int addIntegretedPluginInfo(std::shared_ptr<NNModelPluginInfo> pluginInfo)

    • brief: Adds detailed information about an integrated model plugin.

    • param

      • pluginInfo: A shared pointer to the NNModelPluginInfo object containing detailed information about the integrated model.

    • return int: An integer indicating the success or failure of the scanning operation.

Related content

NNModelInfoFactory
NNModelInfoFactory
More like this
NNModelPluginInfo
NNModelPluginInfo
More like this
NNModel
More like this
NNSequential
NNSequential
More like this
NNModelInfoExport
NNModelInfoExport
More like this
NNModelInfo
More like this