本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}