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


C++ InitConfig函数代码示例

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


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


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