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


C++ SystemClass类代码示例

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


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

示例1: WinMain

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR pScmdLine,int iCmdShow)
{
	
	SystemClass* system = nullptr;

	bool result;

	system = new SystemClass;

	if (!system)
		result = false;

	result = system->Initialize();

	if (result)
	{
		system->Run();
	}

	system->Shutdown();

	delete system;

	system = nullptr;

}
开发者ID:find-happiness,项目名称:MineEngine,代码行数:26,代码来源:main.cpp

示例2: main

int main()
{
	//WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)

	SystemClass* system = nullptr; // could make a static ISystemClass* variable and make ISystemClass

#ifdef _WIN32
	system = &SystemClass::GetInstance();
#endif

	if (!system)
	{
		return 0;
	}

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

	// Shutdown and releasr the system object.
	system->Shutdown();

	return 0;



}
开发者ID:OllieBM,项目名称:Engine,代码行数:30,代码来源:main.cpp

示例3: WinMain

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

	AllocConsole();
	freopen("conin$","r",stdin);
	freopen("conout$","w",stdout);
	freopen("conout$","w",stderr);
	printf("Debugging Window:\n");
	
	// Create the system object.
	System = new SystemClass;
	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:jcoughlan,项目名称:jc_ngn,代码行数:32,代码来源:main.cpp

示例4: WinMain

//应用程序入口main函数
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;

	// 创建一个system对象.
	System = new SystemClass;
	if (!System)
	{
		return 0;
	}

	// 初始化以及运行system对象.
	result = System->Initialize();
	if (result)
	{
		System->Run();
	}

	// 关闭以及释放system对象.
	System->Shutdown();
	delete System;
	System = 0;
	return 0;
}
开发者ID:liqunzheng,项目名称:Dx11Study,代码行数:26,代码来源:main.cpp

示例5: _tWinMain

int APIENTRY _tWinMain( _In_ HINSTANCE hInstance,
                        _In_opt_ HINSTANCE hPrevInstance,
                        _In_ LPTSTR    lpCmdLine,
                        _In_ int       nCmdShow )
{
    // Create the system object.
    SystemClass* pSystem = new SystemClass;
    if ( !pSystem )
    {
        return 0;
    }

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

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

    return 0;
}
开发者ID:chchwy,项目名称:RasterTek-Dx11-Tutorials,代码行数:26,代码来源:main.cpp

示例6: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;
	
	
	// Create the system object.
	System = new SystemClass;
	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:xtr3m3nerd,项目名称:DirectXKinectFramework,代码行数:27,代码来源:main.cpp

示例7: WinMain

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
	SystemClass* System;

	// 创建System类
	System = new SystemClass;

	if (!System)
	{
		return 0;
	}

	// 初始化System类,主循环
	if (System->Initialze())
	{
		System->Run();
	}

	// 删除System类
	System->Shutdown();
	delete System;
	System = NULL;

	return 0;

}
开发者ID:liu1700,项目名称:Fire-Engine,代码行数:26,代码来源:FireMain.cpp

示例8: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	surfCameraInstance.Init("Photo5.jpg");

	while (true) {
		surfCameraInstance.Frame();
	}

	SystemClass* System;
	bool result;
	//int counter = 0;
	
	// Create the system object.
	System = new SystemClass;
	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:Arryn99,项目名称:AugRealityOpenGL3OpenCV,代码行数:33,代码来源:main.cpp

示例9: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
    //FILELog::ReportingLevel() = logDEBUG3;
    //FILE* log_fd = fopen( "mylogfile.txt", "w" );
    //Output2FILE::Stream() = log_fd;
    SystemClass* System; //pointer to a System object
    bool result;

    System = new SystemClass; //create new System object where the pointer is pointing

    if(!System) //if system is null
    {
        return 0;
    }

    result = System->Initialize(); //run the initialize method in the object that System is pointing at
    if(result) //if it returned true
    {
        System->Run(); //start the program loop by running Run in the object that system is pointing at
    }

    System->Shutdown(); //clean System object
    delete System; //remove system object
    System = 0; //set pointer to null

    return 0; //exit da program
}
开发者ID:NukePie,项目名称:Engine,代码行数:27,代码来源:main.cpp

示例10: WinMain

