本文整理汇总了C++中Terminate函数的典型用法代码示例。如果您正苦于以下问题:C++ Terminate函数的具体用法?C++ Terminate怎么用?C++ Terminate使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Terminate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
/** Any pulses received on the Looper's IPC port are
* passed to this virtual method.
*
* \warning Do not delete the Pulse parameter that you are given. It does
* not belong to you either.
*
* \param pulse A pointer to the received Pulse.
*/
void Looper::PulseReceived( Pulse* pulse )
{
switch ((*pulse)[0])
{
case QUIT_REQUESTED:
QuitRequested();
Terminate();
break;
}
}
示例2: CantDoIt
static void CantDoIt( void )
{
if( PendingProgramInterrupt ) {
if( MessageBox( 0, TRP_WIN_wanna_kill, TRP_The_WATCOM_Debugger, MB_SYSTEMMODAL + MB_YESNO + MB_ICONQUESTION ) == IDYES ) {
Terminate();
}
} else if( MessageBox( 0, TRP_WIN_wanna_interrupt, TRP_The_WATCOM_Debugger, MB_SYSTEMMODAL + MB_YESNO + MB_ICONQUESTION ) == IDYES ) {
InterruptProgram();
}
}
示例3: Terminate
CRunQueue::~CRunQueue()
{
if (mh_Thread)
{
Terminate();
SafeCloseHandle(mh_Thread);
}
SafeDelete(mpcs_QueueLock);
}
示例4: main
int main(int argc, char **argv)
{
Initialize(argc, argv);
ReadLog();
Terminate();
return(1);
}
示例5: Terminate
CThread::~CThread()
{
try {
Terminate();
EndThread();
} catch (...) {
_Done(); // throw;
}
_Done();
}
示例6: Terminate
void unconsciousness::Handle()
{
if(!--Counter)
Terminate(true);
else
{
Actor->EditExperience(ARM_STRENGTH, -50, 1 << 2);
Actor->EditExperience(LEG_STRENGTH, -50, 1 << 2);
}
}
示例7: Terminate
/**
*
* Method Name: ~CRTCPConnection() - Destructor
*
*
* Inputs: None
*
* Outputs: None
*
* Returns: None
*
* Description: Shall deallocated and/or release all resources which was
* acquired over the course of runtime. In particular, the
* following shall occur:
* ==> Shall release the reference to the RTCP Render object
* ==> Shall release the reference to the RTCP Source object
*
* Usage Notes:
*
*
*/
CRTCPConnection::~CRTCPConnection(void)
{
// Terminate Connection and release any remaining references to interfaces
// and objects
Terminate();
m_piRTCPNotify->Release();
m_piSDESReport->Release();
}
示例8: WindowChar
static void WindowChar(char Ch)
{
if (_CheckBreak && (Ch == 3))
Terminate();
if (KeyCount < sizeof(KeyBuffer))
{
KeyBuffer[KeyCount] = Ch;
++KeyCount;
}
}
示例9: Child2
int Child2(char *arg)
{
if (!(strcmp(arg,"Child2"))){
USLOSS_Console("Child2(): starting\n");
Terminate(9);
}
else {
if (!(strcmp(arg,"Child3"))){
USLOSS_Console("Child3(): starting\n");
Terminate(10);
}
else {
USLOSS_Console("wrong argument passed ... test failed\n");
exit(1);
}
}
return 0;
} /* Child2 */
示例10: Child2a
int Child2a(char *arg)
{
int pid;
GetPID(&pid);
USLOSS_Console("%s(): starting the code for Child2a: pid=%d\n", arg, pid);
Terminate(11);
return 0;
} /* Child2a */
示例11: Throw
void Throw()
{
for (Janitor* jan = JumpBase::jl->janitor; jan; jan = jan->NextJanitor)
jan->CleanUp();
JumpItem* jx = JumpBase::jl->ji; // previous jumpbase;
if ( !jx ) { Terminate(); } // jl was initial JumpItem
JumpBase::jl = jx; // drop down a level; cannot be in front
// of previous line
Tracer::last = JumpBase::jl->trace;
longjmp(JumpBase::jl->env, 1);
}
示例12: Terminate
virtual ~LocalizationDirectoryMonitorThread()
{
Terminate();
DWORD aWaitResult = WaitForSingleObject(myHandle, 5000); //wait 5 seconds
if (aWaitResult != WAIT_OBJECT_0)
TerminateThread(myHandle, 1);
CloseHandle(myTerminateEvent);
}
示例13: main
int main()
{
Initialize();
// --HowTo: Load the tmx map from the json file
tmxparser::Map_t *map = new tmxparser::Map_t;
tmxparser::parseTmxFromJSON_file("testLevel.json", map);
// --HowTo: Create a renderer
tmxparser::TmxRenderer *renderer = new tmxparser::TmxRenderer(map);
// an offset to use for scrolling the map
CIwFVec2 offset(0,0);
IwGxSetColClear(0x2f, 0x3f, 0x3f, 0xff);
// Loop forever, until the user or the OS performs some action to quit the app
while (!s3eDeviceCheckQuitRequest())
{
//Update the input systems
s3eKeyboardUpdate();
s3ePointerUpdate();
// Clear the surface
IwGxClear(IW_GX_COLOUR_BUFFER_F | IW_GX_DEPTH_BUFFER_F);
// --HowTo: render all layers, at original pixel size:
//renderer->Render(offset);
// --HowTo: render all layers at reduced/scaled tile size
renderer->Render(offset, CIwFVec2(64.0f, 64.0f));
// --HowTo: render only one layer at original pixel size
//renderer->RenderLayer(0, offset, CIwFVec2(0.0f, 0.0f));
// --HowTo: render only one layer at scaled pixel size
//renderer->RenderLayer(0, offset, CIwFVec2(64.0f, 64.0f));
// advance offset
offset.x += 3;
if (offset.x>1900)
offset.x =0;
// Standard EGL-style flush of drawing to the surface
IwGxFlush();
IwGxSwapBuffers();
s3eDeviceYield(0);
}
delete renderer;
delete map;
Terminate();
// Return
return 0;
}
示例14: TRACE
STDMETHODIMP CTestCases::Terminate(VARIANT_BOOL* pbResult)
{
TRACE("CTestCases::Terminate\n");
//Delegate to the derived class...
VARIANT_BOOL bResult = (VARIANT_BOOL)Terminate();
if(pbResult)
*pbResult = bResult ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
示例15: StartTrace
InterruptHandler::~InterruptHandler()
{
StartTrace(InterruptHandler.Dtor);
if ( GetId() != 0 ) {
THRKILL(GetId(), SIGTERM);
}
Terminate();
CheckState(Thread::eTerminated);
if (fServer) {
fServer->RemovePIDFile();
}
}