tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
vocabulary.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_VOCABULARY_HPP)
8#define TETENGO_LATTICE_VOCABULARY_HPP
9
10#include <vector>
11
12#include <boost/core/noncopyable.hpp>
13
15
16
17namespace tetengo::lattice
18{
19 class connection;
20 class input;
21 class node;
22
23
27 class vocabulary : private boost::noncopyable
28 {
29 public:
30 // constructors and destructor
31
36
40 virtual ~vocabulary();
41
42
43 // functions
44
52 [[nodiscard]] std::vector<entry_view> find_entries(const input& key) const;
53
62 [[nodiscard]] connection find_connection(const node& from, const entry_view& to) const;
63
64
65 private:
66 // virtual functions
67
68 virtual std::vector<entry_view> find_entries_impl(const input& key) const = 0;
69
70 virtual connection find_connection_impl(const node& from, const entry_view& to) const = 0;
71 };
72
73
74}
75
76
77#endif
A connection.
Definition connection.hpp:17
An entry view.
Definition entry.hpp:110
An input.
Definition input.hpp:24
A node.
Definition node.hpp:27
A vocabulary.
Definition vocabulary.hpp:28
std::vector< entry_view > find_entries(const input &key) const
Finds entries.
vocabulary()
Creates a vocabulary.
virtual ~vocabulary()
Destroys the vocabulary.
connection find_connection(const node &from, const entry_view &to) const
Finds a connection between an origin node and a destination entry.
An entry.
A lattice library.