libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout
include
osmscout
db
DebugDatabase.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_DEBUGDATABASE_H
2
#define OSMSCOUT_DEBUGDATABASE_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2013 Tim Teulings
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 <list>
24
#include <map>
25
#include <set>
26
27
#include <
osmscout/ObjectRef.h
>
28
29
// Type and style sheet configuration
30
#include <
osmscout/TypeConfig.h
>
31
32
#include <
osmscout/db/CoordDataFile.h
>
33
34
namespace
osmscout
{
35
44
class
OSMSCOUT_API
DebugDatabaseParameter
final
45
{
46
public
:
47
DebugDatabaseParameter
() =
default
;
48
};
49
55
class
OSMSCOUT_API
DebugDatabase
56
{
57
private
:
58
bool
isOpen;
59
60
std::string path;
61
62
TypeConfigRef
typeConfig;
63
64
private
:
65
bool
ResolveReferences(
const
std::string& mapName,
66
RefType
fileType,
67
const
std::set<ObjectOSMRef>& ids,
68
const
std::set<ObjectFileRef>& fileOffsets,
69
std::multimap<ObjectOSMRef,ObjectFileRef>& idFileOffsetMap,
70
std::map<ObjectFileRef,ObjectOSMRef>& fileOffsetIdMap);
71
72
public
:
73
explicit
DebugDatabase
(
const
DebugDatabaseParameter
& parameter);
74
virtual
~DebugDatabase
() =
default
;
75
76
bool
Open
(
const
std::string& path);
77
bool
IsOpen
()
const
;
78
void
Close
();
79
80
TypeConfigRef
GetTypeConfig
()
const
;
81
82
bool
GetCoords
(
const
std::set<OSMId>& ids,
83
CoordDataFile::ResultMap
& coordsMap)
const
;
84
85
bool
ResolveReferences
(
const
std::set<ObjectOSMRef>& ids,
86
const
std::set<ObjectFileRef>& fileOffsets,
87
std::multimap<ObjectOSMRef,ObjectFileRef>& idFileOffsetMap,
88
std::map<ObjectFileRef,ObjectOSMRef>& fileOffsetIdMap);
89
};
90
}
91
92
#endif
CoordDataFile.h
OSMSCOUT_API
#define OSMSCOUT_API
Definition
CoreImportExport.h:45
ObjectRef.h
TypeConfig.h
osmscout::CoordDataFile::ResultMap
std::unordered_map< OSMId, Point > ResultMap
Definition
CoordDataFile.h:42
osmscout::DebugDatabase::GetTypeConfig
TypeConfigRef GetTypeConfig() const
osmscout::DebugDatabase::DebugDatabase
DebugDatabase(const DebugDatabaseParameter ¶meter)
osmscout::DebugDatabase::GetCoords
bool GetCoords(const std::set< OSMId > &ids, CoordDataFile::ResultMap &coordsMap) const
osmscout::DebugDatabase::Open
bool Open(const std::string &path)
osmscout::DebugDatabase::ResolveReferences
bool ResolveReferences(const std::set< ObjectOSMRef > &ids, const std::set< ObjectFileRef > &fileOffsets, std::multimap< ObjectOSMRef, ObjectFileRef > &idFileOffsetMap, std::map< ObjectFileRef, ObjectOSMRef > &fileOffsetIdMap)
osmscout::DebugDatabase::~DebugDatabase
virtual ~DebugDatabase()=default
osmscout::DebugDatabase::Close
void Close()
osmscout::DebugDatabase::IsOpen
bool IsOpen() const
osmscout::DebugDatabaseParameter
Definition
DebugDatabase.h:45
osmscout::DebugDatabaseParameter::DebugDatabaseParameter
DebugDatabaseParameter()=default
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