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

C++ AppInit函数代码示例

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

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



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

示例1: main

int main(int argc, char* argv[])
{
    for (int i = 1; i < argc; i++)
        if (!IsSwitchChar(argv[i][0]))
            fCommandLine = true;
    fDaemon = !fCommandLine;

#ifdef __WXGTK__
    if (!fCommandLine)
    {
        // Daemonize
        pid_t pid = fork();
        if (pid < 0)
        {
            fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno);
            return 1;
        }
        if (pid > 0)
            pthread_exit((void*)0);
    }
#endif

    if (!AppInit(argc, argv))
        return 1;

    while (!fShutdown)
        Sleep(1000000);
    return 0;
}
开发者ID:DarrellDuane,项目名称:bitcoin,代码行数:29,代码来源:init.cpp


示例2: AppMain

void AppMain()
{
    AppInit(1280, 720, "silver-winner");

    for (;;)
    {
        MSG msg;
        while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
        {
            TranslateMessage(&msg);
            DispatchMessageW(&msg);
        }

        if (g_App.bShouldClose)
        {
            break;
        }

        ImGui_ImplDX11_NewFrame();

        RendererPaint();
    }

    AppExit();
}
开发者ID:nlguillemot,项目名称:silver-winner,代码行数:25,代码来源:app.cpp


示例3: AppInit

void VAppBase::Execute(VAppImpl* pImpl)
{
  // Early out in case one of the startup modules triggered a quit
  if (WantsToQuit())
    return;

  if(pImpl == NULL)
  {
    hkvLog::FatalError("No implmentation found!");
    return;
  }
  
  m_pAppImpl = pImpl;
	Vision::SetApplication(this);

  // On callback based platforms the remaining code of the execute function
  // is triggered via the corresponding platform specific functions
  if (IsCallbackBased())
    return;

  AppInit();
  {
    // Main application loop (non callback based platforms only)
    bool bRun = true;
    while (bRun)
    {
      bRun = AppRun();
    }
  }
  AppDeInit();
}
开发者ID:Niobij,项目名称:AnarchoidTemplate,代码行数:31,代码来源:VAppBase.cpp


示例4: WinMain

int PASCAL WinMain (HINSTANCE instance_in, HINSTANCE previous_instance,
  LPSTR command_line, int show_style)
{

 	MSG		  msg;

  instance = instance_in;
  WinInit ();
  AppInit ();
  while (!quit) {
		if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))	{
			if (msg.message == WM_QUIT)
				quit = true;
			else {
				TranslateMessage(&msg);
				DispatchMessage(&msg);
			}
    } else
      AppUpdate ();

  }
  AppTerm ();
  return 0;

}
开发者ID:livibetter-backup,项目名称:pixel-city,代码行数:25,代码来源:Win.cpp


示例5: main

int     main() /** no params because they're not used */
{
    // Acronyms acr;
    // AcronymsInit(&acr);
    // acr.activate(&acr, (e_acronyms)4);
    // acr.activate(&acr, (e_acronyms)5);
    // acr.activate(&acr, (e_acronyms)1);
    // acr.activate(&acr, (e_acronyms)0);
    // for (int i = 0; i < 12; i++)
    // {
    //     std::cout << "[" << i << "] " << acr.names[i] << " = ";
    //     std::cout << (acr.selected[i] ? "(true)" : "(false)") << std::endl;
    // }
    // std::cout << acr.ToString(&acr) << std::endl;
    // std::cout << acr.CSVFormatter(&acr) << std::endl;
    // std::cout << acr.CountSelected(&acr) << std::endl;
    // std::cout << acr << std::endl;

    Application app;

    //todo();

    AppInit(&app); /** initialisation of the `app` structure and reading data from file*/
    app.Start(&app); /** start of the inifinite loop in the function `loop` */
    app.Loop(&app); /** execution of the infinite loop */

    AppDestroy(&app); /** cleaning of the structure and saving data */
    return (EXIT_SUCCESS);
}
开发者ID:pantzerbrendan,项目名称:uqar,代码行数:29,代码来源:main.cpp


示例6: main

