Adding duration member to way

This commit is contained in:
DennisOSRM 2013-01-27 23:05:27 +01:00
parent 86f4aebead
commit 59481dd762
3 changed files with 3 additions and 4 deletions

View File

@ -52,10 +52,10 @@ struct _Way {
keyVals.EraseAll(); keyVals.EraseAll();
direction = _Way::notSure; direction = _Way::notSure;
speed = -1; speed = -1;
duration = -1;
type = -1; type = -1;
access = true; access = true;
roundabout = false; roundabout = false;
isDurationSet = false;
isAccessRestricted = false; isAccessRestricted = false;
ignoreInGrid = false; ignoreInGrid = false;
} }
@ -67,10 +67,10 @@ struct _Way {
unsigned nameID; unsigned nameID;
std::string name; std::string name;
double speed; double speed;
double duration;
short type; short type;
bool access; bool access;
bool roundabout; bool roundabout;
bool isDurationSet;
bool isAccessRestricted; bool isAccessRestricted;
bool ignoreInGrid; bool ignoreInGrid;
std::vector< NodeID > path; std::vector< NodeID > path;

View File

@ -69,10 +69,10 @@ ScriptingEnvironment::ScriptingEnvironment(const char * fileName) {
.def(luabind::constructor<>()) .def(luabind::constructor<>())
.def_readwrite("name", &_Way::name) .def_readwrite("name", &_Way::name)
.def_readwrite("speed", &_Way::speed) .def_readwrite("speed", &_Way::speed)
.def_readwrite("duration", &_Way::duration)
.def_readwrite("type", &_Way::type) .def_readwrite("type", &_Way::type)
.def_readwrite("access", &_Way::access) .def_readwrite("access", &_Way::access)
.def_readwrite("roundabout", &_Way::roundabout) .def_readwrite("roundabout", &_Way::roundabout)
.def_readwrite("is_duration_set", &_Way::isDurationSet)
.def_readwrite("is_access_restricted", &_Way::isAccessRestricted) .def_readwrite("is_access_restricted", &_Way::isAccessRestricted)
.def_readwrite("ignore_in_grid", &_Way::ignoreInGrid) .def_readwrite("ignore_in_grid", &_Way::ignoreInGrid)
.def_readwrite("tags", &_Way::keyVals) .def_readwrite("tags", &_Way::keyVals)

View File

@ -139,7 +139,6 @@ bool XMLParser::Parse() {
_RawRestrictionContainer XMLParser::_ReadXMLRestriction() { _RawRestrictionContainer XMLParser::_ReadXMLRestriction() {
_RawRestrictionContainer restriction; _RawRestrictionContainer restriction;
std::string exception_of_restriction_tag; std::string exception_of_restriction_tag;
bool restriction_is_excepted = false;
if ( xmlTextReaderIsEmptyElement( inputReader ) != 1 ) { if ( xmlTextReaderIsEmptyElement( inputReader ) != 1 ) {
const int depth = xmlTextReaderDepth( inputReader );while ( xmlTextReaderRead( inputReader ) == 1 ) { const int depth = xmlTextReaderDepth( inputReader );while ( xmlTextReaderRead( inputReader ) == 1 ) {