blob: 225f7f75f6c5f01cc49d4f4b11fe31f60bb1225a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "dictionary_config.h"
#include <ostream>
#include <cassert>
namespace search {
std::ostream&
operator<<(std::ostream& os, const DictionaryConfig & cfg) {
return os << cfg.getType() << "," << cfg.getMatch();
}
std::ostream&
operator<<(std::ostream& os, DictionaryConfig::Type type) {
switch (type) {
case DictionaryConfig::Type::BTREE:
return os << "BTREE";
case DictionaryConfig::Type::HASH:
return os << "HASH";
case DictionaryConfig::Type::BTREE_AND_HASH:
return os << "BTREE_AND_HASH";
}
assert(false);
}
std::ostream&
operator<<(std::ostream& os, DictionaryConfig::Match match) {
switch(match) {
case DictionaryConfig::Match::CASED:
return os << "CASE_SENSTITIVE";
case DictionaryConfig::Match::UNCASED:
return os << "CASE_INSENSTITIVE";
}
assert(false);
}
} // namespace search
|