Reference

corelinux_Handler(3)

Defines an interface for handling requests, accessing successors, and optionally implements the successor link.

NAME

corelinux::Handler - Defines an interface for handling requests, accessing successors, and optionally implements the successor link.

SYNOPSIS

#include <Handler.hpp>

Inherits corelinux::Synchronized.

Inherited by HelpHandler.

Public Member Functions

Handler (void)
Default constructor. Handler (HandlerCref)
Copy constructor. virtual ~Handler (void)
Virtual destructor. HandlerRef operator= (HandlerCref)
Operator assignment. bool operator== (HandlerCref) const
Equality operator. HandlerPtr operator++ (void)
Returns successor or NULLPTR if end-of-chain. HandlerPtr operator-- (void)
Returns predecessor or NULLPTR if end-of-chain. void succeedHandler (HandlerPtr) throw ( Assertion )
Have this tie itself as the successor to the argument handler pointer. void precedeHandler (HandlerPtr) throw ( Assertion )
Have this tie itself as the predecessor to the argument handler pointer. void extractSelf (void)
Removes links from self. virtual void handleRequest (RequestPtr)
Routine which either invokes the work method or passes along to successor.

Protected Member Functions

virtual bool handlesType (RequestPtr)=0
Implementation required. virtual void handle (RequestPtr)=0
Implementation required. void setSuccessor (HandlerPtr)
Sets the objects theSuccessor member. void setPredecessor (HandlerPtr)
Sets the objects thePredecessor member. void setSiblings (HandlerPtr, HandlerPtr)
Sets the object siblings as atomic operation.

Protected Attributes

HandlerPtr theSuccessor
Supports chaining of responsibility. HandlerPtr thePredecessor
Supports chaining of responsibility where.

Detailed Description

Defines an interface for handling requests, accessing successors, and optionally implements the successor link.

The builtin behavior is to allow forward and backward chaining of Handlers.

Member Function Documentation

virtual void corelinux::Handler::handle (RequestPtr) [protected, pure virtual]

Implementation required. Once determined if type is handled, then handle it!

Parameters:

Request pointer to request object

Implemented in HandlerHelpHandler, and RequestHelpHandler.

void corelinux::Handler::handleRequest (RequestPtr) [virtual]

Routine which either invokes the work method or passes along to successor. First calls handleType which determines if work is handled here or passed on.

Parameters:

Request pointer to request type

virtual bool corelinux::Handler::handlesType (RequestPtr) [protected, pure virtual]

Implementation required. Respond to type handler requests.

Parameters:

Request pointer to request object to determine if this handler handles the request.

Returns:

bool true if this handler handles type

Implemented in HelpHandler.

void corelinux::Handler::precedeHandler (HandlerPtr) throw ( Assertion )

Have this tie itself as the predecessor to the argument handler pointer. Parameters:

Handler pointer to preceed.

Exceptions:

Assertion if HandlerPtr is NULLPTR

void corelinux::Handler::succeedHandler (HandlerPtr) throw ( Assertion )

Have this tie itself as the successor to the argument handler pointer. Parameters:

Handler pointer to succeed

Exceptions:

Assertion if HandlerPtr is NULLPTR

Author

Generated automatically by Doxygen for CoreLinux++ from the source code.

History