Skip to content

Commit 71d68ff

Browse files
committed
Resolved dependencies.
1 parent 4d1d169 commit 71d68ff

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

src/overpass_api/data/meta_collector.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "../../template_db/block_backend.h"
2727
#include "../../template_db/random_file.h"
2828
#include "../core/settings.h"
29-
#include "../dispatch/resource_manager.h"
3029

3130

3231
template< typename Index, typename Id_Type >
@@ -35,11 +34,11 @@ struct Meta_Collector
3534
public:
3635
template< typename Object >
3736
Meta_Collector(const map< Index, vector< Object > >& items,
38-
Resource_Manager& rman, const File_Properties* meta_file_prop = 0,
37+
Transaction& transaction, const File_Properties* meta_file_prop = 0,
3938
bool user_data = true);
4039

4140
Meta_Collector(const set< pair< Index, Index > >& used_ranges,
42-
Resource_Manager& rman, const File_Properties* meta_file_prop = 0);
41+
Transaction& transaction, const File_Properties* meta_file_prop = 0);
4342

4443
void reset();
4544
const OSM_Element_Metadata_Skeleton< Id_Type >* get
@@ -90,15 +89,15 @@ template< typename Index, typename Id_Type >
9089
template< typename Object >
9190
Meta_Collector< Index, Id_Type >::Meta_Collector
9291
(const map< Index, vector< Object > >& items,
93-
Resource_Manager& rman, const File_Properties* meta_file_prop, bool user_data)
92+
Transaction& transaction, const File_Properties* meta_file_prop, bool user_data)
9493
: meta_db(0), db_it(0), range_it(0), current_index(0)
9594
{
9695
if (!meta_file_prop)
9796
return;
9897

9998
generate_index_query(used_indices, items);
10099
meta_db = new Block_Backend< Index, OSM_Element_Metadata_Skeleton< Id_Type > >
101-
((rman.get_transaction())->data_index(meta_file_prop));
100+
(transaction.data_index(meta_file_prop));
102101

103102
reset();
104103
}
@@ -107,14 +106,14 @@ Meta_Collector< Index, Id_Type >::Meta_Collector
107106
template< typename Index, typename Id_Type >
108107
Meta_Collector< Index, Id_Type >::Meta_Collector
109108
(const set< pair< Index, Index > >& used_ranges_,
110-
Resource_Manager& rman, const File_Properties* meta_file_prop)
109+
Transaction& transaction, const File_Properties* meta_file_prop)
111110
: used_ranges(used_ranges_), meta_db(0), db_it(0), range_it(0), current_index(0)
112111
{
113112
if (!meta_file_prop)
114113
return;
115114

116115
meta_db = new Block_Backend< Index, OSM_Element_Metadata_Skeleton< Id_Type > >
117-
((rman.get_transaction())->data_index(meta_file_prop));
116+
(transaction.data_index(meta_file_prop));
118117

119118
reset();
120119
}

