mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 18:09:11 +08:00
5ffbcf1e16
Internal OpenCV library in OpenCV Manager support added; Unit tests improved, platform specific tests added, MIPS related tests added; Code refactoring done.
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
#ifndef __COMMON_PACKAGE_MANAGER_H__
|
|
#define __COMMON_PACKAGE_MANAGER_H__
|
|
|
|
#include "IPackageManager.h"
|
|
#include "PackageInfo.h"
|
|
#include <set>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
class CommonPackageManager: public IPackageManager
|
|
{
|
|
public:
|
|
std::set<std::string> GetInstalledVersions();
|
|
bool CheckVersionInstalled(const std::string& version, int platform, int cpu_id);
|
|
bool InstallVersion(const std::string& version, int platform, int cpu_id);
|
|
std::string GetPackagePathByVersion(const std::string& version, int platform, int cpu_id);
|
|
virtual ~CommonPackageManager();
|
|
|
|
protected:
|
|
static std::vector<std::pair<int, int> > ArmRating;
|
|
static std::vector<std::pair<int, int> > IntelRating;
|
|
|
|
static std::vector<std::pair<int, int> > InitArmRating();
|
|
static std::vector<std::pair<int, int> > InitIntelRating();
|
|
|
|
bool IsVersionCompatible(const std::string& target_version, const std::string& package_version);
|
|
int GetHardwareRating(int platform, int cpu_id, const std::vector<std::pair<int, int> >& group);
|
|
|
|
virtual bool InstallPackage(const PackageInfo& package) = 0;
|
|
virtual std::vector<PackageInfo> GetInstalledPackages() = 0;
|
|
};
|
|
|
|
|
|
#endif |