2014-11-28 06:13:18 -05:00
|
|
|
#ifndef SEARCH_ENGINE_HPP
|
|
|
|
#define SEARCH_ENGINE_HPP
|
2011-01-09 16:45:16 -05:00
|
|
|
|
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"
|
2012-06-15 12:47:27 -04:00
|
|
|
|
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;
|
2013-09-19 12:52:42 -04:00
|
|
|
SearchEngineData engine_working_data;
|
2014-05-07 12:39:16 -04:00
|
|
|
|
|
|
|
public:
|
2013-09-19 12:52:42 -04:00
|
|
|
ShortestPathRouting<DataFacadeT> shortest_path;
|
2015-07-13 15:09:19 -04:00
|
|
|
DirectShortestPathRouting<DataFacadeT> direct_shortest_path;
|
2014-05-07 12:39:16 -04:00
|
|
|
AlternativeRouting<DataFacadeT> alternative_path;
|
2014-05-16 10:09:40 -04:00
|
|
|
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),
|
2015-07-13 15:09:19 -04:00
|
|
|
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
|
|
|
{
|
2014-06-05 12:55:22 -04:00
|
|
|
static_assert(!std::is_pointer<DataFacadeT>::value, "don't instantiate with ptr type");
|
2015-02-19 03:19:51 -05:00
|
|
|
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
|
|
|
|
2013-09-19 12:52:42 -04:00
|
|
|
~SearchEngine() {}
|
|
|
|
};
|
2011-12-31 10:18:52 -05:00
|
|
|
|
2014-11-28 06:13:18 -05:00
|
|
|
#endif // SEARCH_ENGINE_HPP
|