libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-import
include
osmscoutimport
GenTextIndex.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_IMPORT_GENTEXTINDEX_H
2
#define OSMSCOUT_IMPORT_GENTEXTINDEX_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2013 Preet Desai
7
8
This library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Lesser General Public
10
License as published by the Free Software Foundation; either
11
version 2.1 of the License, or (at your option) any later version.
12
13
This library is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Lesser General Public License for more details.
17
18
You should have received a copy of the GNU Lesser General Public
19
License along with this library; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
*/
22
23
#include <marisa.h>
24
25
#include <
osmscout/OSMScoutTypes.h
>
26
#include <
osmscout/ObjectRef.h
>
27
28
#include <
osmscoutimport/Import.h
>
29
30
#include <
osmscout/system/Compiler.h
>
31
32
namespace
osmscout
33
{
34
class
TextIndexGenerator
CLASS_FINAL
:
public
ImportModule
35
{
36
public
:
37
void
GetDescription
(
const
ImportParameter
& parameter,
38
ImportModuleDescription& description)
const override
;
39
40
bool
Import
(
const
TypeConfigRef
& typeConfig,
41
const
ImportParameter
¶meter,
42
Progress
&progress)
override
;
43
44
private
:
45
uint8_t GetFileOffsetSizeBytes(
const
ImportParameter
¶meter,
46
Progress
&progress);
47
48
bool
AddNodeTextToKeysets(
const
ImportParameter
¶meter,
49
Progress
&progress,
50
const
TypeConfig
&typeConfig,
51
uint8_t offsetSizeBytes);
52
53
bool
AddWayTextToKeysets(
const
ImportParameter
¶meter,
54
Progress
&progress,
55
const
TypeConfig
&typeConfig,
56
uint8_t offsetSizeBytes);
57
58
bool
AddAreaTextToKeysets(
const
ImportParameter
¶meter,
59
Progress
&progress,
60
const
TypeConfig
&typeConfig,
61
uint8_t offsetSizeBytes);
62
63
bool
BuildKeyStr(
const
std::string& text,
64
uint8_t offsetSizeBytes,
65
FileOffset
offset,
66
const
RefType
& reftype,
67
std::string& keyString)
const
;
68
69
bool
AddKeyStr(
const
std::string& text,
70
uint8_t offsetSizeBytes,
71
FileOffset
offset,
72
const
RefType
& reftype,
73
marisa::Keyset *keyset,
74
ImportParameter::TextIndexVariant variant)
const
;
75
76
// keysets used to store text data and generate tries
77
marisa::Keyset keysetPoi;
78
marisa::Keyset keysetLocation;
79
marisa::Keyset keysetRegion;
80
marisa::Keyset keysetOther;
81
};
82
}
83
84
85
#endif
// OSMSCOUT_IMPORT_GENTEXTINDEX_H
Compiler.h
Import.h
OSMScoutTypes.h
ObjectRef.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::GetDescription
void GetDescription(const ImportParameter ¶meter, ImportModuleDescription &description) const override
osmscout::CLASS_FINAL::TypeConfig
TypeConfig()
osmscout::CLASS_FINAL::ImportParameter
ImportParameter()
osmscout::CLASS_FINAL::Import
bool Import(const TypeConfigRef &typeConfig, const ImportParameter ¶meter, Progress &progress) override
osmscout::ImportModule
Definition
ImportModule.h:101
osmscout::Progress::Progress
Progress()
osmscout::FileOffset
uint64_t FileOffset
Definition
OSMScoutTypes.h:46
osmscout::TypeConfigRef
std::shared_ptr< TypeConfig > TypeConfigRef
Definition
TypeConfig.h:1396
osmscout
Definition
Area.h:39
osmscout::RefType
RefType
Definition
ObjectRef.h:139
Generated by
1.17.0