28 lines
510 B
C++
28 lines
510 B
C++
#pragma once
|
|
|
|
#include "ModuleVersion.h"
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include <map>
|
|
#include <set>
|
|
#include <string>
|
|
|
|
struct Module
|
|
{
|
|
std::string moduleId;
|
|
ModuleVersion version;
|
|
std::set<std::string> filePaths;
|
|
};
|
|
|
|
class IModuleDatabase
|
|
{
|
|
public:
|
|
virtual std::map<std::string, ModuleVersion> listModules() = 0;
|
|
virtual boost::optional<Module> findModule(const std::string& moduleId) = 0;
|
|
virtual void storeModule(const Module& module) = 0;
|
|
|
|
protected:
|
|
~IModuleDatabase() {}
|
|
};
|