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


C++ AppInit函数代码示例

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


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


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