当前位置: 首页>>代码示例>>C++>>正文


C++ LoadConfig函数代码示例

本文整理汇总了C++中LoadConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadConfig函数的具体用法?C++ LoadConfig怎么用?C++ LoadConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LoadConfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initialise

static int initialise(void)
{//========================
	int param;
	int result;

	// It seems that the wctype functions don't work until the locale has been set
	// to something other than the default "C".  Then, not only Latin1 but also the
	// other characters give the correct results with iswalpha() etc.
#ifdef PLATFORM_RISCOS
   setlocale(LC_CTYPE,"ISO8859-1");
#else
#if 0
	if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL)
	{
		if(setlocale(LC_CTYPE,"UTF-8") == NULL)
			setlocale(LC_CTYPE,"");
	}
#endif
#endif


	WavegenInit(22050,0);   // 22050
	if((result = LoadPhData()) != 1)
	{
		if(result == -1)
		{
			fprintf(stderr,"Failed to load espeak-data\n");
			exit(1);
		}
		else
			fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x) at %s\n",result,version_phdata,path_home);
	}
	LoadConfig();
	SetVoiceStack(NULL);
	SynthesizeInit();

	for(param=0; param<N_SPEECH_PARAM; param++)
		param_stack[0].parameter[param] = param_defaults[param];

	return(0);
}
开发者ID:Jalakas,项目名称:navit,代码行数:41,代码来源:speak.c

示例2: InitTic

