• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ InitConfig函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: TEST_F

TEST_F(MallocDebugConfigTest, free_track_backtrace_num_frames_zero) {
  ASSERT_TRUE(InitConfig("free_track_backtrace_num_frames=0")) << getFakeLogPrint();

  ASSERT_EQ(0U, config->options);
  ASSERT_EQ(0U, config->free_track_backtrace_num_frames);

  ASSERT_STREQ("", getFakeLogBuf().c_str());
  ASSERT_STREQ("", getFakeLogPrint().c_str());
}
开发者ID:multi-os-engine,项目名称:platform_bionic,代码行数:9,代码来源:malloc_debug_config_tests.cpp


示例2: maincsm_onmessage

int maincsm_onmessage(CSM_RAM* data, GBS_MSG* msg)
{	
	if (msg->msg == MSG_RECONFIGURE_REQ)
	{
		if (strcmp_nocase(successed_config_filename, (char*)msg->data0) == 0)
			InitConfig();
	}
	return 1;
}
开发者ID:FTCr,项目名称:Siemens,代码行数:9,代码来源:main.c


示例3: TEST_F

TEST_F(MallocDebugConfigTest, free_track_backtrace_num_frames_max_error) {
  ASSERT_FALSE(InitConfig("free_track_backtrace_num_frames=400"));

  ASSERT_STREQ("", getFakeLogBuf().c_str());
  std::string log_msg(
      "6 malloc_debug malloc_testing: bad value for option 'free_track_backtrace_num_frames', "
      "value must be <= 256: 400\n");
  ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str());
}
开发者ID:mnemonyc,项目名称:platform_bionic,代码行数:9,代码来源:malloc_debug_config_tests.cpp


示例4: init

static void init()
{
	decoder_ = FLAC__file_decoder_new();
	strcpy(lastfn_, "");

	InitConfig();
	ReadConfig();
	InitInfobox();
}
开发者ID:Erikhht,项目名称:TCPMP,代码行数:9,代码来源:in_flac.c


示例5: m_name

Scorer::Scorer(const string& name, const string& config)
  : m_name(name),
    m_vocab(mert::VocabularyFactory::GetVocabulary()),
#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
    m_filter(NULL),
#endif
    m_score_data(NULL),
    m_enable_preserve_case(true)
{
  InitConfig(config);
}
开发者ID:Deseaus,项目名称:mosesdecoder,代码行数:11,代码来源:Scorer.cpp


示例6: TEST

TEST(Config, SpecialSectionValues) {
    InitConfig("data/s3test.conf", "special_over");

    EXPECT_EQ(8, s3ext_threadnum);
    EXPECT_EQ(128 * 1024 * 1024, s3ext_chunksize);
    EXPECT_EQ(10240, s3ext_low_speed_limit);
    EXPECT_EQ(60, s3ext_low_speed_time);

    EXPECT_TRUE(s3ext_encryption);
    EXPECT_FALSE(s3ext_debug_curl);
}
开发者ID:happyjoblzp,项目名称:gpdb,代码行数:11,代码来源:s3conf_test.cpp


示例7: Init

	BOOL Init()
	{
		InitConfig( );
		InitDafaultConfig( "./ServerConfig.ini" );
		Printf( m_ddesc[0] );
		Printf( m_ddesc[1] );
		
		SetServerType(AGENT_SERVER);
		LoadServerConfig( "./ServerConfig.ini" );
		Printf( m_desc[0] );
		Printf( m_desc[1] );
		return TRUE;
	}
开发者ID:hujb1983,项目名称:DouDiZhu,代码行数:13,代码来源:main.cpp


示例8: LoadConfig