int CALLBACK WinMain( HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR     /*lpCmdLine*/, int       /*nCmdShow*/)
{
    SystemClass* system = nullptr;
    bool result = true;

    //Create the system object
    system = new SystemClass();
    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:gormanme,项目名称:DirectX,代码行数:26,代码来源:main.cpp

示例11: write

void ClassesDatas::write(QJsonObject &json) const{
    QJsonArray jsonArray;
    for (int i = 0; i < m_model->invisibleRootItem()->rowCount(); i++){
        QJsonObject jsonCommon;
        SystemClass* sysClass = ((SystemClass*)m_model->item(i)
                                 ->data().value<quintptr>());
        sysClass->write(jsonCommon);
        jsonArray.append(jsonCommon);
    }
    json["classes"] = jsonArray;
}
开发者ID:Wano-k,项目名称:RPG-Paper-Maker,代码行数:11,代码来源:classesdatas.cpp

示例12: WinMain

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pScmdline, int iCmdshow ) {
	SystemClass* system;
	bool result;
	system = new SystemClass;
	if ( !system ) return 0;
	result = system->Initialize( );
	if ( result ) system->Run();
	system->Shutdown( );
	delete system;
	system = 0;
	return 0;
}
开发者ID:PINK-FL0YD,项目名称:DirectX-11-Tutorial,代码行数:12,代码来源:Main.cpp

示例13: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	/*
     HINSTANCE hInstance  : handle of the applications current instance
	 HINSTANCE hPrevInstance : handle of the applications previous instance (should be NULL according to MSDN)
	 PSTR pScmdline : commandline arguments invoked with main (we won't use this)
	 int iCmdshow : An ID that specifies how the window should be shown

	 There is also a wWinMain(...) version with the same arguments that passes unicode characters for
	 the pScmdline argument rather than ANSI as WinMain does
	*/

	SystemClass* System; //system class encapsulates our overall app
	bool result;

	/*
	Allocate a "side car" console so we can write some debug information out to it
	*/
	if(use_debug_console) AllocConsole();
	writeToDebugConsole(L"Hello World\n");

	// Create the system object.
	System = new SystemClass;
	if(!System)
	{
		return 0; //our system object did not construct properly
	}


	// Initialize our system object and run the application by asking
	// the system object to run.
	result = System->Initialize();
	if(result)
	{
		System->Run();
	}

	// Shutdown and release the system object.
	System->Shutdown(); //give system a chance to clean up
	delete System;  //release the system object's memory
	System = 0;     //set system pointer to 0 so it is no longer valid

	return 0;
}
开发者ID:Elephly,项目名称:SnatchGame,代码行数:44,代码来源:main.cpp

示例14: main

int main(int argc, char **argv )
{	
	//Get System Instance
	SystemClass* pSystem = SystemClass::GetInstance();

	//Configure System Settings
	pSystem->WindowWidth = 1280;
	pSystem->WindowHeight = 720;
	pSystem->WindowName = "Application";

	//Init System & Rendering Context
	pSystem->InitRenderingContext(&argc, argv);

	//Get Application Instance
	App = ApplicationClass::GetInstance();
	
	//Configure System Callbacks
	pSystem->Display = &Display;
	pSystem->Reshape = &Reshape;
	pSystem->Idle = &Idle;
	pSystem->Keyboard = &Keyboard;
	pSystem->KeyboardUp = &KeyboardUp;
	pSystem->OnSpecial = &OnSpecial;
	pSystem->OnSpecialUp = &OnSpecialUp;
	pSystem->Mouse = &Mouse;
	pSystem->MouseWheel = &MouseWheel;

	//Init the callback calls
	pSystem->InitCallbacks();
	
	//Start the RenderLoop
	pSystem->StartRenderLoop();
	
	//Release App Information
	delete App->m_pCamera;
	delete App;
	delete pSystem;

	//Ending the program	
	//Function = &Function0;
	//Function();

	return 0;
}
开发者ID:alycat,项目名称:DSA2,代码行数:44,代码来源:Main.cpp

示例15: read

void ClassesDatas::read(const QJsonObject &json){

    // Clear
    SuperListItem::deleteModel(m_model, false);

    // Read
    QJsonArray jsonList = json["classes"].toArray();
    QStandardItem* item;
    SystemClass* sysClass;
    for (int i = 0; i < jsonList.size(); i++){
        item = new QStandardItem;
        sysClass= new SystemClass;
        sysClass->read(jsonList[i].toObject());
        item->setData(QVariant::fromValue(
                          reinterpret_cast<quintptr>(sysClass)));
        item->setFlags(item->flags() ^ (Qt::ItemIsDropEnabled));
        item->setText(sysClass->toString());
        m_model->appendRow(item);
    }
}
开发者ID:Wano-k,项目名称:RPG-Paper-Maker,代码行数:20,代码来源:classesdatas.cpp


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