Process Class Reference

#include <process.h>

List of all members.


Detailed Description

Event generation signal.

Objects that generate events need to register a callback with this signal and should only generate events from within the callback.

This signal is triggered from the ProcessEvents() method.


Static Public Member Functions

static bool processEvents ()
 Trigger the ProcessSignal and replay journal events.
static void requestShutdown ()
 Ask the processEvents() function to shutdown.
static void notifyInit (Delegate< bool()> del, F32 order=PROCESS_DEFAULT_ORDER)
template<class T>
static void notifyInit (T func, F32 order=PROCESS_DEFAULT_ORDER)
static void notifyCommandLine (Delegate< void(S32, const char **)> del, F32 order=PROCESS_DEFAULT_ORDER)
template<class T>
static void notifyCommandLine (T func, F32 order=PROCESS_DEFAULT_ORDER)
static void notify (Delegate< void()> del, F32 order=PROCESS_DEFAULT_ORDER)
template<class T>
static void notify (T func, F32 order=PROCESS_DEFAULT_ORDER)
template<class T, class U>
static void notify (T obj, U func, F32 order=PROCESS_DEFAULT_ORDER)
static void remove (Delegate< void()> del)
template<class T>
static void remove (T func)
template<class T, class U>
static void remove (T obj, U func)
static void notifyShutdown (Delegate< bool(void)> del, F32 order=PROCESS_DEFAULT_ORDER)
template<class T>
static void notifyShutdown (T func, F32 order=PROCESS_DEFAULT_ORDER)

Private Member Functions

 Process ()
 Private constructor.

Static Private Member Functions

static bool init ()
 Trigger the registered init functions.
static void handleCommandLine (S32 argc, const char **argv)
 Trigger the registered command line handling functions.
static bool shutdown ()
 Trigger the registered shutdown functions.
static Processget ()
 Access method will construct the singleton as necessary.

Private Attributes

Signal< bool()> _signalInit
Signal< void(S32, const char **)> _signalCommandLine
Signal< void()> _signalProcess
Signal< bool()> _signalShutdown
bool _RequestShutdown

Static Private Attributes

static Process_theOneProcess
 the one instance of the Process class

Friends

class StandardMainLoop


Constructor & Destructor Documentation

Process::Process (  )  [private]

Private constructor.


Member Function Documentation

static bool Process::processEvents (  )  [static]

Trigger the ProcessSignal and replay journal events.

The ProcessSignal is triggered during which all events are generated, journaled, and delivered using the EventSignal classes. Event producers should only generate events from within the function they register with ProcessSignal. ProcessSignal is also triggered during event playback, though all new events are thrown away so as not to interfere with journal playback. This function returns false if Process::requestShutdown() has been called, otherwise it returns true.

NOTE: This should only be called from main loops - it should really be private, but we need to sort out how to handle the unit test cases

static void Process::requestShutdown (  )  [static]

Ask the processEvents() function to shutdown.

static void Process::notifyInit ( Delegate< bool()>  del,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

template<class T>
static void Process::notifyInit ( func,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

static void Process::notifyCommandLine ( Delegate< void(S32, const char **)>  del,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

template<class T>
static void Process::notifyCommandLine ( func,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

static void Process::notify ( Delegate< void()>  del,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

template<class T>
static void Process::notify ( func,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

template<class T, class U>
static void Process::notify ( obj,
func,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

static void Process::remove ( Delegate< void()>  del  )  [inline, static]

template<class T>
static void Process::remove ( func  )  [inline, static]

template<class T, class U>
static void Process::remove ( obj,
func 
) [inline, static]

static void Process::notifyShutdown ( Delegate< bool(void)>  del,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

template<class T>
static void Process::notifyShutdown ( func,
F32  order = PROCESS_DEFAULT_ORDER 
) [inline, static]

static bool Process::init (  )  [static, private]

Trigger the registered init functions.

static void Process::handleCommandLine ( S32  argc,
const char **  argv 
) [static, private]

Trigger the registered command line handling functions.

static bool Process::shutdown (  )  [static, private]

Trigger the registered shutdown functions.

static Process& Process::get (  )  [static, private]

Access method will construct the singleton as necessary.


Friends And Related Function Documentation

friend class StandardMainLoop [friend]


Member Data Documentation

Process* Process::_theOneProcess [static, private]

the one instance of the Process class

Signal<bool()> Process::_signalInit [private]

Signal<void(S32, const char **)> Process::_signalCommandLine [private]

Signal<void()> Process::_signalProcess [private]

Signal<bool()> Process::_signalShutdown [private]