magpie
Loading...
Searching...
No Matches
magpie::ContextApp< ContextType > Class Template Referenceabstract

#include <AppDecl.hpp>

Inheritance diagram for magpie::ContextApp< ContextType >:
Collaboration diagram for magpie::ContextApp< ContextType >:

Public Member Functions

 ContextApp (AppConfig &&config)
template<typename T>
void useNotFoundErrorHandler ()
template<typename T>
void use500ErrorHandler ()
virtual Middlewares< ContextType > * getMiddlewaresAsPtr ()=0
Public Member Functions inherited from magpie::BaseApp
 BaseApp (AppConfig &&config)
virtual const routing::BaseRoutergetRouter ()=0
virtual void run ()=0
virtual void shutdown ()=0
virtual data::CommonDatagetContext () const =0
const AppConfiggetConfig ()

Public Attributes

std::shared_ptr< StatusHandlerNotFound< ContextType > > notFoundErrorHandler = std::make_shared<StatusHandlerNotFound<ContextType>>()
std::shared_ptr< StatusHandler500< ContextType > > errorHandler = std::make_shared<StatusHandler500<ContextType>>()

Additional Inherited Members

Protected Attributes inherited from magpie::BaseApp
const AppConfig config

Detailed Description

template<data::IsCommonData ContextType = data::CommonData>
class magpie::ContextApp< ContextType >

Base class for the parts of the app using the ContextType. This can be used in places where the base methods are required, but App cannot be used directly due to circular dependencies.

TODO: The CommonData class should probably be made into a template as well so we avoid this extra layer of indirection.


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