tetengo 1.9.2
A multipurpose library set
Loading...
Searching...
No Matches
unordered_map_vocabulary.hpp
Go to the documentation of this file.
1
6
7#if !defined(TETENGO_LATTICE_UNORDEREDMAPVOCABULARY_HPP)
8#define TETENGO_LATTICE_UNORDEREDMAPVOCABULARY_HPP
9
10#include <cstddef>
11#include <functional>
12#include <memory>
13#include <string>
14#include <utility>
15#include <vector>
16
18
19
20namespace tetengo::lattice
21{
22 class connection; // IWYU pragma: keep
23 class entry;
24 class entry_view;
25 class input; // IWYU pragma: keep
26 class node; // IWYU pragma: keep
27
28
33 {
34 public:
35 // constructors and destructor
36
46 std::vector<std::pair<std::string, std::vector<entry>>> entries,
47 std::vector<std::pair<std::pair<entry, entry>, int>> connections,
48 std::function<std::size_t(const entry_view&)> entry_hash,
49 std::function<bool(const entry_view&, const entry_view&)> entry_equal_to);
50
55
56
57 private:
58 // types
59
60 class impl;
61
62
63 // variables
64
65 std::unique_ptr<impl> m_p_impl;
66
67
68 // virtual functions
69
70 virtual std::vector<entry_view> find_entries_impl(const input& key) const override;
71
72 virtual connection find_connection_impl(const node& from, const entry_view& to) const override;
73 };
74
75
76}
77
78
79#endif
A connection.
Definition connection.hpp:17
An entry view.
Definition entry.hpp:110
An entry.
Definition entry.hpp:26
An input.
Definition input.hpp:24
A node.
Definition node.hpp:27
unordered_map_vocabulary(std::vector< std::pair< std::string, std::vector< entry > > > entries, std::vector< std::pair< std::pair< entry, entry >, int > > connections, std::function< std::size_t(const entry_view &)> entry_hash, std::function< bool(const entry_view &, const entry_view &)> entry_equal_to)
Creates an unordered map vocabulary.
virtual ~unordered_map_vocabulary()
Destroys the unordered map vocabulary.
vocabulary()
Creates a vocabulary.
A lattice library.
A vocabulary.