OpenClonk
SCHAddition Class Reference
Inheritance diagram for SCHAddition:
[legend]
Collaboration diagram for SCHAddition:
[legend]

Instance Methods

(id) - initWithProc:
 
(void) - registerAt:
 
(void) - unregisterFrom:
 
(bool) - shouldExecuteProc
 
(void) - changed
 

Protected Attributes

__weak SCHAdditionsschedulerAdditions
 
StdSchedulerProcproc
 

Detailed Description

Definition at line 24 of file StdSchedulerMac.mm.

Method Documentation

◆ changed()

- (void) changed

Definition at line 193 of file StdSchedulerMac.mm.

References SCHAdditions::changed:, StdSchedulerProc::Execute(), schedulerAdditions, and shouldExecuteProc.

Referenced by StdScheduler::Changed().

194 {
195  [schedulerAdditions changed:self];
196 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initWithProc:()

- (id) initWithProc: (StdSchedulerProc*)  _proc

Definition at line 169 of file StdSchedulerMac.mm.

169  :(StdSchedulerProc *) _proc
170 {
171  if (self = [super init])
172  {
173  proc = _proc;
174  return self;
175  } else
176  return nil;
177 }
StdSchedulerProc * proc

◆ registerAt:()

- (void) registerAt: (SCHAdditions*)  _additions

Reimplemented in SCHTimer, and SCHNotify.

Definition at line 185 of file StdSchedulerMac.mm.

References schedulerAdditions.

Referenced by SCHAdditions::assignAdditionForProc:, SCHAdditions::changed:, SCHNotify::registerAt:, and SCHTimer::registerAt:.

185  :(SCHAdditions*) _additions
186 {
187  schedulerAdditions = _additions;
188 }
__weak SCHAdditions * schedulerAdditions
Here is the caller graph for this function:

◆ shouldExecuteProc()

- (bool) shouldExecuteProc

Definition at line 178 of file StdSchedulerMac.mm.

References s, and schedulerAdditions.

Referenced by changed, and SCHTimer::unregisterFrom:.

179 {
180  if (!proc)
181  return false;
182  auto s = schedulerAdditions;
183  return s && !s.scheduler->IsInManualLoop();
184 }
__weak SCHAdditions * schedulerAdditions
StdSchedulerProc * proc
#define s
Here is the caller graph for this function:

◆ unregisterFrom:()

- (void) unregisterFrom: (SCHAdditions*)  _additions

Reimplemented in SCHTimer, and SCHNotify.

Definition at line 189 of file StdSchedulerMac.mm.

References schedulerAdditions.

Referenced by SCHAdditions::changed:, SCHAdditions::removeAdditionForProc:, SCHNotify::unregisterFrom:, and SCHTimer::unregisterFrom:.

189  :(SCHAdditions*) _additions
190 {
191  schedulerAdditions = nil;
192 }
__weak SCHAdditions * schedulerAdditions
Here is the caller graph for this function:

Member Data Documentation

◆ proc

- (StdSchedulerProc*) proc
protected

Definition at line 28 of file StdSchedulerMac.mm.

Referenced by SCHTimer::unregisterFrom:.

◆ schedulerAdditions

- (__weak SCHAdditions*) schedulerAdditions
protected

Definition at line 27 of file StdSchedulerMac.mm.

Referenced by changed, registerAt:, shouldExecuteProc, and unregisterFrom:.


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