int main(void)
{

	BYTE	stBtn1;
	BYTE	stBtn2;

	DeviceInit();
	AppInit();

        
        while(stBtn1!=stPressed && stBtn2!=stPressed)
        {
            mT5IntEnable(fFalse);
            stBtn1 = btnBtn1.stBtn;
            stBtn2 = btnBtn2.stBtn;
            mT5IntEnable(fTrue);
        }

        RightReverse;
        LeftReverse;
        SetLeftSpeed(dtcMtrMedium);
        SetRightSpeed(dtcMtrMedium);

        mCNIntEnable(fTrue);	//Sensors will trigger
        while(fTrue);
}
开发者ID:notbryant,项目名称:project-stupid-robot,代码行数:26,代码来源:main.c


示例7: RunSharkfund

std::tuple<bool, boost::thread*> RunSharkfund(int argc, char* argv[])
{
	boost::thread* detectShutdownThread = NULL;
	static boost::thread_group threadGroup;
	SetupEnvironment();

	bool fRet = false;

	// Connect Dacrsd signal handlers
	noui_connect();

	fRet = AppInit(argc, argv,threadGroup);

	detectShutdownThread = new boost::thread(boost::bind(&DetectShutdownThread, &threadGroup));

	if (!fRet) {
		if (detectShutdownThread)
			detectShutdownThread->interrupt();

		threadGroup.interrupt_all();

		// threadGroup.join_all(); was left out intentionally here, because we didn't re-test all of
		// the startup-failure cases to make sure they don't result in a hang due to some
		// thread-blocking-waiting-for-another-thread-during-startup case
	}
  return std::make_tuple (fRet,detectShutdownThread);
}
开发者ID:sharkfund001,项目名称:sharkfund,代码行数:27,代码来源:sharkfundd.cpp


示例8: main

int main(int argc, char* argv[])
{
    bool fRet = false;
    fRet = AppInit(argc, argv);

    if (fRet && fDaemon)
        pthread_exit((void*)0);
}
开发者ID:dmp1ce,项目名称:namecoin,代码行数:8,代码来源:init.cpp


示例9: main

int main(int argc, char* argv[])
{
    SetupEnvironment();

    // Connect bitcoind signal handlers
    noui_connect();

    return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
}
开发者ID:SolidXPartners,项目名称:bitcoin,代码行数:9,代码来源:bitcoind.cpp


示例10: main

int main(int argc, char* argv[])
{
    SetupEnvironment();

    // Connect bitcoind signal handlers
    noui_connect();

    return (AppInit(argc, argv) ? 0 : 1);
}
开发者ID:florincoin,项目名称:florincoin,代码行数:9,代码来源:bitcoind.cpp


示例11: NativeException

void NativeApplication::Initialize(float vertOffset, float rotStep)
{
	if (rotStep > 10.0f)
		throw NativeException("too big rotation step!");

	rotStep *= 2.0f * 3.14159265359f / 360.0f;
	AppInit(vertOffset, rotStep);
	GenerateVertexData();
}
开发者ID:vbasanovic,项目名称:Monre,代码行数:9,代码来源:NativeApplication.cpp


示例12: main

int main(int argc, char* argv[])
{
    bool fRet = false;
    fRet = AppInit(argc, argv);

    if (fRet && fDaemon)
        return 0;

    return 1;
}
开发者ID:fconcklin,项目名称:namecoin,代码行数:10,代码来源:init.cpp


示例13: Init

void Init() {
    Uart.Init(115200);
    Uart.Printf("usb AHB=%u; APB1=%u; APB2=%u; UsbSdio=%u\r\n", Clk.AHBFreqHz, Clk.APB1FreqHz, Clk.APB2FreqHz, Clk.UsbSdioFreqHz);
    Usb.Init();
    Usb.Disconnect();
    chThdSleepMilliseconds(999);
    Usb.Connect();
    // Application init
    AppInit();
}
开发者ID:Kreyl,项目名称:nute,代码行数:10,代码来源:main.cpp


示例14: main

int main(int argc, char* argv[])
{
    RegisterPrettyTerminateHander();
    RegisterPrettySignalHandlers();

    SetupEnvironment();

    // Connect dashd signal handlers
    noui_connect();

    return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
}
开发者ID:dashpay,项目名称:dash,代码行数:12,代码来源:dashd.cpp


示例15: main

int main(int argc, char* argv[])
{
    bool fRet = false;

    // Connect darksilkd signal handlers
    noui_connect();

    fRet = AppInit(argc, argv);

    if (fRet && fDaemon)
        return 0;

    return (fRet ? 0 : 1);
}
开发者ID:kevinjulio,项目名称:fantom,代码行数:14,代码来源:darksilkd.cpp


