further include untangling, chops 5sec compile time

This commit is contained in:
Dennis Luxen 2014-06-11 12:25:57 +02:00
parent 71c4f81b59
commit 8aee371d81
15 changed files with 43 additions and 32 deletions

View File

@ -36,7 +36,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>
#include <limits>
struct CoordinatePairCalculator struct CoordinatePairCalculator
{ {

View File

@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define DOUGLASPEUCKER_H_ #define DOUGLASPEUCKER_H_
#include <stack> #include <stack>
#include <utility>
#include <vector> #include <vector>
/* This class object computes the bitvector of indicating generalized input /* This class object computes the bitvector of indicating generalized input
@ -38,7 +39,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* bit indicating if the points is present in the generalization. * bit indicating if the points is present in the generalization.
* Note: points may also be pre-selected*/ * Note: points may also be pre-selected*/
struct FixedPointCoordinate;
struct SegmentInformation; struct SegmentInformation;
class DouglasPeucker class DouglasPeucker

View File

@ -26,7 +26,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "PolylineCompressor.h" #include "PolylineCompressor.h"
#include "../Util/StringUtil.h" #include "../DataStructures/SegmentInformation.h"
#include <osrm/Coordinate.h>
void PolylineCompressor::encodeVectorSignedNumber(std::vector<int> &numbers, std::string &output) void PolylineCompressor::encodeVectorSignedNumber(std::vector<int> &numbers, std::string &output)
const const

View File

@ -28,8 +28,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef POLYLINECOMPRESSOR_H_ #ifndef POLYLINECOMPRESSOR_H_
#define POLYLINECOMPRESSOR_H_ #define POLYLINECOMPRESSOR_H_
struct SegmentInformation;
#include "../DataStructures/JSONContainer.h" #include "../DataStructures/JSONContainer.h"
#include "../DataStructures/SegmentInformation.h"
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -27,6 +27,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ImportEdge.h" #include "ImportEdge.h"
#include <boost/assert.hpp>
bool NodeBasedEdge::operator<(const NodeBasedEdge &other) const bool NodeBasedEdge::operator<(const NodeBasedEdge &other) const
{ {
if (source == other.source) if (source == other.source)

View File

@ -28,11 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef IMPORT_EDGE_H #ifndef IMPORT_EDGE_H
#define IMPORT_EDGE_H #define IMPORT_EDGE_H
#include "../Util/OSRMException.h"
#include "../typedefs.h" #include "../typedefs.h"
#include <boost/assert.hpp>
struct NodeBasedEdge struct NodeBasedEdge
{ {
bool operator<(const NodeBasedEdge &e) const; bool operator<(const NodeBasedEdge &e) const;

View File

@ -29,7 +29,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <limits> #include <limits>
ExternalMemoryNode::ExternalMemoryNode( ExternalMemoryNode::ExternalMemoryNode(
int lat, int lon, unsigned int node_id, bool bollard, bool traffic_light) int lat, int lon, unsigned int node_id, bool bollard, bool traffic_light)
: NodeInfo(lat, lon, node_id), bollard(bollard), trafficLight(traffic_light) : NodeInfo(lat, lon, node_id), bollard(bollard), trafficLight(traffic_light)

View File

@ -27,6 +27,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "SearchEngineData.h" #include "SearchEngineData.h"
#include "BinaryHeap.h"
void SearchEngineData::InitializeOrClearFirstThreadLocalStorage(const unsigned number_of_nodes) void SearchEngineData::InitializeOrClearFirstThreadLocalStorage(const unsigned number_of_nodes)
{ {
if (forwardHeap.get()) if (forwardHeap.get())

View File

@ -28,15 +28,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef SEARCH_ENGINE_DATA_H #ifndef SEARCH_ENGINE_DATA_H
#define SEARCH_ENGINE_DATA_H #define SEARCH_ENGINE_DATA_H
#include "BinaryHeap.h" #include <boost/thread/tss.hpp>
#include "QueryEdge.h"
#include "StaticGraph.h"
#include "../typedefs.h" #include "../typedefs.h"
#include "BinaryHeap.h"
#include <boost/thread.hpp>
#include <vector>
struct HeapData struct HeapData
{ {

View File

@ -27,6 +27,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "DescriptionFactory.h" #include "DescriptionFactory.h"
#include <osrm/Coordinate.h>
#include "../typedefs.h"
#include "../Algorithms/PolylineCompressor.h"
#include "../DataStructures/PhantomNodes.h"
#include "../DataStructures/RawRouteData.h"
#include "../DataStructures/SegmentInformation.h"
#include "../DataStructures/TurnInstructions.h"
DescriptionFactory::DescriptionFactory() : entireLength(0) DescriptionFactory::DescriptionFactory() : entireLength(0)
{ {
via_indices.push_back(0); via_indices.push_back(0);

View File

@ -31,10 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../Algorithms/DouglasPeucker.h" #include "../Algorithms/DouglasPeucker.h"
#include "../Algorithms/PolylineCompressor.h" #include "../Algorithms/PolylineCompressor.h"
#include "../DataStructures/PhantomNodes.h" #include "../DataStructures/PhantomNodes.h"
#include "../DataStructures/RawRouteData.h"
#include "../DataStructures/SegmentInformation.h" #include "../DataStructures/SegmentInformation.h"
#include "../DataStructures/TurnInstructions.h" #include "../DataStructures/TurnInstructions.h"
#include "../Util/SimpleLogger.h"
#include "../typedefs.h" #include "../typedefs.h"
#include <osrm/Coordinate.h> #include <osrm/Coordinate.h>
@ -42,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <limits> #include <limits>
#include <vector> #include <vector>
struct PathData;
/* This class is fed with all way segments in consecutive order /* This class is fed with all way segments in consecutive order
* and produces the description plus the encoded polyline */ * and produces the description plus the encoded polyline */

View File

@ -25,22 +25,36 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
namespace boost { namespace interprocess { class named_mutex; } }
#include "OSRM_impl.h" #include "OSRM_impl.h"
#include "OSRM.h" #include "OSRM.h"
#include <osrm/Reply.h>
#include <osrm/RouteParameters.h>
#include <osrm/ServerPaths.h>
#include "../Plugins/BasePlugin.h"
#include "../Plugins/DistanceTablePlugin.h" #include "../Plugins/DistanceTablePlugin.h"
#include "../Plugins/HelloWorldPlugin.h" #include "../Plugins/HelloWorldPlugin.h"
#include "../Plugins/LocatePlugin.h" #include "../Plugins/LocatePlugin.h"
#include "../Plugins/NearestPlugin.h" #include "../Plugins/NearestPlugin.h"
#include "../Plugins/TimestampPlugin.h" #include "../Plugins/TimestampPlugin.h"
#include "../Plugins/ViaRoutePlugin.h" #include "../Plugins/ViaRoutePlugin.h"
#include "../Server/DataStructures/BaseDataFacade.h" #include "../Server/DataStructures/BaseDataFacade.h"
#include "../Server/DataStructures/InternalDataFacade.h" #include "../Server/DataStructures/InternalDataFacade.h"
#include "../Server/DataStructures/SharedBarriers.h" #include "../Server/DataStructures/SharedBarriers.h"
#include "../Server/DataStructures/SharedDataFacade.h" #include "../Server/DataStructures/SharedDataFacade.h"
#include "../Util/SimpleLogger.h"
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/interprocess/sync/named_condition.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <algorithm>
#include <fstream>
#include <utility>
#include <vector>
OSRM_impl::OSRM_impl(const ServerPaths &server_paths, const bool use_shared_memory) OSRM_impl::OSRM_impl(const ServerPaths &server_paths, const bool use_shared_memory)
: use_shared_memory(use_shared_memory) : use_shared_memory(use_shared_memory)

View File

@ -28,13 +28,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef OSRM_IMPL_H #ifndef OSRM_IMPL_H
#define OSRM_IMPL_H #define OSRM_IMPL_H
#include <osrm/Reply.h> class BasePlugin;
#include <osrm/RouteParameters.h> namespace http { class Reply; }
struct RouteParameters;
#include <osrm/ServerPaths.h> #include <osrm/ServerPaths.h>
#include "../DataStructures/QueryEdge.h" #include "../DataStructures/QueryEdge.h"
#include "../Plugins/BasePlugin.h"
#include "../Util/ProgramOptions.h"
#include <unordered_map> #include <unordered_map>
#include <string> #include <string>

View File

@ -29,13 +29,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "OSRMException.h" #include "OSRMException.h"
#include <boost/uuid/uuid_generators.hpp> // generators #include <boost/uuid/name_generator.hpp>
#include <boost/uuid/uuid_io.hpp> // streaming operators etc.
#include <cstring> #include <cstring>
#include <algorithm> #include <algorithm>
#include <iostream>
#include <string> #include <string>
#cmakedefine01 HAS64BITS #cmakedefine01 HAS64BITS

View File

@ -26,12 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "DataStructures/OriginalEdgeData.h" #include "DataStructures/OriginalEdgeData.h"
#include "DataStructures/QueryEdge.h"
#include "DataStructures/SharedMemoryFactory.h" #include "DataStructures/SharedMemoryFactory.h"
#include "DataStructures/SharedMemoryVectorWrapper.h"
#include "DataStructures/StaticGraph.h"
#include "DataStructures/StaticRTree.h"
#include "Server/DataStructures/BaseDataFacade.h"
#include "Server/DataStructures/SharedDataType.h" #include "Server/DataStructures/SharedDataType.h"
#include "Server/DataStructures/SharedBarriers.h" #include "Server/DataStructures/SharedBarriers.h"
#include "Util/BoostFileSystemFix.h" #include "Util/BoostFileSystemFix.h"
@ -51,7 +46,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <fstream> #include <fstream>
#include <string> #include <string>
#include <vector>
int main(const int argc, const char *argv[]) int main(const int argc, const char *argv[])
{ {
@ -434,7 +428,7 @@ int main(const int argc, const char *argv[])
static_cast<char *>(shared_memory_ptr + shared_layout_ptr->GetRSearchTreeOffset()); static_cast<char *>(shared_memory_ptr + shared_layout_ptr->GetRSearchTreeOffset());
if (tree_size > 0) if (tree_size > 0)
{ {
tree_node_file.read(rtree_ptr, sizeof(RTreeNode) * tree_size); tree_node_file.read(rtree_ptr, sizeof(RTreeNode) * tree_size);
} }
tree_node_file.close(); tree_node_file.close();