Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef IMPORTTABLEPROCESSOR_H_
00009 #define IMPORTTABLEPROCESSOR_H_
00010
00011 #include "OsmDatabase.h"
00012 #include <boost/signal.hpp>
00013
00014 namespace osmdb
00015 {
00016
00020 enum class ImportTableAction
00021 {
00022 CREATE_IMPORT_PKEY,
00023 CREATE_IMPORT_INDEX,
00024 ANALYZE,
00025 DELETE_NODE_TO_UPDATE,
00026 DELETE_WAY_TO_UPDATE,
00027 DELETE_RELATION_TO_UPDATE,
00028 DELETE_NODE_TO_DELETE,
00029 DELETE_WAY_TO_DELETE,
00030 DELETE_RELATION_TO_DELETE,
00031 DELETE_ORPHAN,
00032 DELETE_DUPLICIT_NODE,
00033 DELETE_DUPLICIT_WAY,
00034 DELETE_DUPLICIT_RELATION,
00035 DELETE_INCOMPLETE_WAY,
00036 DELETE_INCOMPLETE_RELATION,
00037 DELETE_IMPORT_ORPHANS,
00038 IMPORT_NODE,
00039 IMPORT_WAY,
00040 IMPORT_RELATION,
00041 IMPORT_NODE_ATTR,
00042 IMPORT_WAY_ATTR,
00043 IMPORT_REL_ATTR,
00044 IMPORT_WAY_NODE,
00045 IMPORT_MEMBER_NODE,
00046 IMPORT_MEMBER_WAY,
00047 IMPORT_MEMBER_REL,
00048 IMPORT_EDGES,
00049 CLEAR_IMPORT,
00050 DELETE_DUPLICIT_ATTR,
00051 DELETE_DUPLICIT_MEMBER,
00052 DELETE_DUPLICIT_WAYNODE
00053 };
00054
00055 class AllImportActions
00056 {
00057 public:
00058 static std::vector<ImportTableAction> const& get();
00059 private:
00060 static std::vector<ImportTableAction> vect;
00061 };
00062
00067 class ImportTableProcessor
00068 {
00069 public:
00074 ImportTableProcessor(OsmDatabase& db);
00079 boost::signal<void (ImportTableAction, int64_t)> action_signal;
00085 void set(ImportTableAction act, bool val);
00090 void enable(ImportTableAction act);
00095 void disable(ImportTableAction act);
00099 void enable_all();
00103 void disable_all();
00108 void set_all(bool val);
00113 boost::signal<bool (), util::All> proceed_signal;
00117 void process();
00118 virtual ~ImportTableProcessor();
00119 private:
00120 OsmDatabase& db;
00121 std::map<ImportTableAction, bool> enabled;
00122 };
00123
00124 }
00125 #endif