//******************************************************************************
// load parameters from the registry
//******************************************************************************
void LoadConfig(sbtray_parms * p)
{
	LONG err;
	HKEY hKey;
	DWORD value;
	DWORD value_size;

#define REGLOAD_DWORD(vn,vv) \
		value_size = sizeof(DWORD); \
		err = RegQueryValueEx(hKey,vn,0,0, \
					(LPBYTE)&value,&value_size); \
		if ((err == ERROR_SUCCESS) && (value_size == sizeof(DWORD))) \
		{ \
			vv = value; \
		}

#define REGLOAD_STR(vn,vv) \
		ZeroMemory(vv,SBTRAY_PARMS_STRLEN+1); \
		value_size = SBTRAY_PARMS_STRLEN+1; \
		err = RegQueryValueEx(hKey,vn,0,0, \
					(LPBYTE)vv,&value_size); \
		if (err != ERROR_SUCCESS) \
		{ \
			vv[0] = '\0'; \
		}

	// sanity check
	if (!p)
		return;

	InitConfig(p);

	err = RegOpenKeyEx(HKEY_CURRENT_USER,TOPLEVEL_REGKEY,
				0,KEY_READ,&hKey);
	if (err == ERROR_SUCCESS)
	{
		REGLOAD_DWORD( REGVALUE_ENABLESOUNDS,  p->bEnableSounds )
		REGLOAD_DWORD( REGVALUE_UPDATEPERIOD,  p->dwUpdatePeriod )
		REGLOAD_DWORD( REGVALUE_ENABLELOGGING, p->bEnableLogging )
		REGLOAD_DWORD( REGVALUE_ENABLEEMAIL,   p->bEnableEmail )
		REGLOAD_STR(   REGVALUE_SMTPSERVER,    p->szSMTPServer )
		REGLOAD_STR(   REGVALUE_MAILFROM,      p->szMailFrom )
		REGLOAD_STR(   REGVALUE_MAILTO,        p->szMailTo )
		REGLOAD_DWORD( REGVALUE_SELECTEDWORLD, p->dwSelectedWorld )

		RegCloseKey(hKey);
	}
	
	return;
}
开发者ID:davecalkins,项目名称:sbtray,代码行数:53,代码来源:sbtray_config.cpp


示例9: TEST_F

TEST_F(MallocDebugConfigTest, front_guard) {
  ASSERT_TRUE(InitConfig("front_guard=48"));
  ASSERT_EQ(FRONT_GUARD, config->options);
  ASSERT_EQ(48U, config->front_guard_bytes);

  ASSERT_TRUE(InitConfig("front_guard"));
  ASSERT_EQ(FRONT_GUARD, config->options);
  ASSERT_EQ(32U, config->front_guard_bytes);

  ASSERT_TRUE(InitConfig("front_guard=39"));
  ASSERT_EQ(FRONT_GUARD, config->options);
#if defined(__LP64__)
  ASSERT_EQ(48U, config->front_guard_bytes);
#else
  ASSERT_EQ(40U, config->front_guard_bytes);
#endif

  ASSERT_TRUE(InitConfig("front_guard=41"));
  ASSERT_EQ(FRONT_GUARD, config->options);
  ASSERT_EQ(48U, config->front_guard_bytes);

  ASSERT_STREQ("", getFakeLogBuf().c_str());
  ASSERT_STREQ("", getFakeLogPrint().c_str());
}
开发者ID:316181444,项目名称:platform_bionic,代码行数:24,代码来源:malloc_debug_config_tests.cpp


示例10: Init

