b2ce3d58a4
Added multithreading to dbms. Skiplist now supports emplace insert.
26 lines
501 B
C++
26 lines
501 B
C++
#pragma once
|
|
|
|
#include <stdexcept>
|
|
|
|
#include "data_structures/concurrent/concurrent_set.hpp"
|
|
#include "storage/label/label.hpp"
|
|
#include "utils/char_str.hpp"
|
|
|
|
class LabelStore
|
|
{
|
|
public:
|
|
using store_t = ConcurrentMap<CharStr, std::unique_ptr<Label>>;
|
|
|
|
store_t::Accessor access();
|
|
|
|
const Label &find_or_create(const char *name);
|
|
|
|
bool contains(const char *name); // TODO: const
|
|
|
|
// TODO: implement find method
|
|
// return { Label, is_found }
|
|
|
|
private:
|
|
store_t labels;
|
|
};
|