chain_of_responsibility_pattern::Handler

class Handler

The interface for handling requests in the chain.

Subclassed by chain_of_responsibility_pattern::AbstractHandler

Public Functions

virtual void handleRequest(const std::string &request) const = 0

Handles the request or forwards it to the next handler.

Parameters:

request – The request to handle.

virtual Handler *setNext(std::shared_ptr<Handler> next) = 0

Sets the next handler in the chain.

Parameters:

next – The next handler.

Returns:

A reference to the current handler for chaining.