libosmscout 1.1.1
Loading...
Searching...
No Matches
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
33
34namespace osmscout {
35
45 {
46 public:
48 };
49
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
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
#define OSMSCOUT_API
Definition CoreImportExport.h:45
std::unordered_map< OSMId, Point > ResultMap
Definition CoordDataFile.h:42
TypeConfigRef GetTypeConfig() const
DebugDatabase(const DebugDatabaseParameter &parameter)
bool GetCoords(const std::set< OSMId > &ids, CoordDataFile::ResultMap &coordsMap) const
bool Open(const std::string &path)
bool ResolveReferences(const std::set< ObjectOSMRef > &ids, const std::set< ObjectFileRef > &fileOffsets, std::multimap< ObjectOSMRef, ObjectFileRef > &idFileOffsetMap, std::map< ObjectFileRef, ObjectOSMRef > &fileOffsetIdMap)
virtual ~DebugDatabase()=default
Definition DebugDatabase.h:45
std::shared_ptr< TypeConfig > TypeConfigRef
Definition TypeConfig.h:1396
Definition Area.h:39
RefType
Definition ObjectRef.h:139