Defines the base interface for all server-side controllers.
More...
#include <abstractcontroller.h>
Inherited by RestLink::AbstractResourceController.
Defines the base interface for all server-side controllers.
This class provides a contract for handling incoming server requests. Subclasses must implement the endpoint(), canProcessRequest() and processRequest() methods. A generic data source can be associated with the controller using setDataSource(), the RestLink SQL plugin will set a QSqlDatabase instance for example.
◆ AbstractController()
| RestLink::AbstractController::AbstractController |
( |
| ) |
|
|
explicit |
◆ ~AbstractController()
| RestLink::AbstractController::~AbstractController |
( |
| ) |
|
|
virtual |
◆ endpoint()
| QString RestLink::AbstractController::endpoint |
( |
| ) |
const |
|
pure virtual |
Returns the base endpoint this controller is responsible for.
◆ canProcessRequest()
| bool RestLink::AbstractController::canProcessRequest |
( |
const ServerRequest & |
request | ) |
const |
|
virtual |
◆ processRequest()
◆ dataSource()
| void * RestLink::AbstractController::dataSource |
( |
| ) |
const |
Returns the data source associated with this controller.
◆ setDataSource()
| void RestLink::AbstractController::setDataSource |
( |
void * |
source | ) |
|
Sets the data source for the controller.
- Parameters
-
| source | A generic pointer to a data source, typically used by the controller to retrieve or manipulate data. |