2017-04-09 02:24:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-21 06:32:18 +00:00
|
|
|
#include <optional.h>
|
2017-04-09 02:24:32 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
|
2017-04-21 06:32:18 +00:00
|
|
|
using std::experimental::optional;
|
|
|
|
using std::experimental::nullopt;
|
|
|
|
|
|
|
|
struct IndexerConfig;
|
2017-05-12 06:08:15 +00:00
|
|
|
struct IndexFile;
|
2017-04-09 02:24:32 +00:00
|
|
|
|
2017-05-12 06:08:15 +00:00
|
|
|
std::unique_ptr<IndexFile> LoadCachedIndex(IndexerConfig* config,
|
|
|
|
const std::string& filename);
|
2017-04-21 06:32:18 +00:00
|
|
|
|
2017-04-22 07:42:57 +00:00
|
|
|
optional<std::string> LoadCachedFileContents(IndexerConfig* config,
|
|
|
|
const std::string& filename);
|
2017-04-09 02:24:32 +00:00
|
|
|
|
2017-04-22 07:42:57 +00:00
|
|
|
void WriteToCache(IndexerConfig* config,
|
|
|
|
const std::string& filename,
|
2017-05-17 06:01:51 +00:00
|
|
|
IndexFile& file,
|
|
|
|
const optional<std::string>& indexed_file_contents);
|