mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 09:49:13 +08:00
4feae810fa
Code refactoring done. OpenCV library version type changed to int. Some UI labels updated. OpenCV Manager verison incremented.
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
#ifndef __COMMON_PACKAGE_MANAGER_H__
|
|
#define __COMMON_PACKAGE_MANAGER_H__
|
|
|
|
#include "IPackageManager.h"
|
|
#include "PackageInfo.h"
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
class CommonPackageManager: public IPackageManager
|
|
{
|
|
public:
|
|
std::vector<int> GetInstalledVersions();
|
|
bool CheckVersionInstalled(int version, int platform, int cpu_id);
|
|
bool InstallVersion(int version, int platform, int cpu_id);
|
|
std::string GetPackagePathByVersion(int 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(int target_version, int 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
|