src/overpass_api/statements/newer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void newer_filter_map
5454
if (modify.empty())
5555
return;
5656
Meta_Collector< TIndex, typename TObject::Id_Type > meta_collector
57-
(modify, rman, file_properties, false);
57+
(modify, *rman.get_transaction(), file_properties, false);
5858
for (typename map< TIndex, vector< TObject > >::iterator it = modify.begin();
5959
it != modify.end(); ++it)
6060
{
@@ -82,9 +82,9 @@ void newer_filter_map_attic
8282
return;
8383

8484
Meta_Collector< TIndex, typename TObject::Id_Type > current_meta_collector
85-
(modify, rman, current_file_properties, false);
85+
(modify, *rman.get_transaction(), current_file_properties, false);
8686
Meta_Collector< TIndex, typename TObject::Id_Type > attic_meta_collector
87-
(modify, rman, attic_file_properties, false);
87+
(modify, *rman.get_transaction(), attic_file_properties, false);
8888

8989
for (typename map< TIndex, vector< TObject > >::iterator it = modify.begin();
9090
it != modify.end(); ++it)

src/overpass_api/statements/print.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ void Print_Statement::tags_quadtile
590590
formulate_range_query(range_set, coarse_indices);
591591

592592
// formulate meta query if meta data shall be printed
593-
Meta_Collector< Index, typename Object::Id_Type > meta_printer(items, rman, meta_file_prop);
593+
Meta_Collector< Index, typename Object::Id_Type > meta_printer(items, *rman.get_transaction(), meta_file_prop);
594594

595595
// iterate over the result
596596
Block_Backend< Tag_Index_Local, typename Object::Id_Type > items_db
@@ -656,9 +656,9 @@ void Print_Statement::tags_quadtile_attic
656656

657657
// formulate meta query if meta data shall be printed
658658
Meta_Collector< Index, typename Object::Id_Type > current_meta_printer
659-
(items, rman, current_meta_file_prop);
659+
(items, *rman.get_transaction(), current_meta_file_prop);
660660
Meta_Collector< Index, typename Object::Id_Type > attic_meta_printer
661-
(items, rman, attic_meta_file_prop);
661+
(items, *rman.get_transaction(), attic_meta_file_prop);
662662

663663
// iterate over the result
664664
Block_Backend< Tag_Index_Local, typename Object::Id_Type > current_tags_db
@@ -894,7 +894,7 @@ void Print_Statement::tags_by_id
894894
sort(ids_by_coarse[it->val()].begin(), ids_by_coarse[it->val()].end());
895895

896896
// formulate meta query if meta data shall be printed
897-
Meta_Collector< TIndex, typename TObject::Id_Type > meta_printer(items, rman, meta_file_prop);
897+
Meta_Collector< TIndex, typename TObject::Id_Type > meta_printer(items, *rman.get_transaction(), meta_file_prop);
898898

899899
// iterate over the result
900900
Block_Backend< Tag_Index_Local, typename TObject::Id_Type > items_db
@@ -1020,12 +1020,12 @@ void Print_Statement::tags_by_id_attic
10201020

10211021
// formulate meta query if meta data shall be printed
10221022
Meta_Collector< Index, typename Object::Id_Type > only_current_meta_printer
1023-
(current_items, rman, current_meta_file_prop);
1023+
(current_items, *rman.get_transaction(), current_meta_file_prop);
10241024

10251025
Meta_Collector< Index, typename Object::Id_Type > current_meta_printer
1026-
(attic_items, rman, current_meta_file_prop);
1026+
(attic_items, *rman.get_transaction(), current_meta_file_prop);
10271027
Meta_Collector< Index, typename Object::Id_Type > attic_meta_printer
1028-
(attic_items, rman, attic_meta_file_prop);
1028+
(attic_items, *rman.get_transaction(), attic_meta_file_prop);
10291029

10301030
// iterate over the result
10311031
Block_Backend< Tag_Index_Local, typename Object::Id_Type > current_tags_db

src/overpass_api/statements/user.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void user_filter_map
5858
return;
5959

6060
Meta_Collector< TIndex, typename TObject::Id_Type > meta_collector
61-
(modify, rman, file_properties, false);
61+
(modify, *rman.get_transaction(), file_properties, false);
6262

6363
for (typename map< TIndex, vector< TObject > >::iterator it = modify.begin();
6464
it != modify.end(); ++it)
@@ -87,9 +87,9 @@ void user_filter_map_attic
8787
return;
8888

8989
Meta_Collector< TIndex, typename TObject::Id_Type > current_meta_collector
90-
(modify, rman, current_file_properties, false);
90+
(modify, *rman.get_transaction(), current_file_properties, false);
9191
Meta_Collector< TIndex, typename TObject::Id_Type > attic_meta_collector
92-
(modify, rman, attic_file_properties, false);
92+
(modify, *rman.get_transaction(), attic_file_properties, false);
9393

9494
for (typename map< TIndex, vector< TObject > >::iterator it = modify.begin();
9595
it != modify.end(); ++it)

0 commit comments

Comments
 (0)