VisioMove-Sample
2.1.3
|
This class is a helper for natural navigation management. More...
Classes | |
struct | VgTranslatedInstruction |
This structure holds the result of a instruciton translation. More... | |
Public Types | |
enum | StringType { eStringFor, eStringThen, eStringAnd, eStringNear, eStringUsing, eStringCount } |
This enum is used as an identifier for localized versions of navigation texts. More... | |
Public Member Functions | |
VgMyNavigationHelper (VgNavigationModule::VgINavigationModule *pNavModule) | |
Class constructor. More... | |
virtual | ~VgMyNavigationHelper () |
Class destructor. More... | |
void | createNavigation (VgNavigationModule::VgINavigationRequestParameters &pParameters) |
Implementation of interface : VgMyNavigationCreator. More... | |
Static Public Member Functions | |
static void | translateInstruction (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigationInstruction > const &pInstruction, VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, VgTranslatedInstruction &pTranslated, VgMapModule::VgIMapModule &pMapModule, int pLang=0) |
This static method is used to translate a navigation instruction into a detailed message, along with other instruction-related data. More... | |
static int | getLangId (const std::string &pLangSr) |
Thi static method is used to get the integer lang id corresponding to a named language. More... | |
Static Protected Member Functions | |
static std::string | timeToText (float pTimeInMinutes, int pLang) |
Utility static method to generate a natural language "fuzzy" string for instruction duration. More... | |
static void | replaceTokens (std::string &pStringWithTokens, VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigationInstruction > const &pInstructionCurrent, VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigationInstruction > const &pInstructionNext) |
Takes a language string with tokens, then replaces those tokens with contextual data. More... | |
Protected Attributes | |
VgNavigationModule::VgINavigationModule * | mNavigationModule |
The navigationModule this helper is built on. More... | |
Static Protected Attributes | |
static const std::string | cLanguageStrings [2] |
The language identifiers. More... | |
static const size_t | cNumLanguages = sizeof(cLanguageStrings)/sizeof(std::string) |
The number of supported languages. More... | |
static const std::string | cActionStringTable [cNumLanguages][VgNavigationModule::eVgManeuverTypeMax] |
Action string table for localization. More... | |
static const std::string | cNextActionStringTable [cNumLanguages][VgNavigationModule::eVgManeuverTypeMax] |
Next action string table for localization (fr/en) More... | |
static const std::string | cTimeStringTable [cNumLanguages][3] |
Time string table for localization (fr/en) More... | |
static const std::string | cStringTable [cNumLanguages][eStringCount] |
Link words string table for localization (fr/en) More... | |
This class is a helper for natural navigation management.
IMPLEMENTATION TIPS: Customize this class to internationalize your instructions text.
This enum is used as an identifier for localized versions of navigation texts.
VgMyNavigationHelper::VgMyNavigationHelper | ( | VgNavigationModule::VgINavigationModule * | pNavModule | ) |
Class constructor.
pNavModule | The valid navigation module that will be used. |
|
virtual |
Class destructor.
|
virtual |
Implementation of interface : VgMyNavigationCreator.
Implements VgMyNavigationCreator.
|
static |
Thi static method is used to get the integer lang id corresponding to a named language.
pLangSr | The string identifying the language. Possible values (as of today) are "fr" or "en" or "fr_XX" or "en_XX" |
|
staticprotected |
Takes a language string with tokens, then replaces those tokens with contextual data.
pStringWithTokens | The language string containing the tokens. |
pInstructionCurrent | The current isntruction. |
pInstructionNext | The next instruction. |
|
staticprotected |
Utility static method to generate a natural language "fuzzy" string for instruction duration.
|
static |
This static method is used to translate a navigation instruction into a detailed message, along with other instruction-related data.
pInstruction | The instruction to translate. |
pNavigation | The navigation object the instruction comes from. |
pTranslated | A reference to the structure to feed with details. |
pMapModule | The application's VgMapModule (needed for near places and floor heights). |
pLang | The index of the language to use (see getLangId). |
|
staticprotected |
Action string table for localization.
|
staticprotected |
The language identifiers.
|
staticprotected |
Next action string table for localization (fr/en)
|
staticprotected |
The number of supported languages.
|
staticprotected |
Link words string table for localization (fr/en)
|
staticprotected |
Time string table for localization (fr/en)
|
protected |
The navigationModule this helper is built on.