9 #ifndef MULTIHANDLER_H_
10 #define MULTIHANDLER_H_
46 virtual void run() = 0;
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
bool removeComponent(SyncComponent *component)
Remove a component from the control thread's control.
Definition: MultiHandler.cpp:94
bool running_
Definition: MultiHandler.h:119
MultiHandler(Component &owner, const Str &name)
Protected Constructor.
Definition: MultiHandler.cpp:15
Contains the SyncComponent class definition.
bool addComponent(SyncComponent *component)
Put a component in the control thread's control.
Definition: MultiHandler.cpp:54
A pure virtual Handler for a group (list) of Components.
Definition: MultiHandler.h:35
Component * getRunningComponent(void)
Returns the component that is currently running.
Definition: MultiHandler.h:106
A simple pthread Mutex abstraction.
Definition: Mutex.h:20
Mutex mutex_
Mutex for thread-safing an instance.
Definition: MultiHandler.h:128
bool runnable_
Definition: MultiHandler.h:118
virtual ~MultiHandler()
Destructor.
Definition: MultiHandler.cpp:26
virtual void run()=0
Run the component itself Should monitor the state of runnable_.
Abstract Base class for software components that run in the computation cycle.
Definition: SyncComponent.h:22
virtual void shutdown(void)
Stop the handler (and uninit the component)
Definition: MultiHandler.cpp:29
virtual void allowRuns()
Allow runs.
Definition: MultiHandler.h:61
Replacement for standard template class string.
Definition: Str.h:12
Base class for "handlers" of Components.
Definition: Handler.h:49
Abstract Base class for software components.
Definition: Component.h:53
OrderedComponents components_
Definition: MultiHandler.h:116
Contains the FastMap class declaration.
Contains the Logger class definition.
Contains the Handler class declaration.
virtual bool isRunning()
Indicates whether the component is running.
Definition: MultiHandler.h:55
unsigned int runNextIndex_
Definition: MultiHandler.h:117
virtual void stopRuns()
Stop the runs, if they are in progress, and disallow future runs.
Definition: MultiHandler.h:67
void syslogComponentOrder(Logger &logger)
Dumps information about the components in the list to the given Logger.
Definition: MultiHandler.cpp:159
SyncComponent * runningComponent_
Definition: MultiHandler.h:120
virtual void runAll()
Run all items in the list of components.
Definition: MultiHandler.cpp:113
const bool isRunnable()
is the handler (and contained thread) runnable_?
Definition: MultiHandler.h:73
void clearComponentList(void)
Empty the lists (doesn't actually delete the components)
Definition: MultiHandler.cpp:151
virtual void runNext()
Run next item in the list of components.
Definition: MultiHandler.cpp:123
FastMap< SyncComponent::CycleOrder, SyncComponent * > OrderedComponents
Definition: MultiHandler.h:39