OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4InteractiveThreadNotifyProc Class Reference

#include <C4InteractiveThread.h>

Inheritance diagram for C4InteractiveThreadNotifyProc:
[legend]
Collaboration diagram for C4InteractiveThreadNotifyProc:
[legend]

Public Member Functions

void SetNotify (class C4InteractiveThread *pnNotify)
 
bool Execute (int iTimeout, pollfd *readyfds) override
 
void Notify ()
 
bool CheckAndReset ()
 
bool IsNotify () override
 
void GetFDs (std::vector< struct pollfd > &checkfds) override
 
bool ExecuteUntil (int iTimeout=-1)
 
virtual C4TimeMilliseconds GetNextTick (C4TimeMilliseconds tNow)
 
bool IsSignaled ()
 
virtual bool IsLowPriority ()
 
virtual uint32_t TimerInterval ()
 

Protected Member Functions

void Changed ()
 

Detailed Description

Definition at line 48 of file C4InteractiveThread.h.

Member Function Documentation

void StdSchedulerProc::Changed ( )
protectedinherited

Definition at line 108 of file StdScheduler.cpp.

References s.

Referenced by C4NetIOTCP::Accept(), C4NetIOTCP::AddConnectWait(), C4NetIOUDP::AddPeer(), C4NetIOTCP::Listen(), and CStdTimerProc::SetDelay().

109 {
110  auto s = scheduler;
111  if (s)
112  s->Changed(this);
113 }
#define s

Here is the caller graph for this function:

bool CStdNotifyProc::CheckAndReset ( )
inherited

Referenced by Execute().

Here is the caller graph for this function:

bool C4InteractiveThreadNotifyProc::Execute ( int  iTimeout,
pollfd *  readyfds 
)
overridevirtual

Implements StdSchedulerProc.

Definition at line 201 of file C4InteractiveThread.cpp.

References CStdNotifyProc::CheckAndReset(), and C4InteractiveThread::ProcessEvents().

202 {
203  if (CheckAndReset())
204  pNotify->ProcessEvents();
205  return true;
206 }
bool CheckAndReset()

Here is the call graph for this function:

bool StdSchedulerProc::ExecuteUntil ( int  iTimeout = -1)
inherited

Definition at line 33 of file StdScheduler.cpp.

References StdSchedulerProc::Execute(), and C4TimeMilliseconds::Now().

Referenced by main().

34 {
35  // Infinite?
36  if (iTimeout < 0)
37  for (;;)
38  if (!Execute())
39  return false;
40  // Calculate endpoint
41  C4TimeMilliseconds tStopTime = C4TimeMilliseconds::Now() + iTimeout;
42  for (;;)
43  {
44  // Call execute with given timeout
45  if (!Execute(std::max(iTimeout, 0)))
46  return false;
47  // Calculate timeout
49  if (tTime >= tStopTime)
50  break;
51  iTimeout = tStopTime - tTime;
52  }
53  // All ok.
54  return true;
55 }
virtual bool Execute(int iTimeout=-1, pollfd *readyfds=nullptr)=0
static C4TimeMilliseconds Now()

Here is the call graph for this function:

Here is the caller graph for this function:

void CStdNotifyProc::GetFDs ( std::vector< struct pollfd > &  checkfds)
overridevirtualinherited

Reimplemented from StdSchedulerProc.

C4TimeMilliseconds StdSchedulerProc::GetNextTick ( C4TimeMilliseconds  tNow)
virtualinherited

Reimplemented in C4NetIOUDP, C4Network2HTTPClient, C4Network2IO, and CStdTimerProc.

Definition at line 115 of file StdScheduler.cpp.

References C4TimeMilliseconds::PositiveInfinity.

Referenced by C4Network2HTTPClient::GetNextTick().

Here is the caller graph for this function:

virtual bool StdSchedulerProc::IsLowPriority ( )
inlinevirtualinherited

Definition at line 82 of file StdScheduler.h.

82 { return false; }
bool CStdNotifyProc::IsNotify ( )
inlineoverridevirtualinherited

Reimplemented from StdSchedulerProc.

Definition at line 147 of file StdScheduler.h.

147 { return true; }
bool StdSchedulerProc::IsSignaled ( )
inherited
void CStdNotifyProc::Notify ( )
inherited

Referenced by C4InteractiveThread::PushEvent().

Here is the caller graph for this function:

void C4InteractiveThreadNotifyProc::SetNotify ( class C4InteractiveThread pnNotify)
inline

Definition at line 53 of file C4InteractiveThread.h.

Referenced by C4InteractiveThread::C4InteractiveThread().

53 { pNotify = pnNotify; }

Here is the caller graph for this function:

virtual uint32_t StdSchedulerProc::TimerInterval ( )
inlinevirtualinherited

Reimplemented in CStdTimerProc.

Definition at line 84 of file StdScheduler.h.

Referenced by SCHAdditions::assignAdditionForProc:.

84 { return 0; }

Here is the caller graph for this function:


The documentation for this class was generated from the following files: