MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / FinalizeIO

Method FinalizeIO

CrySystem/RefReadStreamProxy.cpp:434–457  ·  view source on GitHub ↗

this gets called upon the IO has been executed to call the callbacks

Source from the content-addressed store, hash-verified

432
433// this gets called upon the IO has been executed to call the callbacks
434void CRefReadStreamProxy::FinalizeIO()
435{
436 if (m_pCallback)
437 {
438 // be carefull! this object can be deallocated inside the callback!
439 IStreamCallback* pCallback = m_pCallback;
440 m_pCallback = NULL; // don't call this callback any more as it may have been deallocated
441#if LOG_IO
442 g_System->GetILog()->LogToFile ("\006io(%s) err %d%s%s%s%s piece(%d:%d) read %d %s userdata %d, pri %d, flags %x, offs %d, size %d", m_strClient.c_str(), m_nIOError,
443 m_bError?" Error":"", m_bFinished?" Finished":"", m_bFreeBuffer?" FreeBuffer":"", m_bPending?" Pending":"",
444 m_nPieceOffset, m_nPieceLength,
445 m_numBytesRead,
446 m_pStream->GetFileName().c_str(),
447 m_Params.dwUserData,
448 m_Params.nPriority,
449 m_Params.nFlags,
450 m_Params.nOffset,m_Params.nSize);
451#endif
452 pCallback->StreamOnComplete(this, m_bError?m_nIOError:0);
453#if LOG_IO
454 g_System->GetILog()->LogToFile ("\006io callback %p returned", pCallback);
455#endif
456 }
457}
458
459string CRefReadStreamProxy::Dump()
460{

Callers 2

FinalizeIOJobsMethod · 0.80
OnIOJobExecutedMethod · 0.80

Calls 5

GetILogMethod · 0.80
LogToFileMethod · 0.45
c_strMethod · 0.45
GetFileNameMethod · 0.45
StreamOnCompleteMethod · 0.45

Tested by

no test coverage detected