NAME
Oorb::ConfigMgrTask - Configuration management task for the oorb library
SYNOPSIS
-loorb $(ORBLIBS)
#include "oorb.h"
namespace Oorb
class ConfigMgrTask
DESCRIPTION
This page describes the
ConfigMgrTask which is used to configure programs
based on the
Oorb(3) library. This is an abstract class which should be
subclassed, defining the
usage and
run methods, in order to
structure the program in question as desired.
Once a subclass of
ConfigMgrTask is defined, an instance of this
subclass should be used as an argument to
Oorb::Master(3) to create
an instance of that
Oorb::Master(3) class, which then controls the
execution of the program.
See the
Oorb(3) man-page for a simple
EXAMPLE of
ConfigMgrTask in use.
CONSTRUCTORS
-
ConfigMgrTask( int argc, char** argv, std::string programName = )
This constructor should be given the argc and argv parameters
from the program so it can tailor program setup according to the arguments
on the command-line. These command-line arguments are subsequently
available from the object via the public members m_argc and m_argv.
If programName is specified, the public member m_programName is set to
programName. Otherwise, m_programName is taken from argv[0].
METHODS
-
virtual void run( void ) = 0
The run method must be defined by subclasses of ConfigMgrTask
to perform the the basic configuration for the Oorb::Master(3) object.
At minimum this method should call the addOrb and addConnection
methods of that Oorb::Master(3) object to set up the basic connectivity
and data flow. The run method may also call the configure
methods of the various Oorb::Task(3) objects available through the
Oorb::Master(3)'s log(), status(), state(), command(),
and signal() methods to configure program behavior based on fixed
characteristics, parameter-file input, and/or command-line input.
-
virtual void usage( void ) = 0
Subclasses of ConfigMgrTask must define the usage method,
specifying the intended command-line invocation of the program. This
method is required because the Oorb::LogMgrTask(3)'s
die_initializing method has the option to call the usage
method upon configuration error.
LIBRARY
-loorb $(ORBLIBS)
ATTRIBUTES
MT-Safe
SEE ALSO
Oorb(3), Oorb::Task(3), Oorb::Configure(3)
AUTHOR
Kent Lindquist