bool MSystem::Init()
{
    if(!InitConfig())
    {
        return false;
    }

    InitDebug();
    InitLog();

    MISEISINFO("*********************************************");
    MISEISINFO("MSWA start");

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:15,代码来源:msystem.cpp


示例11: main

int main (char *exename, char *fname)
{
    MAIN_CSM main_csm;
    LockSched();
    UpdateCSMname();
    CreateCSM(&MAINCSM.maincsm,&main_csm,0);
    UnlockSched();

    InitConfig(ELF_NAME);

    GetFileDir (exename, dir);

    //SetCurFile (fname);

    return 0;
}
开发者ID:andr7e,项目名称:siemens,代码行数:16,代码来源:main.cpp


示例12: writer_init

// invoked by s3_export(), need to be exception safe
GPWriter* writer_init(const char* url_with_options, const char* format) {
    GPWriter* writer = NULL;
    s3extErrorMessage.clear();

    try {
        if (!url_with_options) {
            return NULL;
        }

        string urlWithOptions(url_with_options);

        S3Params params = InitConfig(urlWithOptions);

        InitRemoteLog();

        // Prepare memory to be used for thread chunk buffer.
        PrepareS3MemContext(params);

        string extName = params.isAutoCompress() ? string(format) + ".gz" : format;
        writer = new GPWriter(params, extName);
        if (writer == NULL) {
            return NULL;
        }

        memoryContextHolder = new S3MemoryContext(params.getMemoryContext());

        writer->open(params);
        return writer;
    } catch (S3Exception& e) {
        if (writer != NULL) {
            delete writer;
            delete memoryContextHolder;
        }
        s3extErrorMessage =
            "writer_init caught a " + e.getType() + " exception: " + e.getFullMessage();
        S3ERROR("writer_init caught %s: %s", e.getType().c_str(), s3extErrorMessage.c_str());
        return NULL;
    } catch (...) {
        if (writer != NULL) {
            delete writer;
            delete memoryContextHolder;
        }
        S3ERROR("Caught an unexpected exception.");
        s3extErrorMessage = "Caught an unexpected exception.";
        return NULL;
    }
}
开发者ID:50wu,项目名称:gpdb,代码行数:48,代码来源:gpwriter.cpp


示例13: main

int main(){
	//GLFWの初期化
	if (!Initialize_GLFW()){
		return 1;
	}

	//ウインドウを作成する
	Window::CreateWindowStart(1024, 768, "Test!");

	//GLEWの初期化
	if (!Initialize_GLEW()){
		return 1;
	}

	//初期設定=========================================
	
	InitConfig();
	//ウィンドウ、シーケンスコントローラーを作成
	InputManager::SetMyWindow(Window::GetWindow());
	if (!SeaquenceController::instance()){
		SeaquenceController::Create();
	}
	// ウィンドウ全体をビューポートにする
	glViewport(0, 0, Window::Get_w(), Window::Get_h());
	//描画関連の設定(かえることがあれば他から設定できるように移す)
	ConfingDraw();

	//=================================================

	//描画処理=========================================

	while (Window::ShouldClose() == GL_FALSE){
		// 画面消去
		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

		//シーケンスコントローラーが全てのUpdate、描画を管理する
		SeaquenceController::instance()->Update();

		//バッファを入れ替える
		Window::SwapBuffers();
	}

	//=================================================
	//終わった時の処理
	atexit(Cleanup);
	return 0;
}
开发者ID:SNGIN,项目名称:GraphicsStudy,代码行数:47,代码来源:main.cpp


示例14: InitConfig

NTSTATUS CWdfQueue::Create(CWdfDevice &Device)
{
    WDF_IO_QUEUE_CONFIG      QueueConfig;
    WDF_OBJECT_ATTRIBUTES    Attributes;

    InitConfig(QueueConfig);
    SetCallbacks(QueueConfig);

    WDF_OBJECT_ATTRIBUTES_INIT(&Attributes);
    Attributes.ExecutionLevel = m_ExecutionLevel;

    auto status = Device.AddQueue(QueueConfig, Attributes, m_Queue);
    if (!NT_SUCCESS(status)) {
        TraceEvents(TRACE_LEVEL_ERROR, TRACE_WDFDEVICE, "%!FUNC! failed %!STATUS!", status);
    }

    return status;
}
开发者ID:SPICE,项目名称:win32-usbdk,代码行数:18,代码来源:WdfDevice.cpp


示例15: TEST

TEST(ListBucket, s3) {
    InitConfig("test/s3.conf", "default");

    S3Credential g_cred = {s3ext_accessid, s3ext_secret};

    ListBucketResult *r =
        ListBucket("https", S3HOST, S3BUCKET, S3PREFIX, g_cred);

    ASSERT_NE(r, (void *)NULL);
    EXPECT_EQ(r->contents.size(), 16);

    char urlbuf[256];
    vector<BucketContent *>::iterator i;
    for (i = r->contents.begin(); i != r->contents.end(); i++) {
        BucketContent *p = *i;
        sprintf(urlbuf, "http://%s/%s/%s", S3HOST, S3BUCKET, p->Key().c_str());
        printf("%s, %d\n", urlbuf, p->Size());
    }

    delete r;
}
开发者ID:leitianqi800,项目名称:gpdb,代码行数:21,代码来源:S3Downloader_test.cpp


示例16: TEST

TEST(Config, basic) {
    InitConfig("test/s3test.conf", "");

    EXPECT_STREQ("secret_test", s3ext_secret.c_str());
    EXPECT_STREQ("accessid_test", s3ext_accessid.c_str());
    EXPECT_STREQ("ABCDEFGabcdefg", s3ext_token.c_str());

#ifdef DEBUG_S3
    EXPECT_EQ(0, s3ext_segid);
    EXPECT_EQ(1, s3ext_segnum);
#endif

    EXPECT_EQ(6, s3ext_threadnum);
    EXPECT_EQ(64 * 1024 * 1024 + 1, s3ext_chunksize);

    EXPECT_EQ(EXT_DEBUG, s3ext_loglevel);
    EXPECT_EQ(STDERR_LOG, s3ext_logtype);

    EXPECT_EQ(1111, s3ext_logserverport);
    EXPECT_STREQ("127.0.0.1", s3ext_logserverhost.c_str());
    EXPECT_STREQ("'/tmp/abcde'", s3ext_logpath.c_str());
}
开发者ID:AnLingm,项目名称:gpdb,代码行数:22,代码来源:s3conf_test.cpp


示例17: InitConfig

bool wd::Application::Initialize(
	const HINSTANCE& hInstance,
	const int& nCmdShow)
{
	// Init config file - get global settings.
	InitConfig();

	// Create OS window.
	if (!InitWindow(hInstance, nCmdShow))
		return false;

	// Create video device and context.
	if (!InitVideoDevice())
		return false;

	InitInput();
	// Show window. By now we should be able to show some sort of loading screen.
	m_pWindow->Show();
	// Create scene.
	InitScene();

	return true;
}
开发者ID:WinterDog,项目名称:Shegelmetris,代码行数:23,代码来源:Application.cpp


示例18: main

int main(const char *exe_path, const char *file_path)
{
	if (InitLang(cfg_lang_path, &lgp) == -1)
	{
		MsgBoxError(1, (int)"lang.txt not found!");
		kill_elf();
	}
	else
	{
		CSM_RAM *save_cmpc;
		char dummy[sizeof(MAIN_CSM)];
		LockSched();
		UpdateCSMname();
		InitConfig();
		save_cmpc = CSM_root()->csm_q->current_msg_processing_csm;
		CSM_root()->csm_q->current_msg_processing_csm = CSM_root()->csm_q->csm.first;
		CreateCSM(&MAINCSM.maincsm,dummy,0);
		CSM_root()->csm_q->current_msg_processing_csm = save_cmpc;
		UnlockSched();
		AddKeybMsgHook((void*)KeyHook);
	}
	return 0;
}
开发者ID:FTCr,项目名称:Siemens,代码行数:23,代码来源:main.c


示例19: ExtWrapperTest

void ExtWrapperTest(const char *url, uint64_t buffer_size, const char *md5_str,
                    int segid, int segnum, uint64_t chunksize) {
    InitConfig("test/s3.conf", "default");

    s3ext_segid = segid;
    s3ext_segnum = segnum;

    MD5Calc m;
    S3ExtBase *myData;
    uint64_t nread = 0;
    uint64_t buf_len = buffer_size;
    char *buf = (char *)malloc(buffer_size);

    ASSERT_NE((void *)NULL, buf);

    if (strncmp(url, "http://localhost/", 17) == 0) {
        myData = new S3Reader_fake(url);
    } else {
        myData = new S3Reader(url);
    }

    ASSERT_NE((void *)NULL, myData);
    ASSERT_TRUE(myData->Init(segid, segnum, chunksize));

    while (1) {
        nread = buf_len;
        ASSERT_TRUE(myData->TransferData(buf, nread));
        if (nread == 0) break;
        m.Update(buf, nread);
    }

    EXPECT_STREQ(md5_str, m.Get());
    myData->Destroy();
    delete myData;
    free(buf);
}
开发者ID:addisonhuddy,项目名称:gpdb,代码行数:36,代码来源:S3ExtWrapper_test.cpp


示例20: main

int main(int argc, char **argv)
{
	struct passwd	*pw;
	unsigned int	seq;

	InitConfig();

	pw = getpwuid(getuid());

	InitClient(pw->pw_name, (char *)"ftnseq", CFG.location, CFG.logfile, 
		CFG.util_loglevel, CFG.error_log, CFG.mgrlog, CFG.debuglog);

	Syslog(' ', " "); 
	Syslog(' ', "FTNSEQ v%s", VERSION);

	seq = sequencer();
	Syslog('+', "Sequence string %08lx", seq);
	printf("%08x", seq);
	fflush(stdout);

	Syslog(' ', "FTNSEQ finished");
	ExitClient(0);
	return 0;
}
开发者ID:ftnapps,项目名称:FTNd,代码行数:24,代码来源:ftnseq.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ InitConsole函数代码示例发布时间:2022-05-30
下一篇:
C++ InitCommonControlsEx函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap