Wexus2 0.20
|
#include <Application.h>
Public Member Functions | |
RouteBuilder (Application &app) | |
~RouteBuilder () | |
destructor | |
void | addMatch (const QString &matchString, const QVariantMap &defaults=QVariantMap()) |
void | addStandardRoutes (void) |
Protected Attributes | |
Application & | dm_app |
Decendants can instantite this in their constructors to build a routing table.
Route will be matched in order, with the first ones given first chance/priority.
wexus::Application::RouteBuilder::RouteBuilder | ( | Application & | app | ) |
Start building a new route for the given app. Any previous routing table will be destroyed.
void wexus::Application::RouteBuilder::addMatch | ( | const QString & | matchString, |
const QVariantMap & | defaults = QVariantMap() |
||
) |
Adds a basic match route.
It typically looks like /blah/:var/?:id Where blah would be matched directly, :var will be assigned to a variable and ? is optional.
matchString | the match string |
defaults | the default values for any params. This will be overriden with matched vars, ofcourse. |
void wexus::Application::RouteBuilder::addStandardRoutes | ( | void | ) |
Adds a bunch of default routes.