int InitTic(void)
{
	FILE	*fil;

	memset(&tic, 0, sizeof(tic));
	memset(&fgroup, 0, sizeof(fgroup));
	LoadConfig();
	sysstart = -1;

	snprintf(tic_fil, PATH_MAX -1, "%s/etc/tic.data", getenv("MBSE_ROOT"));
	if ((fil = fopen(tic_fil, "r")) == NULL)
		return FALSE;

	fread(&tichdr, sizeof(tichdr), 1, fil);
	fseek(fil, 0, SEEK_END);
	tic_cnt = (ftell(fil) - tichdr.hdrsize) / (tichdr.recsize + tichdr.syssize);
	fclose(fil);

	snprintf(tgrp_fil, PATH_MAX -1, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
	return TRUE;
}
开发者ID:bbs-io,项目名称:mbse,代码行数:21,代码来源:dbtic.c

示例3: GetDlgItem

BOOL CImagePack::OnInitDialog()
{
	CDialog::OnInitDialog();
     
	// TODO:  在此添加额外的初始化
    m_MaxWEdit.SetWindowText("1024");
	m_MaxHEdit.SetWindowText("1024");
    m_SpaceEdit.SetWindowText("1");
	GetDlgItem(IDOK)->SetFocus();
	m_listType.SetCurSel(1);
	m_HistoryCombo.LimitText(MAX_PATH);

	m_pDCCombo = m_HistoryCombo.GetDC();
	m_pFontCombo = m_HistoryCombo.GetFont();
	m_pOldFontCombo = m_pDCCombo->SelectObject(m_pFontCombo);
	m_pDCCombo->GetTextMetrics(&m_tmCombo);
	m_nExtendWidth = ::GetSystemMetrics(SM_CXVSCROLL) + 2*::GetSystemMetrics(SM_CXEDGE);
	LoadConfig();
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
开发者ID:lx3389,项目名称:BindImage,代码行数:21,代码来源:ImagePack.cpp

示例4: LoadConfig

// Called before render is available
bool j1App::Awake()
{
	bool ret = LoadConfig();

	if (ret == true)
	{
		p2List_item<j1Module*>* item;
		item = modules.start;

		while (item != NULL && ret == true)
		{
			// TODO 1: Every awake to receive a xml node with their section of the config file if exists

			ret = item->data->Awake(config.child(item->data->name.GetString()));
			item = item->next;
		}

	}

	return ret;
}
开发者ID:weprikjm,项目名称:DevSegonaClasse,代码行数:22,代码来源:j1App.cpp

示例5: LoadConfig

INT_PTR MainDlg::OnLoadProfile( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
    std::wstring path;
#ifdef USE64
    if (OpenSaveDialog( L"Xenos profiles (*.xpr64)\0*.xpr64\0", 1, path ))
#else
    if (OpenSaveDialog( L"Xenos profiles (*.xpr)\0*.xpr\0", 1, path ))
#endif
    {
        // Reset loaded images
        _profileMgr.config().images.clear();
        _images.clear();
        _modules.reset();
        _exports.clear();

        LoadConfig( path );
        _status.SetText( 0, blackbone::Utils::StripPath( path ) );
    }

    return TRUE;
}
开发者ID:CodeBlueDev,项目名称:Xenos,代码行数:21,代码来源:MainDlg.cpp

示例6: while

	bool Graphics::Initialise(void)
		/* Initialises the graphics engine with the configuration in graphics.config */	
	{
		while (running){
			// Possible freeze spot if renderloop stops responding
			if (!locked && !kill)
			{
				locked = true;
				kill = true;
				locked = false;
			}
			Delay();
		}

		LoadConfig();
		SDL_Init(INIT_FLAGS);
		SDL_SetVideoMode(res.x, res.y, 0, VIDEO_FLAGS);
		LoadAssets();

		// Need to start renderloop thread
	}
开发者ID:FearlessHornet,项目名称:PotatoGraphics,代码行数:21,代码来源:PotatoGraphics.cpp

示例7: LoadConfig

// Called before render is available
bool j1App::Awake()
{
	bool ret = LoadConfig();
	// self-config
	title.create(app_config.child("title").child_value());
	organization.create(app_config.child("organization").child_value());

	if(ret == true)
	{
		p2List_item<j1Module*>* item;
		item = modules.start;

		while(item != NULL && ret == true)
		{
			const char* debug = item->data->name.GetString();
			ret = item->data->Awake(config.child(item->data->name.GetString()));
			item = item->next;
		}
	}

	return ret == true;
}
开发者ID:DRed96,项目名称:GameDevelopment,代码行数:23,代码来源:j1App.cpp

示例8: new

    void ToastEngine::run()
    {
        g_config = new (std::nothrow)toast::SystemConfig;
        LoadConfig(Daemon::Instance()->config);

        int lastTime = time(NULL);
        // initlize global varables 
        Initlize();

        // Create agent response thread;
        g_agent_response_threads = MultiWorkQueueThreadPool::Create(g_config->num_response_process_threads,  NULL);

        CreateFunctionalThreads();

        Log::Debug("All the thread created " );
        while(false==Daemon::Instance()->IsStop())
        {
            int now = time(NULL);
            usleep(1000000);
        }
        KillThreads(m_OtherThreadPool);
    }
开发者ID:ikewang,项目名称:toast,代码行数:22,代码来源:ToastEngine.cpp

示例9: iUpdateable

cPreMenu::cPreMenu(cInit *apInit)  : iUpdateable("PreMenu")
{
	mpInit = apInit;
	mpDrawer = mpInit->mpGame->GetGraphics()->GetDrawer();

	//Load fonts
	mpFont = mpInit->mpGame->GetResources()->GetFontManager()->CreateFontData("verdana.fnt");
	mpTextFont = mpInit->mpGame->GetResources()->GetFontManager()->CreateFontData("font_computer.fnt");
	
	//Load config file
	LoadConfig();

	//Load text
	tWString sText = kTranslate("MainMenu", "PreMenuText");
	mpTextFont->GetWordWrapRows(750, 19,17,sText,&mvTextRows);
	
	mlMaxChars =0;
	for(size_t i=0; i < mvTextRows.size(); ++i)
		mlMaxChars += (int)mvTextRows[i].length();

	Reset();
}
开发者ID:ArchyInf,项目名称:PenumbraOverture,代码行数:22,代码来源:PreMenu.cpp

示例10: main

int main ( int argc, char **argv ) {
 cmdline.Decipher(argc,argv);
 LoadConfig();
 OUTPUT("Initializing server.\n");
 // This has to be here so broken connections don't end the application.
 signal( SIGPIPE, SIG_IGN );
 if ( signal( SIGINT, signal_handler ) == SIG_ERR ) {
  OUTPUT("Unable to capture SIGINT - Ctrl-C will cause hard shutdown\n");
 }
 int main_port=cfg.integer("paths","main"); if ( !cfg.found ) main_port=3333;
 int rwho_port=cfg.integer("paths","rwho"); if ( !cfg.found ) rwho_port=0;
 int aux_port =cfg.integer("paths","aux" ); if ( !cfg.found ) aux_port=0;
 if ( signalled_abort ) return 0;
 server = new Server( rwho_port, main_port, aux_port );
 while ( !server->shutdown ) {
  timekeeper.Between();
  server->Between();
 }
 OUTPUT("Shutting down.\n");
 server->Shutdown();
 return 0;
}
开发者ID:h3rb,项目名称:pulp,代码行数:22,代码来源:pulp.cpp

示例11: LoadConfig

bool AuctionBotBuyer::Initialize()
{
    LoadConfig();

    bool activeHouse = false;
    for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i)
    {
        if (_houseConfig[i].BuyerEnabled)
        {
            activeHouse = true;
            break;
        }
    }

    if (!activeHouse)
        return false;

    // load Check interval
    _checkInterval = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_RECHECK_INTERVAL) * MINUTE;
    TC_LOG_DEBUG("ahbot", "AHBot buyer interval is %u minutes", _checkInterval / MINUTE);
    return true;
}
开发者ID:DanielBallaSZTE,项目名称:TrinityCorePreWOTLK,代码行数:22,代码来源:AuctionHouseBotBuyer.cpp

示例12: OpenSynth

