Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SignalController Class Reference

#include <SignalController.h>

List of all members.


Detailed Description

The central registrar and signal catcher.

A system singleton for registering SignalStrategies. This single instance is available from OrbInit. SignalStrategies are usually registered from the application main line. However, the SignalController is also available via the SignalController::instance static method throughout the life of the application.

OrbInit should be the only owner of the SignalController. It is not necessary for a user to instantiate it.

Author:
Author
knoxy
Version:
Revision
1.3
Date:
Date
2004/11/12 03:53:19


Public Member Functions

 SignalController (SysHook &mgt_hook)
 ~SignalController ()
SignalStrategyaddSignalStrategy (int signo, SignalStrategy *strat)
SignalStrategyremoveSignalStrategy (int signo)

Static Public Member Functions

SignalControllerinstance () throw (BoilerPlate::IllegalStateException)


Constructor & Destructor Documentation

SignalController::SignalController SysHook mgt_hook  ) 
 

ctor

Parameters:
mgt_hook - Accessor for system resources like the POA and ORB.

SignalController::~SignalController  ) 
 

dtor

Note that the SignalController should not be inherited


Member Function Documentation

SignalStrategy* SignalController::addSignalStrategy int  signo,
SignalStrategy strat
 

Add a concrete signal strategy to the map of strategies

The new strategy will be registered using sigaction. The caller must capture the returning value or a memory leak will occur. If the map's slot for the signal was previously empty the caller will get a null pointer. The caller is the new owner of the memory

Parameters:
signo - The signal number defined by signal.h
strat - pointer to a signal strategy
Returns:
Pointer to the previous signal strategy

SignalController& SignalController::instance  )  throw (BoilerPlate::IllegalStateException) [static]
 

A static accessor for global access

Returns:
SignalController reference
Exceptions:
BoilerPlate::IllegalStateException 

SignalStrategy* SignalController::removeSignalStrategy int  signo  ) 
 

Remove a strategy from the map

The map's slot for this signal number will be set to null

Parameters:
signo - The signal number defined by the signal.h
Returns:
Pointer to the signal strategy at that slot in the map.


The documentation for this class was generated from the following file: