osrm-backend/include/engine/search_engine.hpp

43 lines
1.4 KiB
C++
Raw Normal View History

#ifndef SEARCH_ENGINE_HPP
#define SEARCH_ENGINE_HPP
2016-01-02 11:13:44 -05:00
#include "engine/search_engine_data.hpp"
#include "engine/routing_algorithms/alternative_path.hpp"
#include "engine/routing_algorithms/many_to_many.hpp"
#include "engine/routing_algorithms/map_matching.hpp"
#include "engine/routing_algorithms/shortest_path.hpp"
#include "engine/routing_algorithms/direct_shortest_path.hpp"
2014-05-22 08:41:27 -04:00
#include <type_traits>
2014-05-07 12:39:16 -04:00
template <class DataFacadeT> class SearchEngine
{
private:
DataFacadeT *facade;
SearchEngineData engine_working_data;
2014-05-07 12:39:16 -04:00
public:
ShortestPathRouting<DataFacadeT> shortest_path;
DirectShortestPathRouting<DataFacadeT> direct_shortest_path;
2014-05-07 12:39:16 -04:00
AlternativeRouting<DataFacadeT> alternative_path;
ManyToManyRouting<DataFacadeT> distance_table;
2014-09-23 12:46:14 -04:00
MapMatching<DataFacadeT> map_matching;
2011-12-31 10:18:52 -05:00
2014-05-07 12:39:16 -04:00
explicit SearchEngine(DataFacadeT *facade)
2014-09-23 12:46:14 -04:00
: facade(facade),
shortest_path(facade, engine_working_data),
direct_shortest_path(facade, engine_working_data),
2014-09-23 12:46:14 -04:00
alternative_path(facade, engine_working_data),
distance_table(facade, engine_working_data),
map_matching(facade, engine_working_data)
2014-05-07 12:39:16 -04:00
{
static_assert(!std::is_pointer<DataFacadeT>::value, "don't instantiate with ptr type");
static_assert(std::is_object<DataFacadeT>::value,
"don't instantiate with void, function, or reference");
2014-05-07 12:39:16 -04:00
}
2011-12-31 10:18:52 -05:00
~SearchEngine() {}
};
2011-12-31 10:18:52 -05:00
#endif // SEARCH_ENGINE_HPP