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


C++ System::Run方法代码示例

本文整理汇总了C++中System::Run方法的典型用法代码示例。如果您正苦于以下问题:C++ System::Run方法的具体用法?C++ System::Run怎么用?C++ System::Run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System的用法示例。


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

示例1: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
    System* system;
    bool result;


    // Create the system object.
    system = new System;
    if (!system)
    {
        return 0;
    }

    // Initialize and run the system object.
    result = system->Initialize();
    if (result)
    {
        system->Run();
    }

    // Shutdown and release the system object.
    system->Shutdown();
    delete system;
    system = 0;

    return 0;
}
开发者ID:longshorts,项目名称:NashEngine,代码行数:27,代码来源:Main.cpp

示例2: main

int main()
{
  cout << "  Welcome to PTAMM " << endl;
  cout << "  ---------------- " << endl;
  cout << "  Parallel tracking and multiple mapping" << endl;
  cout << "  Copyright (C) Isis Innovation Limited 2009 " << endl;
  cout << endl;
  cout << "  Parsing settings.cfg ...." << endl;
  GUI.LoadFile("settings.cfg");
  
  GUI.StartParserThread(); // Start parsing of the console input
  atexit(GUI.StopParserThread); 
  
  try
    {
      System s;
      s.Run();
    }
  catch(CVD::Exceptions::All e)
    {
      cout << endl;
      cout << "!! Failed to run system; got exception. " << endl;
      cout << "   Exception was: " << endl;
      cout << e.what << endl;
    }

  return 0;
}
开发者ID:aaron-wu,项目名称:PTAMM_MSF,代码行数:28,代码来源:main.cpp

示例3: main

int main()
{
    System* sys = new System();
    sys->Run();
    sys->Save();
    sys->Exit();
    return 0;
}
开发者ID:wongxingjun,项目名称:designPatterns,代码行数:8,代码来源:FacadePattern.cpp

示例4: main

int main(int argc, char** argv)
{
  ros::init(argc, argv, "mcptam");
  ros::NodeHandle nh;

  /*
  ROSCONSOLE_AUTOINIT;
  log4cxx::LoggerPtr my_logger = log4cxx::Logger::getLogger(ROSCONSOLE_DEFAULT_NAME);
  // Set the logger for this package to output all statements
  my_logger->setLevel(ros::console::g_level_lookup[ros::console::levels::Debug]);
  */

  ROS_INFO("  Welcome to mcptam ");
  ROS_INFO("  --------------- ");
  ROS_INFO("  Multiple Camera Parallel Tracking and Mapping (MCPTAM");
  ROS_INFO("  Copyright 2014 Adam Harmat, McGill University");
  ROS_INFO("                 Michael Tribou, University of Waterloo");
  ROS_INFO("  ");
  ROS_INFO("  Multi-Camera Parallel Tracking and Mapping (MCPTAM) is free software:");
  ROS_INFO("  you can redistribute it and/or modify it under the terms of the GNU ");
  ROS_INFO("  General Public License as published by the Free Software Foundation,");
  ROS_INFO("  either version 3 of the License, or (at your option) any later");
  ROS_INFO("  version.");
  ROS_INFO("  ");
  ROS_INFO("  This program is distributed in the hope that it will be useful,");
  ROS_INFO("  but WITHOUT ANY WARRANTY; without even the implied warranty of");
  ROS_INFO("  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the");
  ROS_INFO("  GNU General Public License for more details.");
  ROS_INFO("  ");
  ROS_INFO("  You should have received a copy of the GNU General Public License");
  ROS_INFO("  along with this program.  If not, see <http://www.gnu.org/licenses/>.");
  ROS_INFO("  ");
  ROS_INFO("  Based on Parallel Tracking and Mapping (PTAM) software");
  ROS_INFO("  Copyright 2008 Isis Innovation Limited");
  ROS_INFO("  ");

  LoadStaticParamsGeneral();
  LoadStaticParamsClient();
  LoadStaticParamsServer();

  try
  {
    System sys;
    sys.Run();
  }
  catch (CVD::Exceptions::All e)
  {
    ROS_ERROR("Failed to run mcptam; got exception. ");
    ROS_ERROR("   Exception was: ");
    ROS_ERROR_STREAM(e.what);
  }
}
开发者ID:wavelab,项目名称:mcptam,代码行数:52,代码来源:Main.cpp

示例5: _tmain

int _tmain(int argc, _TCHAR* argv[])
{
	System* system = new System;

	if(system->Initialize())
		system->Run();

	system->Shutdown();
	delete system;
	system = 0;

	return 0;
}
开发者ID:JoshEngle,项目名称:GeneArt,代码行数:13,代码来源:main.cpp

示例6: main

int main()
{
	System* engine = new System("3DS Loader and Renderer");
	if (!engine->Initialize())
	{
		printf("Press any key to shutdown\n");
		_getch();
		return -1;
	}
	engine->Run();
	engine->Shutdown();

	return 0;
}
开发者ID:qinjunli1107,项目名称:PAGI,代码行数:14,代码来源:main.cpp

示例7: WinMain

int CALLBACK WinMain(
  _In_ HINSTANCE hInstance,
  _In_opt_ HINSTANCE hPrevInstance,
  _In_ LPSTR lpCmdLine,
  _In_ int nCmdShow
)
{
#if DEBUG
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_CHECK_ALWAYS_DF);
#endif
	System system;
	system.Run();

	return 0;
}
开发者ID:TautvydasZilys,项目名称:Direct3D-Sandbox,代码行数:15,代码来源:main.cpp

示例8: WinMain

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
					LPTSTR lpCmdLine, int nCmdShow)
{
	System* system = System::GetInstance();

	if (!system->Init(800, 600))
	{
		Error("系统初始化失败!");
		return 1;
	}
	system->Run();
	system->Cleanup();

	return 0;
}
开发者ID:tcye,项目名称:D3DEngine,代码行数:15,代码来源:main.cpp

示例9: ConstructAndWrap

  /*!
   * \brief ConstructAndWrap.
   * Creates the context for a thread, and run
   */
  void ConstructAndWrap() {
    // Read the settings
    cout << "  Parsing " <<  config_file << " and console" <<  endl;
    GUI.LoadFile(config_file);

    // Build the new context
    s = new System(b_automated_start);

    // Load the assets if needed
    if (!AR_assets_file.empty()) {
        cout << "Deferred loading taking place" << endl;
        s->setARModel(AR_assets_file);
      }

    // Start the computations
    is_slam_started = true;
    cout << "Starting computations" << endl;
    s->Run();
  }
开发者ID:blefaudeux,项目名称:PTAM-GPL,代码行数:23,代码来源:pyPTAM.cpp

示例10: wWinMain

int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow )
{
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);

	srand((unsigned)time(NULL));

	RedirectIOToConsole();

	System* system;

	try
	{
		system = new System(false, false, 1440, 900);
		system->Run();
		delete system;
	}
	catch (exception& e)
	{
		MessageBoxA(NULL, e.what(), "Error", MB_ICONERROR | MB_OK);
	}

	return 0;
}
开发者ID:HerrAndersson,项目名称:3DProject,代码行数:23,代码来源:main.cpp


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