/* -----------------------------------------------------------------------------*/
Boolean OpenSynth() 
{
        DriverDataPtr data = GetData ();
   
        /* use MidiShare audio buffer size*/ 
        data->buffersize = LoadBufferSize();
        data->soundfont = LoadConfig("Configuration", "SoundFont", GetProfileFullName(kProfileName),kDefaultSoundFont);
       
	if (open_iiwusynth()) {
             LoadSlot ("Output Slots", GetProfileFullName(kProfileName),SynthDriverName);
             return true;
        }else {
             /* tries to use default soundfont */
            data->soundfont = kDefaultSoundFont;
            if (open_iiwusynth()) {
                LoadSlot ("Output Slots", GetProfileFullName(kProfileName),SynthDriverName);
                return true;
            }else{
                return false;
            }
	}
}
开发者ID:AntonLanghoff,项目名称:whitecatlib,代码行数:23,代码来源:msSynthDriver.c

示例13: panel_

Game::Game() :
	panel_(ControlPanel::GetInstance()),
	message_(GET_BITMAP_FONT("retro")),
	controller_(InputController::GetInstance())
{
	Log::SetLogger(new LogDebug());
	LoadConfig(CONFIG_FILE);

	app_.Create(sf::VideoMode(APP_WIDTH, APP_HEIGHT, APP_BPP), APP_TITLE, APP_STYLE);
	app_.SetFramerateLimit(options_.fps);

	const sf::Image& icon = GET_IMG("icon");
	app_.SetIcon(icon.GetWidth(), icon.GetHeight(), icon.GetPixelsPtr());

#ifndef NO_SPLASH
	Splash splash(app_);
	if (!splash.Run())
	{
		exit(EXIT_SUCCESS);
	}
#endif

#ifdef CONSOLE_TEST
	log_ = new LogConsole();
	Log::SetLogger(log_);
#endif

	if (options_.panel_on_top)
	{
		map_.SetPosition(0, ControlPanel::HEIGHT_PX);
	}
    else
    {
		panel_.SetPosition(0, Zone::HEIGHT_PX);
    }

    option_win_ = new Option;
}
开发者ID:charafsalmi,项目名称:ppd-paris-descartes,代码行数:38,代码来源:Game.cpp

示例14: AddLocaleCatalog

int aisradar_pi::Init(void) {
    AddLocaleCatalog( _T("opencpn-aisradar_pi") );
    m_radar_frame_x = m_radar_frame_y = 0;
    m_radar_frame_sx = m_radar_frame_sy = 200;
    m_pRadarFrame = 0;
    m_lat= m_lon=0.;
    m_cog= m_sog=0.;
    m_sats=0;
    ::wxDisplaySize(&m_display_width, &m_display_height);
    m_pconfig = GetOCPNConfigObject();
    LoadConfig();
    if (AisTargets) {  // Init may be called more than once, check for cleanup
        WX_CLEAR_ARRAY(*AisTargets);     
        delete AisTargets;
	}
	AisTargets = GetAISTargetArray();
    m_parent_window = GetOCPNCanvasWindow();
    if(m_radar_show_icon) {
        m_leftclick_tool_id  = InsertPlugInTool(_T(""), 
            _img_radar, 
            _img_radar, 
            wxITEM_NORMAL, 
			wxString::Format(_T("AIS Radar View %d.%d"), 
                PLUGIN_VERSION_MAJOR, 
                PLUGIN_VERSION_MINOR
            ), 
			_T(""), 
            0,
            RADAR_TOOL_POSITION, 
            0,
            this
        );
    }
    return (WANTS_TOOLBAR_CALLBACK | INSTALLS_TOOLBAR_TOOL |
         WANTS_CONFIG | WANTS_PREFERENCES | WANTS_AIS_SENTENCES  |
         WANTS_NMEA_EVENTS | WANTS_PLUGIN_MESSAGING | USES_AUI_MANAGER
    );
}
开发者ID:Verezano,项目名称:radar_pi,代码行数:38,代码来源:aisradar_pi.cpp

示例15: main

int
main (int argc, char **argv)
{
	/* Save our program name - for error messages */
	set_DeadPipe_handler(DeadPipe);
    InitMyApp (CLASS_AUDIO, argc, argv, NULL, NULL, 0 );
	LinkAfterStepConfig();

    ConnectX( ASDefaultScr, PropertyChangeMask );
    ConnectAfterStep ( mask_reg, 0 );
	
	Config = CreateAudioConfig();
	
	LOCAL_DEBUG_OUT("parsing Options ...%s","");
    LoadBaseConfig (GetBaseOptions);
	LoadColorScheme();
    LoadConfig ("audio", GetOptions);

#ifdef HAVE_RPLAY_H
	memset( rplay_table, 0x00, sizeof(RPLAY *)*MAX_SOUNDS);
#endif
	memset( sound_table, 0x00, sizeof(char *)*MAX_SOUNDS);

	if (!SetupSound ())
	{
		show_error("Failed to initialize sound playing routines. Please check your config.");
		return 1;
	}

	/*
	 * Play the startup sound.
	 */
	audio_play (EVENT_Startup);
	SendInfo ( "Nop", 0);
    HandleEvents();

	return 0;
}
开发者ID:Remmy,项目名称:afterstep,代码行数:38,代码来源:Audio.c


注:本文中的LoadConfig函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。