Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ServerMain_T.hh File Reference


Detailed Description

Contains a function template for setting up and running a single object server.

Include dependency graph for ServerMain_T.hh:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  ServerMainData
struct  ServerMainDefaults

Functions

void sigexit_handler (int sig)
 Handler for SIGINT/SIGTERM signals.

void server_main_usage (char *prog_name, struct ServerMainDefaults &smd)
 Output the usage message for this program to standard error.

template<class T, class U> int server_main (struct ServerMainDefaults &smd, int argc, char *argv[])
 Template function for a server that exports a single object.


Variables

ServerMainData server_main_data


Function Documentation

template<class T, class U>
int server_main struct ServerMainDefaults &  smd,
int  argc,
char *  argv[]
 

Template function for a server that exports a single object.

Parameters:
T The object implementation class. The constructor is expected to take a 'const char *' argument that contains the object name.
U The object's _var smart pointer class.
smd The defaults for the command line parameters.
argc The argc passed to the real main.
argv The argv passed to the real main.
Returns:
EXIT_FAILURE or runs for forever.

void server_main_usage char *  prog_name,
struct ServerMainDefaults &  smd
 

Output the usage message for this program to standard error.

Parameters:
prog_name The program name, as given on the command line.
smd The default values for this program.

void sigexit_handler int  sig  ) 
 

Handler for SIGINT/SIGTERM signals.

Parameters:
sig The actual signal received.


Generated on Mon Dec 1 16:22:32 2003 for CPUBroker by doxygen 1.3.4