mark Plugin classes as final
This commit is contained in:
parent
a38c007f51
commit
41fafae21d
@ -46,7 +46,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
template <class DataFacadeT> class DistanceTablePlugin : public BasePlugin
|
template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<SearchEngine<DataFacadeT>> search_engine_ptr;
|
std::shared_ptr<SearchEngine<DataFacadeT>> search_engine_ptr;
|
||||||
|
@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class HelloWorldPlugin : public BasePlugin
|
class HelloWorldPlugin final : public BasePlugin
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string temp_string;
|
std::string temp_string;
|
||||||
|
@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// locates the nearest node in the road network for a given coordinate.
|
// locates the nearest node in the road network for a given coordinate.
|
||||||
template <class DataFacadeT> class LocatePlugin : public BasePlugin
|
template <class DataFacadeT> class LocatePlugin final : public BasePlugin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit LocatePlugin(DataFacadeT *facade) : descriptor_string("locate"), facade(facade) {}
|
explicit LocatePlugin(DataFacadeT *facade) : descriptor_string("locate"), facade(facade) {}
|
||||||
|
@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
* This Plugin locates the nearest point on a street in the road network for a given coordinate.
|
* This Plugin locates the nearest point on a street in the road network for a given coordinate.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <class DataFacadeT> class NearestPlugin : public BasePlugin
|
template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit NearestPlugin(DataFacadeT *facade) : facade(facade), descriptor_string("nearest") {}
|
explicit NearestPlugin(DataFacadeT *facade) : facade(facade), descriptor_string("nearest") {}
|
||||||
@ -59,7 +59,7 @@ template <class DataFacadeT> class NearestPlugin : public BasePlugin
|
|||||||
phantom_node_vector,
|
phantom_node_vector,
|
||||||
route_parameters.zoom_level,
|
route_parameters.zoom_level,
|
||||||
number_of_results);
|
number_of_results);
|
||||||
|
|
||||||
JSON::Object json_result;
|
JSON::Object json_result;
|
||||||
if (phantom_node_vector.empty() || !phantom_node_vector.front().isValid())
|
if (phantom_node_vector.empty() || !phantom_node_vector.front().isValid())
|
||||||
{
|
{
|
||||||
@ -69,11 +69,11 @@ template <class DataFacadeT> class NearestPlugin : public BasePlugin
|
|||||||
{
|
{
|
||||||
reply.status = http::Reply::ok;
|
reply.status = http::Reply::ok;
|
||||||
json_result.values["status"] = 0;
|
json_result.values["status"] = 0;
|
||||||
|
|
||||||
if (number_of_results > 1)
|
if (number_of_results > 1)
|
||||||
{
|
{
|
||||||
JSON::Array results;
|
JSON::Array results;
|
||||||
|
|
||||||
int vector_length = phantom_node_vector.size();
|
int vector_length = phantom_node_vector.size();
|
||||||
for (const auto i : osrm::irange<std::size_t>(0, std::min(number_of_results, vector_length)))
|
for (const auto i : osrm::irange<std::size_t>(0, std::min(number_of_results, vector_length)))
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
template <class DataFacadeT> class TimestampPlugin : public BasePlugin
|
template <class DataFacadeT> class TimestampPlugin final : public BasePlugin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit TimestampPlugin(const DataFacadeT *facade)
|
explicit TimestampPlugin(const DataFacadeT *facade)
|
||||||
|
@ -48,7 +48,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
template <class DataFacadeT> class ViaRoutePlugin : public BasePlugin
|
template <class DataFacadeT> class ViaRoutePlugin final : public BasePlugin
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::unordered_map<std::string, unsigned> descriptor_table;
|
std::unordered_map<std::string, unsigned> descriptor_table;
|
||||||
|
Loading…
Reference in New Issue
Block a user