本文整理汇总了C++中osmscout::routedescription::NameDescriptionRef::GetDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ NameDescriptionRef::GetDescription方法的具体用法?C++ NameDescriptionRef::GetDescription怎么用?C++ NameDescriptionRef::GetDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osmscout::routedescription::NameDescriptionRef
的用法示例。
在下文中一共展示了NameDescriptionRef::GetDescription方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DumpMotorwayLeaveDescription
static void DumpMotorwayLeaveDescription(size_t& lineCount,
const osmscout::RouteDescription::MotorwayLeaveDescriptionRef& motorwayLeaveDescription,
const osmscout::RouteDescription::DirectionDescriptionRef& directionDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
NextLine(lineCount);
std::cout << "Leave motorway";
if (motorwayLeaveDescription->GetFromDescription().Valid() &&
motorwayLeaveDescription->GetFromDescription()->HasName()) {
std::cout << " '" << motorwayLeaveDescription->GetFromDescription()->GetDescription() << "'";
}
if (directionDescription.Valid() &&
directionDescription->GetCurve()!=osmscout::RouteDescription::DirectionDescription::slightlyLeft &&
directionDescription->GetCurve()!=osmscout::RouteDescription::DirectionDescription::straightOn &&
directionDescription->GetCurve()!=osmscout::RouteDescription::DirectionDescription::slightlyRight) {
std::cout << " " << MoveToTurnCommand(directionDescription->GetCurve());
}
if (nameDescription.Valid() &&
nameDescription->HasName()) {
std::cout << " into '" << nameDescription->GetDescription() << "'";
}
std::cout << std::endl;
}
示例2: DumpTurnDescription
static void DumpTurnDescription(size_t& lineCount,
const osmscout::RouteDescription::TurnDescriptionRef& turnDescription,
const osmscout::RouteDescription::CrossingWaysDescriptionRef& crossingWaysDescription,
const osmscout::RouteDescription::DirectionDescriptionRef& directionDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
std::string crossingWaysString;
if (crossingWaysDescription.Valid()) {
crossingWaysString=CrossingWaysDescriptionToString(crossingWaysDescription);
}
if (!crossingWaysString.empty()) {
NextLine(lineCount);
std::cout << "At crossing " << crossingWaysString << std::endl;
}
NextLine(lineCount);
if (directionDescription.Valid()) {
std::cout << MoveToTurnCommand(directionDescription->GetCurve());
}
else {
std::cout << "Turn";
}
if (nameDescription.Valid() &&
nameDescription->HasName()) {
std::cout << " into '" << nameDescription->GetDescription() << "'";
}
std::cout << std::endl;
}
示例3: DumpMotorwayLeaveDescription
void RoutingListModel::DumpMotorwayLeaveDescription(const osmscout::RouteDescription::MotorwayLeaveDescriptionRef& motorwayLeaveDescription,
const osmscout::RouteDescription::DirectionDescriptionRef& directionDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
RouteStep leave;
leave.description="Leave motorway";
if (motorwayLeaveDescription->GetFromDescription().Valid() &&
motorwayLeaveDescription->GetFromDescription()->HasName()) {
leave.description+=" '";
leave.description+=QString::fromUtf8(motorwayLeaveDescription->GetFromDescription()->GetDescription().c_str());
leave.description+="'";
}
if (directionDescription.Valid() &&
directionDescription->GetCurve()!=osmscout::RouteDescription::DirectionDescription::slightlyLeft &&
directionDescription->GetCurve()!=osmscout::RouteDescription::DirectionDescription::straightOn &&
directionDescription->GetCurve()!=osmscout::RouteDescription::DirectionDescription::slightlyRight) {
leave.description+=MoveToTurnCommand(directionDescription->GetCurve());
}
if (nameDescription.Valid() &&
nameDescription->HasName()) {
leave.description+=" into '";
leave.description+=QString::fromUtf8(nameDescription->GetDescription().c_str());
leave.description+="'";
}
route.routeSteps.push_back(leave);
}
示例4: DumpTurnDescription
void RoutingListModel::DumpTurnDescription(const osmscout::RouteDescription::TurnDescriptionRef& /*turnDescription*/,
const osmscout::RouteDescription::CrossingWaysDescriptionRef& crossingWaysDescription,
const osmscout::RouteDescription::DirectionDescriptionRef& directionDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
RouteStep turn;
std::string crossingWaysString;
if (crossingWaysDescription.Valid()) {
crossingWaysString=CrossingWaysDescriptionToString(crossingWaysDescription);
}
if (!crossingWaysString.empty()) {
turn.description="At crossing "+QString::fromUtf8(crossingWaysString.c_str())+"";
}
if (directionDescription.Valid()) {
turn.description+=MoveToTurnCommand(directionDescription->GetCurve());
}
else {
turn.description=+"Turn";
}
if (nameDescription.Valid() &&
nameDescription->HasName()) {
turn.description+=" into '"+QString::fromUtf8(nameDescription->GetDescription().c_str())+"'";
}
route.routeSteps.push_back(turn);
}
示例5: DumpStartDescription
static void DumpStartDescription(size_t& lineCount,
const osmscout::RouteDescription::StartDescriptionRef& startDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
NextLine(lineCount);
std::cout << "Start at '" << startDescription->GetDescription() << "'" << std::endl;
if (nameDescription.Valid() &&
nameDescription->HasName()) {
NextLine(lineCount);
std::cout << "Drive along '" << nameDescription->GetDescription() << "'" << std::endl;
}
}
示例6: DumpRoundaboutLeaveDescription
static void DumpRoundaboutLeaveDescription(size_t& lineCount,
const osmscout::RouteDescription::RoundaboutLeaveDescriptionRef& roundaboutLeaveDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
NextLine(lineCount);
std::cout << "Leave roundabout (" << roundaboutLeaveDescription->GetExitCount() << ". exit)";
if (nameDescription.Valid() &&
nameDescription->HasName()) {
std::cout << " into street '" << nameDescription->GetDescription() << "'";
}
std::cout << std::endl;
}
示例7: DumpStartDescription
void RoutingListModel::DumpStartDescription(const osmscout::RouteDescription::StartDescriptionRef& startDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
RouteStep startAt;
startAt.description="Start at '"+QString::fromUtf8(startDescription->GetDescription().c_str())+"'";
route.routeSteps.push_back(startAt);
if (nameDescription.Valid() &&
nameDescription->HasName()) {
RouteStep driveAlong;
driveAlong.description="Drive along '"+QString::fromUtf8(nameDescription->GetDescription().c_str())+"'";
route.routeSteps.push_back(driveAlong);
}
}
示例8: DumpRoundaboutLeaveDescription
void RoutingListModel::DumpRoundaboutLeaveDescription(const osmscout::RouteDescription::RoundaboutLeaveDescriptionRef& roundaboutLeaveDescription,
const osmscout::RouteDescription::NameDescriptionRef& nameDescription)
{
RouteStep leave;
leave.description="Leave roundabout (";
leave.description+=QString::number(roundaboutLeaveDescription->GetExitCount());
leave.description+=". exit)";
if (nameDescription.Valid() &&
nameDescription->HasName()) {
leave.description+=" into street '";
leave.description+=QString::fromUtf8(nameDescription->GetDescription().c_str());
leave.description+="'";
}
route.routeSteps.push_back(leave);
}