diff --git a/Extractor/ExtractionNode.h b/Extractor/ExtractionNode.h new file mode 100644 index 000000000..44b334ab8 --- /dev/null +++ b/Extractor/ExtractionNode.h @@ -0,0 +1,42 @@ +/* + +Copyright (c) 2013, Project OSRM, Dennis Luxen, others +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#ifndef EXTRACTION_NODE_H__ +#define EXTRACTION_NODE_H__ + +struct ExtractionNode +{ + ExtractionNode() : traffic_lights(false), barrier(false) { } + void Clear() + { + traffic_lights = barrier = false; + } + bool traffic_lights; + bool barrier; +}; + +#endif diff --git a/Extractor/ExtractionWay.h b/Extractor/ExtractionWay.h index 36c138f89..0a1d9adae 100644 --- a/Extractor/ExtractionWay.h +++ b/Extractor/ExtractionWay.h @@ -41,19 +41,13 @@ struct ExtractionWay inline void Clear() { - id = SPECIAL_NODEID; - nameID = INVALID_NAMEID; - path.clear(); - keyVals.Clear(); forward_speed = -1; backward_speed = -1; duration = -1; - access = true; roundabout = false; - isAccessRestricted = false; - ignoreInGrid = false; - forward_travel_mode = TRAVEL_MODE_DEFAULT; - backward_travel_mode = TRAVEL_MODE_DEFAULT; + is_access_restricted = false; + ignore_in_grid = false; + name.clear(); } enum Directions @@ -61,9 +55,9 @@ struct ExtractionWay oneway, bidirectional, opposite }; - + // These accessor methods exists to support the depreciated "way.direction" access - // in LUA. Since the direction attribute was removed from ExtractionWay, the + // in LUA. Since the direction attribute was removed from ExtractionWay, the // accessors translate to/from the mode attributes. inline void set_direction(const Directions m) { @@ -111,18 +105,13 @@ struct ExtractionWay inline void set_backward_mode(const TravelMode m) { backward_travel_mode = m; } inline const TravelMode get_backward_mode() const { return backward_travel_mode; } - unsigned id; - unsigned nameID; double forward_speed; double backward_speed; double duration; std::string name; - bool access; bool roundabout; - bool isAccessRestricted; - bool ignoreInGrid; - std::vector path; - HashTable keyVals; + bool is_access_restricted; + bool ignore_in_grid; TravelMode forward_travel_mode : 4; TravelMode backward_travel_mode : 4; };