示例16: main

int main(int argc, char* argv[])
{
    bool fRet = false;
    fHaveGUI = false;
    
    // Connect vtorrentd signal handlers
    noui_connect();
    
    fRet = AppInit(argc, argv);
    
    if (fRet && fDaemon)
        return 0;
    
    return (fRet ? 0 : 1);
};
开发者ID:vtorrent,项目名称:vTorrent-Client,代码行数:15,代码来源:vtorrentd.cpp


示例17: main

int main(int argc, char* argv[])
{
    SetupEnvironment();

    bool fRet = false;

    // Connect bitcoind signal handlers
    noui_connect();

    fRet = AppInit(argc, argv);

    if (fRet && fDaemon)
        return 0;

    return (fRet ? 0 : 1);
}
开发者ID:SheffCrypto,项目名称:ACoin-Acoin,代码行数:16,代码来源:bitcoind.cpp


示例18: main

int main(int argc, char* argv[])
{
    bool fRet = false;
    fHaveGUI = false;

    //GenesisMiner();

    // Connect bitcoind signal handlers
    noui_connect();

    fRet = AppInit(argc, argv);

    if (fRet && fDaemon)
        return 0;

    return (fRet ? 0 : 1);
}
开发者ID:Pylipala,项目名称:twister-core,代码行数:17,代码来源:bitcoind.cpp


示例19: Java_emu_project64_jni_NativeExports_appInit

EXPORT jboolean CALL Java_emu_project64_jni_NativeExports_appInit(JNIEnv* env, jclass cls, jstring BaseDir)
{
    if (g_Logger == NULL)
    {
        g_Logger = new AndroidLogger();
    }
    TraceAddModule(g_Logger);

    Notify().DisplayMessage(10, "    ____               _           __  _____ __ __");
    Notify().DisplayMessage(10, "   / __ \\_________    (_)__  _____/ /_/ ___// // /");
    Notify().DisplayMessage(10, "  / /_/ / ___/ __ \\  / / _ \\/ ___/ __/ __ \\/ // /_");
    Notify().DisplayMessage(10, " / ____/ /  / /_/ / / /  __/ /__/ /_/ /_/ /__  __/");
    Notify().DisplayMessage(10, "/_/   /_/   \\____/_/ /\\___/\\___/\\__/\\____/  /_/");
    Notify().DisplayMessage(10, "                /___/");
    Notify().DisplayMessage(10, "http://www.pj64-emu.com/");
    Notify().DisplayMessage(10, stdstr_f("%s Version %s", VER_FILE_DESCRIPTION_STR, VER_FILE_VERSION_STR).c_str());
    Notify().DisplayMessage(10, "");

    if (g_JavaVM == NULL)
    {
        Notify().DisplayError("No java VM");
        return false;
    }

    const char *baseDir = env->GetStringUTFChars(BaseDir, 0);
    bool res = AppInit(&Notify(), baseDir, 0, NULL);

    env->ReleaseStringUTFChars(BaseDir, baseDir);
    if (res)
    {
        g_JavaBridge = new JavaBridge(g_JavaVM);
        g_SyncBridge = new SyncBridge(g_JavaBridge);
        g_Plugins->SetRenderWindows(g_JavaBridge, g_SyncBridge);

        JniBridegSettings = new CJniBridegSettings();

        RegisterUISettings();
        g_Settings->RegisterChangeCB(GameRunning_CPU_Running, NULL, (CSettings::SettingChangedFunc)GameCpuRunning);
    }
    else
    {
        AppCleanup();
    }
    return res;
}
开发者ID:JunielKatarn,项目名称:Project64CI,代码行数:45,代码来源:jniBridge.cpp


示例20: WinMain

int WINAPI WinMain (HINSTANCE hInstance,
					     HINSTANCE hPrevInstance,
					     LPSTR lpszCmdLine,
					     int nCmdShow)

{
  MSG		  msg;

  if (!AppInit (hInstance, hPrevInstance, nCmdShow))
	 return 0;

  while (GetMessage (&msg, NULL, 0, 0)) {
	 TranslateMessage (&msg);
	 DispatchMessage (&msg);
  }

  return msg.wParam;
}
开发者ID:banica,项目名称:educatie,代码行数:18,代码来源:Clover.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ AppInit2函数代码示例发布时间:2022-05-30
下一篇:
C++ App函数代码示例发布时间: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