SNode.C
Loading...
Searching...
No Matches
express::Dispatcher Class Referenceabstract

#include <Dispatcher.h>

Inheritance diagram for express::Dispatcher:
Collaboration diagram for express::Dispatcher:

Public Member Functions

 Dispatcher (const Dispatcher &)=delete
Dispatcheroperator= (const Dispatcher &)=delete
 Dispatcher ()=default
virtual ~Dispatcher ()
virtual bool dispatch (Controller &controller, const std::string &parentMountPath, const MountPoint &mountPoint)=0
bool dispatchNext (Controller &controller, const std::string &parentMountPath)
virtual std::list< std::string > getRoutes (const std::string &parentMountPath, const MountPoint &mountPoint, bool strictRouting) const =0

Protected Attributes

std::shared_ptr< RoutenextRoute = nullptr

Friends

class Route

Detailed Description

Definition at line 63 of file Dispatcher.h.

Constructor & Destructor Documentation

◆ Dispatcher() [1/2]

express::Dispatcher::Dispatcher ( const Dispatcher & )
delete

◆ Dispatcher() [2/2]

express::Dispatcher::Dispatcher ( )
default

◆ ~Dispatcher()

express::Dispatcher::~Dispatcher ( )
virtual

Definition at line 52 of file Dispatcher.cpp.

52 {
53 }

Member Function Documentation

◆ dispatch()

virtual bool express::Dispatcher::dispatch ( Controller & controller,
const std::string & parentMountPath,
const MountPoint & mountPoint )
pure virtual

Implemented in express::dispatcher::ApplicationDispatcher, express::dispatcher::MiddlewareDispatcher, and express::dispatcher::RouterDispatcher.

Referenced by express::Route::dispatch().

Here is the caller graph for this function:

◆ dispatchNext()

bool express::Dispatcher::dispatchNext ( Controller & controller,
const std::string & parentMountPath )

Definition at line 55 of file Dispatcher.cpp.

55 {
56 bool dispatched = false;
57
58 if (nextRoute != nullptr) {
59 dispatched = nextRoute->dispatch(controller, parentMountPath);
60 }
61
62 return dispatched;
63 }
std::shared_ptr< Route > nextRoute
Definition Dispatcher.h:80

References express::Route::dispatch(), and nextRoute.

Referenced by express::Route::dispatchNext().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRoutes()

virtual std::list< std::string > express::Dispatcher::getRoutes ( const std::string & parentMountPath,
const MountPoint & mountPoint,
bool strictRouting ) const
pure virtual

Implemented in express::dispatcher::ApplicationDispatcher, express::dispatcher::MiddlewareDispatcher, and express::dispatcher::RouterDispatcher.

Referenced by express::Route::getRoute().

Here is the caller graph for this function:

◆ operator=()

Dispatcher & express::Dispatcher::operator= ( const Dispatcher & )
delete

◆ Route

friend class Route
friend

Definition at line 83 of file Dispatcher.h.

Member Data Documentation

◆ nextRoute

std::shared_ptr<Route> express::Dispatcher::nextRoute = nullptr
protected

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