SOLA
Loading...
Searching...
No Matches
sola
src
storage
storage.h
1
// Copyright The SOLA Contributors
2
//
3
// Licensed under the MIT License.
4
// For details on the licensing terms, see the LICENSE file.
5
// SPDX-License-Identifier: MIT
6
7
#ifndef SOLA_STORAGE_STORAGE_H_
8
#define SOLA_STORAGE_STORAGE_H_
9
10
#include <future>
11
#include <string>
12
#include <variant>
13
#include <vector>
14
15
#include "minhton/core/definitions.h"
16
namespace
sola {
17
18
struct
Request
{
19
bool
all;
// false -> some results are enough -> more efficient
20
bool
permissive;
// true -> results that dont fully satisfy query could be returned -> more
21
// efficient
22
std::string request;
23
};
24
25
using
Entry = std::tuple<std::string, std::variant<int, float, bool, std::string>>;
26
27
class
Storage
{
28
public
:
29
virtual
~Storage
() =
default
;
30
virtual
void
insert(std::vector<Entry> entry) = 0;
31
// virtual void update() = 0;
32
// virtual void remove() = 0;
33
virtual
std::future<minhton::FindResult> find(
Request
r) = 0;
34
35
virtual
void
stop() = 0;
36
virtual
bool
canStop()
const
= 0;
37
};
38
}
// namespace sola
39
40
#endif
sola::Storage
Definition
storage.h:27
sola::Request
Definition
storage.h:18
Generated by
1.9.8