本文整理汇总了C++中LoadDefaults函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadDefaults函数的具体用法?C++ LoadDefaults怎么用?C++ LoadDefaults使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadDefaults函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mysql_init
// Parameter-Konstruktor
CDatabase_Connection::CDatabase_Connection(string user, string password, string DB, string Host, int Port)
{
try
{
mysql_init(&my);
LoadDefaults();
setUsername(user);
setPassword(password);
setDB(DB);
setHost(Host);
setPort(Port);
this->connected = false;
this->initialised = false;
}
catch(...)
{
cerr << "An unexpected error occured in function 'Default-Constructor'!" << endl;
}
}
开发者ID:SLCoding,项目名称:SLive,代码行数:26,代码来源:CDatabase_Connection.cpp
示例2: LoadDefaults
void CAccelerator::LoadShortcuts(CSettings *pSettings)
{
// Set up names and default values
LoadDefaults();
m_iUsedKeys.clear(); // // //
// Load custom values, if exists
/*
location priorities:
1. HKCU/SOFTWARE/0CC-FamiTracker
1. HKCU/SOFTWARE/0CC-FamiTracker, original key
2. HKCU/SOFTWARE/FamiTracker
3. HKCU/SOFTWARE/FamiTracker, original key (using stAccelEntry::orig_name)
4. default value
*/
for (auto &x : m_pEntriesTable) { // // //
int Setting = (x.mod << 8) | x.key;
{ // // //
stOldSettingContext s;
if (x.orig_name != nullptr) // // //
Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.orig_name, Setting);
Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.name, Setting);
}
if (x.orig_name != nullptr) // // //
Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.orig_name, Setting);
Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.name, Setting);
x.key = Setting & 0xFF;
x.mod = Setting >> 8;
if (x.mod == MOD_NONE && x.key) // // //
m_iUsedKeys.insert(x.key);
}
}
开发者ID:sirocyl,项目名称:0CC-FamiTracker,代码行数:34,代码来源:Accelerator.cpp
示例3: bEnableDebugging
SCoreStartupParameter::SCoreStartupParameter()
: bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false),
bJITNoBlockCache(false), bJITNoBlockLinking(false),
bJITOff(false),
bJITLoadStoreOff(false), bJITLoadStorelXzOff(false),
bJITLoadStorelwzOff(false), bJITLoadStorelbzxOff(false),
bJITLoadStoreFloatingOff(false), bJITLoadStorePairedOff(false),
bJITFloatingPointOff(false), bJITIntegerOff(false),
bJITPairedOff(false), bJITSystemRegistersOff(false),
bJITBranchOff(false),
bJITILTimeProfiling(false), bJITILOutputIR(false),
bFPRF(false),
bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bNTSC(false), bForceNTSCJ(false),
bHLE_BS2(true), bEnableCheats(false),
bMergeBlocks(false), bEnableMemcardSaving(true),
bDPL2Decoder(false), iLatency(14),
bRunCompareServer(false), bRunCompareClient(false),
bBAT(false), bMMU(false), bDCBZOFF(false),
iBBDumpPort(0), bVBeamSpeedHack(false),
bSyncGPU(false), bFastDiscSpeed(false),
SelectedLanguage(0), bWii(false),
bConfirmStop(false), bHideCursor(false),
bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
iRenderWindowXPos(-1), iRenderWindowYPos(-1),
iRenderWindowWidth(640), iRenderWindowHeight(480),
bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
bFullscreen(false), bRenderToMain(false),
bProgressive(false), bDisableScreenSaver(false),
iPosX(100), iPosY(100), iWidth(800), iHeight(600),
bLoopFifoReplay(true)
{
LoadDefaults();
}
开发者ID:Asmodean-,项目名称:dolphin,代码行数:34,代码来源:CoreParameter.cpp
示例4: MultiWii_setup
void MultiWii_setup() {
SerialOpen(SERIAL0_COM_SPEED);
#if defined(TRACE)
Serial.println("Start MultiWii_setup");
#endif
initOutput();
LoadDefaults();
configureReceiver();
initSensors();
previousTime = micros();
calibratingA = 0;
calibratingG = 512;
#if defined(TRACE)
Serial.println("End MultiWii_setup");
#endif
}
开发者ID:sooyewguan,项目名称:RobotChipKit,代码行数:26,代码来源:PMultiWii.cpp
示例5: defined
CAtmoConfig::CAtmoConfig()
{
// setup basic configruation structures...
m_IsShowConfigDialog = 0;
m_eAtmoConnectionType = actClassicAtmo;
for(int i=0;i<10;i++)
m_ChannelAssignments[i] = NULL;
#if defined (_ATMO_VLC_PLUGIN_)
m_devicename = NULL;
m_devicenames[0] = NULL;
m_devicenames[1] = NULL;
m_devicenames[2] = NULL;
#endif
// load all config values with there defaults
m_ZoneDefinitions = NULL;
m_AtmoZoneDefCount = -1;
m_DMX_BaseChannels = NULL;
m_chWhiteAdj_Red = NULL;
m_chWhiteAdj_Green = NULL;
m_chWhiteAdj_Blue = NULL;
LoadDefaults();
}
开发者ID:banketree,项目名称:faplayer,代码行数:25,代码来源:AtmoConfig.cpp
示例6: LoadDefaults
bool CGUIIncludes::Load_Internal(const std::string &file)
{
// check to see if we already have this loaded
if (HasLoaded(file))
return true;
CXBMCTinyXML doc;
if (!doc.LoadFile(file))
{
CLog::Log(LOGINFO, "Error loading include file %s: %s (row: %i, col: %i)", file.c_str(), doc.ErrorDesc(), doc.ErrorRow(), doc.ErrorCol());
return false;
}
TiXmlElement *root = doc.RootElement();
if (!root || !StringUtils::EqualsNoCase(root->Value(), "includes"))
{
CLog::Log(LOGERROR, "Error loading include file %s: Root element <includes> required.", file.c_str());
return false;
}
// load components
LoadDefaults(root);
LoadConstants(root);
LoadExpressions(root);
LoadVariables(root);
LoadIncludes(root);
m_files.push_back(file);
return true;
}
开发者ID:Razzeee,项目名称:xbmc,代码行数:31,代码来源:GUIIncludes.cpp
示例7: defined
ConfigManager::ConfigManager(wxString apath):lang(LS_INIT) {
pseint_dir = apath;
version=0;
#if defined(_WIN32) || defined(__WIN32__)
home_dir = DIR_PLUS_FILE(wxFileName::GetHomeDir(),"pseint");
#else
home_dir = DIR_PLUS_FILE(wxFileName::GetHomeDir(),".pseint");
#endif
if (!wxFileName::DirExists(home_dir))
wxFileName::Mkdir(home_dir);
if (wxFileName::FileExists("config.here"))
filename="config.here";
else
filename = DIR_PLUS_FILE(home_dir,"config");
LoadDefaults();
Read();
#if defined(__WIN32__)
#elif defined(__APPLE__)
tty_command="./mac-terminal-wrapper.bin";
#else
wxFileName f_path = wxGetCwd();
f_path.MakeAbsolute();
// pseint_command = DIR_PLUS_FILE(f_path.GetFullPath(),"pseint");
// if (pseint_command.Contains(" ")) pseint_command=wxString("\"")<<pseint_command<<"\"";
#endif
lang.Log();
}
开发者ID:DaniPalma,项目名称:ImplementacionPSeInt,代码行数:30,代码来源:ConfigManager.cpp
示例8: LoadDefaults
SConfig::SConfig()
{
LoadDefaults();
// Make sure we have log manager
LoadSettings();
LoadSettingsFromSysconf();
}
开发者ID:TwitchPlaysPokemon,项目名称:dolphinWatch,代码行数:7,代码来源:ConfigManager.cpp
示例9: ifs
bool CKeyBindings::Load(const string& filename)
{
// inComment = false;
CFileHandler ifs(filename);
CSimpleParser parser(ifs);
userCommand = false; // temporarily disable Sanitize() calls
LoadDefaults();
while (true) {
const string line = parser.GetCleanLine();
if (line.empty()) {
break;
}
if (!ExecuteCommand(line)) {
ParseTypeBind(parser, line);
}
}
Sanitize();
userCommand = true; // re-enable Sanitize() calls
return true;
}
开发者ID:Arkazon,项目名称:spring,代码行数:26,代码来源:KeyBindings.cpp
示例10: readEEPROM
bool readEEPROM() {
uint8_t i;
global_conf.currentSet=0;
eeprom_read_block((void*)&conf, (void*)(global_conf.currentSet * sizeof(conf) + sizeof(global_conf)), sizeof(conf));
print("Calcul Eprom = %d, Read conf = %d \n\r", calculate_sum((uint8_t*)&conf, sizeof(conf)), conf.checksum);
if(calculate_sum((uint8_t*)&conf, sizeof(conf)) != conf.checksum) {
print("Loading Defaults\n\r");
blinkLED(6,100,3);
LoadDefaults(); // force load defaults
return false; // defaults loaded, don't reload constants (EEPROM life saving)
}
// 500/128 = 3.90625 3.9062 * 3.9062 = 15.259 1526*100/128 = 1192
for(i=0;i<5;i++) {
lookupPitchRollRC[i] = (1526+conf.rcExpo8*(i*i-15))*i*(int32_t)conf.rcRate8/1192;
}
for(i=0;i<11;i++) {
int16_t tmp = 10*i-conf.thrMid8;
uint8_t y = 1;
if (tmp>0) y = 100-conf.thrMid8;
if (tmp<0) y = conf.thrMid8;
lookupThrottleRC[i] = 10*conf.thrMid8 + tmp*( 100-conf.thrExpo8+(int32_t)conf.thrExpo8*(tmp*tmp)/(y*y) )/10; // [0;1000]
lookupThrottleRC[i] = conf.minthrottle + (int32_t)(MAXTHROTTLE-conf.minthrottle)* lookupThrottleRC[i]/1000; // [0;1000] -> [conf.minthrottle;MAXTHROTTLE]
}
return true; // setting is OK
}
开发者ID:NVSL,项目名称:Quadcopter-Class-Lab-06,代码行数:25,代码来源:EEPROM.cpp
示例11: LoadDefaults
Tags::Tags()
{
mEditTitle = true;
mEditTrackNumber = true;
LoadDefaults();
LoadGenres();
}
开发者ID:SteveDaulton,项目名称:audacity,代码行数:8,代码来源:Tags.cpp
示例12: myArgc
Settings::Settings(int argc, char* argv[]) :
myArgc(argc), myArgv(argv)
{
std::stringstream stringstream; stringstream << sf::Style::Close;
WindowStyleClose = stringstream.str();
stringstream.clear(); stringstream << sf::Style::Fullscreen;
WindowStyleFullscreen = stringstream.str();
WindowStyleEmulation = "0";
LoadDefaults();
}
开发者ID:PKEuS,项目名称:Medieval-War,代码行数:11,代码来源:Settings.cpp
示例13: Initialize
bool pawsConfigTooltips::Initialize()
{
colorPicker = NULL;
if (!LoadFromFile("configtooltips.xml"))
return false;
if (!LoadDefaults())
return false;
return true;
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:12,代码来源:pawsconfigtooltips.cpp
示例14: memset
RotationStore::RotationStore(Config& config) {
memset(m_Rotations, 0, sizeof(u64) * 8 * 40);
for (int ship = 0; ship < 8; ++ship) {
if (config.ShipRotations[ship].size() != 40) {
LoadDefaults();
return;
}
for (size_t i = 0; i < config.ShipRotations[ship].size(); ++i)
m_Rotations[ship][i] = config.ShipRotations[ship][i];
}
}
开发者ID:aurickq,项目名称:monkeybot,代码行数:13,代码来源:RotationStore.cpp
示例15: LoadDefaults
void CAccelerator::LoadShortcuts(CSettings *pSettings)
{
// Set up names and default values
LoadDefaults();
// Load custom values, if exists
for (int i = 0; i < ACCEL_COUNT; ++i) {
int Default = (EntriesTable[i].mod << 8) | EntriesTable[i].key;
int Setting = pSettings->LoadSetting(SHORTCUTS_SECTION, EntriesTable[i].name, Default);
EntriesTable[i].key = Setting & 0xFF;
EntriesTable[i].mod = Setting >> 8;
}
}
开发者ID:darvin,项目名称:nesicide,代码行数:13,代码来源:Accelerator.cpp
示例16: LoadDefaults
void pawsConfigTooltips::SetDefault()
{
psengine->GetVFS()->DeleteFile(CONFIG_TOOLTIPS_FILE_NAME);
LoadDefaults();
// transfer default values to standard variables
PawsManager::GetSingleton().setToolTipEnable(defToolTipEnable);
PawsManager::GetSingleton().setToolTipEnableBgColor(defToolTipEnableBgColor);
PawsManager::GetSingleton().setTooltipsColors(0, defTooltipsColors[0]);
PawsManager::GetSingleton().setTooltipsColors(1, defTooltipsColors[1]);
PawsManager::GetSingleton().setTooltipsColors(2, defTooltipsColors[2]);
LoadConfig();
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:14,代码来源:pawsconfigtooltips.cpp
示例17: _tcsncpy_s
CAtom::CAtom(TCHAR *name)
{
m_XCoord = 0.0f;
m_YCoord = 0.0f;
m_ZCoord = 0.0f;
m_ScaledSize = 1.0f;
_tcsncpy_s(m_Name, name, 3);
m_bSkip = false;
memset(m_FullName, 0, sizeof(m_FullName));
// TODO: check if defauts were loaded, if not, remove this atom
// and its links from the molecule
LoadDefaults();
m_IsOnTheMove = false;
}
开发者ID:ebutusov,项目名称:MRender,代码行数:14,代码来源:Atom.cpp
示例18: LogStartUp
// Read the data files
void
InputEvents::readFile()
{
LogStartUp(_T("Loading input events file"));
// clear the GCE and NMEA queues
ClearQueues();
LoadDefaults(input_config);
// Read in user defined configuration file
std::unique_ptr<TLineReader> reader(OpenConfiguredTextFile(szProfileInputFile));
if (reader)
::ParseInputFile(input_config, *reader);
}
开发者ID:damianob,项目名称:xcsoar_mess,代码行数:16,代码来源:InputEvents.cpp
示例19: readEEPROM
bool readEEPROM() {
uint8_t i;
#ifdef MULTIPLE_CONFIGURATION_PROFILES
if(global_conf.currentSet>2) global_conf.currentSet=0;
#else
global_conf.currentSet=0;
#endif
eeprom_read_block((void*)&conf, (void*)(global_conf.currentSet * sizeof(conf) + sizeof(global_conf)), sizeof(conf));
if(calculate_sum((uint8_t*)&conf, sizeof(conf)) != conf.checksum) {
blinkLED(6,100,3);
#if defined(BUZZER)
alarmArray[7] = 3;
#endif
LoadDefaults(); // force load defaults
return false; // defaults loaded, don't reload constants (EEPROM life saving)
}
// 500/128 = 3.90625 3.9062 * 3.9062 = 15.259 1526*100/128 = 1192
conf.rcExpo8 = 0;
conf.rcRate8 = PITCH_ROLL_RC_RATE_AIR;
for(i=0;i<5;i++) {
lookupPitchRollRC[i] = (1526+conf.rcExpo8*(i*i-15))*i*(int32_t)conf.rcRate8/1192;
}
for(i=0;i<11;i++) {
//conf.thrExpo8 = 0;
//conf.thrMid8 = 0;
int16_t tmp = 10*i-conf.thrMid8;
uint8_t y = 1;
if (tmp>0) y = 100-conf.thrMid8;
if (tmp<0) y = conf.thrMid8;
lookupThrottleRC[i] = 10*conf.thrMid8 + tmp*( 100-conf.thrExpo8+(int32_t)conf.thrExpo8*(tmp*tmp)/(y*y) )/10; // [0;1000]
//lookupThrottleRC[i] = conf.minthrottle + (int32_t)(MAXTHROTTLE - conf.minthrottle)* lookupThrottleRC[i]/1000; // [0;1000] -> [conf.minthrottle;MAXTHROTTLE]
lookupThrottleRC[i] = conf.minthrottle + (int32_t)(maxThrottle-conf.minthrottle)* lookupThrottleRC[i]/1000; // [0;1000] -> [conf.minthrottle;MAXTHROTTLE]
}
#if defined(POWERMETER)
pAlarm = (uint32_t) conf.powerTrigger1 * (uint32_t) PLEVELSCALE * (uint32_t) PLEVELDIV; // need to cast before multiplying
#endif
#if GPS
GPS_set_pids(); // at this time we don't have info about GPS init done
#endif
#if defined(ARMEDTIMEWARNING)
ArmedTimeWarningMicroSeconds = (conf.armedtimewarning *1000000);
#endif
return true; // setting is OK
}
开发者ID:ifmansour,项目名称:MultiWii,代码行数:48,代码来源:EEPROM.cpp
示例20: ifs
bool CKeyBindings::Load(const std::string& filename)
{
CFileHandler ifs(filename);
CSimpleParser parser(ifs);
buildHotkeyMap = false; // temporarily disable BuildHotkeyMap() calls
LoadDefaults();
while (!parser.Eof()) {
const std::string line = parser.GetCleanLine();
ExecuteCommand(line);
}
BuildHotkeyMap();
buildHotkeyMap = true; // re-enable BuildHotkeyMap() calls
return true;
}
开发者ID:spring,项目名称:spring,代码行数:16,代码来源:KeyBindings.cpp
注:本文中的LoadDefaults函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论