本文整理汇总了C++中Process::GetProgram方法的典型用法代码示例。如果您正苦于以下问题:C++ Process::GetProgram方法的具体用法?C++ Process::GetProgram怎么用?C++ Process::GetProgram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::GetProgram方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StopProgram
int ProgramManager::StopProgram( int programId )
{
Process* process = this->runningPrograms[programId];
if ( process == NULL )
{
EventLogger::Instance()->WriteVerbose( "Program with id %d is not started!", programId );
return ERROR_PRNOTSTARTED_ID;
}
Program* program = process->GetProgram();
if ( program == NULL )
{
EventLogger::Instance()->WriteVerbose( "Program with id %d is not started!", programId );
return ERROR_PRNOTSTARTED_ID;
}
process->Stop();
// to do !!!
MappingManager::Instance()->FinalizeProgram( program );
// delete process & program;
// delete this->runningPrograms[program->Id()];
this->runningPrograms[program->Id()] = NULL;
this->runningPrograms.erase( program->Id() );
return 0;
}
示例2: GetRunningProgram
Program* ProgramManager::GetRunningProgram( int programId )
{
Process* process = this->runningPrograms[programId];
if(process == NULL)
return NULL;
return process->GetProgram();
}
示例3: HandleError
void ProgramManager::HandleError( void* sender, ErrorItem* error)
{
Process* process = ( Process* )sender;
if( process == NULL )
return;
Program* program = process->GetProgram();
if ( program == NULL )
{
EventLogger::Instance()->WriteVerbose( "Program with id %d is still not started but an Error in the process with the same id is found!", program->Id() );
return;
}
process->Stop();
// to do !!!
MappingManager::Instance()->FinalizeProgram( program );
// delete process & program;
// delete this->runningPrograms[program->Id()];
this->runningPrograms[program->Id()] = NULL;
this->runningPrograms.erase( program->Id() );
}