move StaticGraph to C++11
This commit is contained in:
@@ -102,8 +102,8 @@ private:
|
||||
}
|
||||
|
||||
void LoadGraph(const boost::filesystem::path & hsgr_path) {
|
||||
typename ShM<typename QueryGraph::_StrNode, false>::vector node_list;
|
||||
typename ShM<typename QueryGraph::_StrEdge, false>::vector edge_list;
|
||||
typename ShM<typename QueryGraph::NodeArrayEntry, false>::vector node_list;
|
||||
typename ShM<typename QueryGraph::EdgeArrayEntry, false>::vector edge_list;
|
||||
|
||||
SimpleLogger().Write() << "loading graph from " << hsgr_path.string();
|
||||
|
||||
|
||||
@@ -49,12 +49,12 @@ class SharedDataFacade : public BaseDataFacade<EdgeDataT> {
|
||||
|
||||
private:
|
||||
typedef EdgeDataT EdgeData;
|
||||
typedef BaseDataFacade<EdgeData> super;
|
||||
typedef StaticGraph<EdgeData, true> QueryGraph;
|
||||
typedef typename StaticGraph<EdgeData, true>::_StrNode GraphNode;
|
||||
typedef typename StaticGraph<EdgeData, true>::_StrEdge GraphEdge;
|
||||
typedef typename QueryGraph::InputEdge InputEdge;
|
||||
typedef typename super::RTreeLeaf RTreeLeaf;
|
||||
typedef BaseDataFacade<EdgeData> super;
|
||||
typedef StaticGraph<EdgeData, true> QueryGraph;
|
||||
typedef typename StaticGraph<EdgeData, true>::NodeArrayEntry GraphNode;
|
||||
typedef typename StaticGraph<EdgeData, true>::EdgeArrayEntry GraphEdge;
|
||||
typedef typename QueryGraph::InputEdge InputEdge;
|
||||
typedef typename super::RTreeLeaf RTreeLeaf;
|
||||
typedef typename StaticRTree<RTreeLeaf, ShM<FixedPointCoordinate, true>::vector, true>::TreeNode RTreeNode;
|
||||
|
||||
SharedDataLayout * data_layout;
|
||||
|
||||
@@ -106,20 +106,20 @@ struct SharedDataLayout {
|
||||
|
||||
uint64_t GetSizeOfLayout() const {
|
||||
uint64_t result =
|
||||
(name_index_list_size * sizeof(unsigned) ) +
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass)) +
|
||||
(r_search_tree_size * sizeof(RTreeNode) ) +
|
||||
(geometries_indicators/32 + 1) * sizeof(unsigned) +
|
||||
(geometries_index_list_size * sizeof(unsigned) ) +
|
||||
(geometries_list_size * sizeof(unsigned) ) +
|
||||
sizeof(checksum) +
|
||||
(name_index_list_size * sizeof(unsigned) ) +
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass) ) +
|
||||
(r_search_tree_size * sizeof(RTreeNode) ) +
|
||||
(geometries_indicators/32 + 1) * sizeof(unsigned) +
|
||||
(geometries_index_list_size * sizeof(unsigned) ) +
|
||||
(geometries_list_size * sizeof(unsigned) ) +
|
||||
sizeof(checksum) +
|
||||
1024*sizeof(char);
|
||||
return result;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode)) ;
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry)) ;
|
||||
return result;
|
||||
}
|
||||
uint64_t GetTimeStampOffset() const {
|
||||
@@ -168,8 +168,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode)) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge));
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry)) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry));
|
||||
return result;
|
||||
}
|
||||
uint64_t GetCoordinateListOffset() const {
|
||||
@@ -178,8 +178,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode)) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge)) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry)) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry)) +
|
||||
(timestamp_length * sizeof(char) );
|
||||
return result;
|
||||
}
|
||||
@@ -189,8 +189,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode)) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge)) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry)) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry)) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate));
|
||||
return result;
|
||||
@@ -201,8 +201,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass));
|
||||
@@ -214,8 +214,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass)) +
|
||||
@@ -229,8 +229,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass)) +
|
||||
@@ -245,8 +245,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass)) +
|
||||
@@ -261,8 +261,8 @@ struct SharedDataLayout {
|
||||
(name_char_list_size * sizeof(char) ) +
|
||||
(name_id_list_size * sizeof(unsigned) ) +
|
||||
(via_node_list_size * sizeof(NodeID) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::_StrNode) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::_StrEdge) ) +
|
||||
(graph_node_list_size * sizeof(QueryGraph::NodeArrayEntry) ) +
|
||||
(graph_edge_list_size * sizeof(QueryGraph::EdgeArrayEntry) ) +
|
||||
(timestamp_length * sizeof(char) ) +
|
||||
(coordinate_list_size * sizeof(FixedPointCoordinate) ) +
|
||||
(turn_instruction_list_size * sizeof(TurnInstructionsClass)) +
|
||||
|
||||
Reference in New Issue
Block a user