RunnersRegistry.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RegisteredRunner
 
class  IndependentRunner
 A RegisteredRunner with lifetime determined by forces outside the Registry. More...
 

Macros

#define RunRegisteredHere(m)
 convenience macro to describe/debug the caller and the method being called More...
 
#define NameRunnerRegistrator_(Namespace, ClassName)    Register ## ClassName ## In ## Namespace()
 
#define DefineRunnerRegistrator_(Namespace, ClassName, Constructor)
 
#define DefineRunnerRegistratorIn(Namespace, ClassName)    DefineRunnerRegistrator_(Namespace, ClassName, Namespace::ClassName)
 
#define DefineRunnerRegistrator(ClassName)    DefineRunnerRegistrator_(Global, ClassName, ClassName)
 
#define CallRunnerRegistratorIn(Namespace, ClassName)
 
#define CallRunnerRegistrator(ClassName)    CallRunnerRegistratorIn(Global, ClassName)
 

Functions

bool RegisterRunner (RegisteredRunner *rr)
 registers a given runner with the given registry and returns true on success More...
 
void RunRegistered (const RegisteredRunner::Method &m)
 

Macro Definition Documentation

◆ CallRunnerRegistrator

#define CallRunnerRegistrator (   ClassName)     CallRunnerRegistratorIn(Global, ClassName)

Register one RegisteredRunner kid, known as ClassName (in the global namespace).

See also
CallRunnerRegistratorIn() for classes declared in named namespaces.

Definition at line 159 of file RunnersRegistry.h.

◆ CallRunnerRegistratorIn

#define CallRunnerRegistratorIn (   Namespace,
  ClassName 
)
Value:
do { \
void NameRunnerRegistrator_(Namespace, ClassName); \
NameRunnerRegistrator_(Namespace, ClassName); \
} while (false)
#define NameRunnerRegistrator_(Namespace, ClassName)

Register one RegisteredRunner kid, known as ClassName in Namespace.

See also
CallRunnerRegistrator() for classes declared in the global namespace.

Definition at line 151 of file RunnersRegistry.h.

◆ DefineRunnerRegistrator

#define DefineRunnerRegistrator (   ClassName)     DefineRunnerRegistrator_(Global, ClassName, ClassName)

Define registration code for the given RegisteredRunner-derived class known as ClassName (in global namespace). A matching CallRunnerRegistrator() call should run this code before any possible use of the being-registered module.

See also
DefineRunnerRegistratorIn() for classes declared in named namespaces.

Definition at line 146 of file RunnersRegistry.h.

◆ DefineRunnerRegistrator_

#define DefineRunnerRegistrator_ (   Namespace,
  ClassName,
  Constructor 
)
Value:
void NameRunnerRegistrator_(Namespace, ClassName); \
void NameRunnerRegistrator_(Namespace, ClassName) { \
const auto registered = RegisterRunner(new Constructor); \
assert(registered); \
}
bool RegisterRunner(RegisteredRunner *rr)
registers a given runner with the given registry and returns true on success

helper macro that implements DefineRunnerRegistrator() and DefineRunnerRegistratorIn() using supplied constructor expression

Definition at line 128 of file RunnersRegistry.h.

◆ DefineRunnerRegistratorIn

#define DefineRunnerRegistratorIn (   Namespace,
  ClassName 
)     DefineRunnerRegistrator_(Namespace, ClassName, Namespace::ClassName)

Define registration code for the given RegisteredRunner-derived class known as ClassName in Namespace. A matching CallRunnerRegistratorIn() call should run this code before any possible use of the being-registered module.

See also
DefineRunnerRegistrator() for classes declared in the global namespace.

Definition at line 139 of file RunnersRegistry.h.

◆ NameRunnerRegistrator_

#define NameRunnerRegistrator_ (   Namespace,
  ClassName 
)     Register ## ClassName ## In ## Namespace()

helps DefineRunnerRegistrator() and CallRunnerRegistrator() (and their namespace-sensitive variants) to use the same registration function name

Definition at line 123 of file RunnersRegistry.h.

◆ RunRegisteredHere

#define RunRegisteredHere (   m)
Value:
debugs(1, 2, "running " # m); \
RunRegistered(&m)
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194

Definition at line 117 of file RunnersRegistry.h.

Function Documentation

◆ RegisterRunner()

bool RegisterRunner ( RegisteredRunner rr)

◆ RunRegistered()

void RunRegistered ( const RegisteredRunner::Method m)

Calls a given method of all runners. All runners are destroyed after the finishShutdown() call.

Definition at line 64 of file RunnersRegistry.cc.

References FindRunners(), RegisteredRunner::finishShutdown(), GetRidOfRunner(), RunnersGone, and TheRunners.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors