本文整理汇总了C++中ProfileMap::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ ProfileMap::Get方法的具体用法?C++ ProfileMap::Get怎么用?C++ ProfileMap::Get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProfileMap
的用法示例。
在下文中一共展示了ProfileMap::Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
void
Profile::Load(const ProfileMap &map, TaskBehaviour &settings)
{
Load(map, settings.glide);
map.Get(ProfileKeys::AATTimeMargin, settings.optimise_targets_margin);
map.Get(ProfileKeys::AutoMc, settings.auto_mc);
map.GetEnum(ProfileKeys::AutoMcMode, settings.auto_mc_mode);
unsigned Temp;
if (map.Get(ProfileKeys::RiskGamma, Temp))
settings.risk_gamma = fixed(Temp) / 10;
if (map.Get(ProfileKeys::SafetyMacCready, Temp))
settings.safety_mc = fixed(Temp) / 10;
map.Get(ProfileKeys::SafetyAltitudeArrival, settings.safety_height_arrival);
map.GetEnum(ProfileKeys::TaskType, settings.task_type_default);
Load(map, settings.start_margins);
Load(map, settings.sector_defaults);
Load(map, settings.ordered_defaults);
map.GetEnum(ProfileKeys::AbortTaskMode, settings.abort_task_mode);
Load(map, settings.route_planner);
}
示例2:
void
Profile::Load(const ProfileMap &map, FeaturesSettings &settings)
{
map.GetEnum(ProfileKeys::FinalGlideTerrain, settings.final_glide_terrain);
map.Get(ProfileKeys::BlockSTF, settings.block_stf_enabled);
map.Get(ProfileKeys::EnableNavBaroAltitude, settings.nav_baro_altitude_enabled);
}
示例3:
void
Profile::Load(const ProfileMap &map, StartConstraints &constraints)
{
map.GetEnum(ProfileKeys::StartHeightRef, constraints.max_height_ref);
map.Get(ProfileKeys::StartMaxHeight, constraints.max_height);
map.Get(ProfileKeys::StartMaxSpeed, constraints.max_speed);
}
示例4: Load
void
Profile::Load(const ProfileMap &map, UISettings &settings)
{
Load(map, settings.display);
map.Get(ProfileKeys::MenuTimeout, settings.menu_timeout);
#ifndef GNAV
map.Get(ProfileKeys::UIScale, settings.scale);
if (settings.scale < 50 || settings.scale > 200)
settings.scale = 100;
#endif
map.Get(ProfileKeys::EnableTAGauge, settings.enable_thermal_assistant_gauge);
map.Get(ProfileKeys::AirspaceWarningDialog, settings.enable_airspace_warning_dialog);
map.GetEnum(ProfileKeys::AppStatusMessageAlignment, settings.popup_message_position);
map.GetEnum(ProfileKeys::HapticFeedback, settings.haptic_feedback);
Load(map, settings.format);
Load(map, settings.map);
Load(map, settings.info_boxes);
Load(map, settings.vario);
Load(map, settings.traffic);
Load(map, settings.pages);
Load(map, settings.dialog);
Load(map, settings.sound);
}
示例5:
void
Profile::Load(const ProfileMap &map, TrailSettings &settings)
{
map.Get(ProfileKeys::TrailDrift, settings.wind_drift_enabled);
map.Get(ProfileKeys::SnailWidthScale, settings.scaling_enabled);
map.GetEnum(ProfileKeys::SnailType, settings.type);
map.GetEnum(ProfileKeys::SnailTrail, settings.length);
}
示例6:
void
Profile::Load(const ProfileMap &map, TrafficSettings &settings)
{
map.Get(ProfileKeys::EnableFLARMGauge, settings.enable_gauge);
map.Get(ProfileKeys::AutoCloseFlarmDialog, settings.auto_close_dialog);
map.Get(ProfileKeys::FlarmAutoZoom, settings.auto_zoom);
map.Get(ProfileKeys::FlarmNorthUp, settings.north_up);
map.GetEnum(ProfileKeys::FlarmLocation, settings.gauge_location);
}
示例7: fixed
void
Profile::Load(const ProfileMap &map, PolarSettings &settings)
{
fixed degradation;
if (map.Get(ProfileKeys::PolarDegradation, degradation) &&
degradation >= fixed(0.5) && degradation <= fixed(1))
settings.SetDegradationFactor(degradation);
map.Get(ProfileKeys::AutoBugs, settings.auto_bugs);
}
示例8: Load
static void Load(const ProfileMap &map,
SkyLinesTracking::Settings &settings) {
map.Get(ProfileKeys::SkyLinesTrackingEnabled, settings.enabled);
map.Get(ProfileKeys::SkyLinesRoaming, settings.roaming);
map.Get(ProfileKeys::SkyLinesTrackingInterval, settings.interval);
map.Get(ProfileKeys::SkyLinesTrafficEnabled, settings.traffic_enabled);
const char *key = map.Get(ProfileKeys::SkyLinesTrackingKey);
if (key != NULL)
settings.key = ParseUint64(key, NULL, 16);
}
示例9: if
void
Profile::Load(const ProfileMap &map, LiveTrack24Settings &settings)
{
map.Get(ProfileKeys::LiveTrack24Enabled, settings.enabled);
if (!map.Get(ProfileKeys::LiveTrack24Server, settings.server))
settings.server = _T("www.livetrack24.com");
else if (StringIsEqual(settings.server, _T("livexc.dhv1.de"))) {
// DHV tracking server moved to new host (#3208)
settings.server = _T("livexc.dhv.de");
}
map.Get(ProfileKeys::LiveTrack24Username, settings.username);
map.Get(ProfileKeys::LiveTrack24Password, settings.password);
}
示例10: Load
void
Profile::Load(const ProfileMap &map, ComputerSettings &settings)
{
Load(map, settings.wind);
Load(map, settings.polar);
Load(map, settings.team_code);
Load(map, settings.voice);
Load(map, settings.poi);
Load(map, settings.features);
Load(map, settings.airspace);
Load(map, settings.circling);
Load(map, settings.wave);
map.GetEnum(ProfileKeys::AverEffTime, settings.average_eff_time);
map.Get(ProfileKeys::SetSystemTimeFromGPS, settings.set_system_time_from_gps);
LoadUTCOffset(map, settings.utc_offset);
Load(map, settings.task);
Load(map, settings.contest);
Load(map, settings.logger);
#ifdef HAVE_TRACKING
Load(map, settings.tracking);
#endif
Load(map, settings.weather);
}
示例11: ApplyUnit
static bool
GetLegacyTemperatureUnit(const ProfileMap &map, const char *key, Unit &value)
{
unsigned tmp;
return map.Get(key, tmp) &&
ApplyUnit(value, ImportTemperatureUnit(tmp));
}
示例12: MakeDeviceSettingName
static bool
LoadPath(const ProfileMap &map, DeviceConfig &config, unsigned n)
{
char buffer[64];
MakeDeviceSettingName(buffer, "Port", n, "Path");
return map.Get(buffer, config.path);
}
示例13: defined
void
Profile::Load(const ProfileMap &map, AirspaceRendererSettings &settings)
{
map.GetEnum(ProfileKeys::AirspaceLabelSelection, settings.label_selection);
map.Get(ProfileKeys::AirspaceBlackOutline, settings.black_outline);
map.GetEnum(ProfileKeys::AltMode, settings.altitude_mode);
map.Get(ProfileKeys::ClipAlt, settings.clip_altitude);
#if defined(HAVE_HATCHED_BRUSH) && defined(HAVE_ALPHA_BLEND)
map.Get(ProfileKeys::AirspaceTransparency, settings.transparency);
#endif
map.GetEnum(ProfileKeys::AirspaceFillMode, settings.fill_mode);
for (unsigned i = 0; i < AIRSPACECLASSCOUNT; i++)
Load(map, i, settings.classes[i]);
}
示例14:
void
Profile::Load(const ProfileMap &map, ContestSettings &settings)
{
if (map.GetEnum(ProfileKeys::OLCRules, settings.contest)) {
/* handle out-dated Sprint rule in profile */
if (settings.contest == Contest::OLC_SPRINT)
settings.contest = Contest::OLC_LEAGUE;
}
map.Get(ProfileKeys::PredictContest, settings.predict);
}
示例15: file
static bool
LoadUTCOffset(const ProfileMap &map, RoughTimeDelta &value_r)
{
/* NOTE: Until 6.2.4 utc_offset was stored as a positive int in the
settings file (with negative offsets stored as "utc_offset + 24 *
3600"). Later versions will create a new signed settings key. */
int value;
if (map.Get(ProfileKeys::UTCOffsetSigned, value)) {
} else if (map.Get(ProfileKeys::UTCOffset, value)) {
if (value > 12 * 3600)
value = (value % (24 * 3600)) - 24 * 3600;
} else
/* no profile value present */
return false;
if (value > 13 * 3600 || value < -13 * 3600)
/* illegal value */
return false;
value_r = RoughTimeDelta::FromSeconds(value);
return true;
}