Wexus2 0.20
wexus::Application::RouteBuilder Class Reference

#include <Application.h>

List of all members.

Public Member Functions

 RouteBuilder (Application &app)
 ~RouteBuilder ()
 destructor
void addMatch (const QString &matchString, const QVariantMap &defaults=QVariantMap())
void addStandardRoutes (void)

Protected Attributes

Applicationdm_app

Detailed Description

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.

Author:
Aleksander Demko

Constructor & Destructor Documentation

wexus::Application::RouteBuilder::RouteBuilder ( Application app)

Start building a new route for the given app. Any previous routing table will be destroyed.

Author:
Aleksander Demko

Member Function Documentation

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.

Parameters:
matchStringthe match string
defaultsthe default values for any params. This will be overriden with matched vars, ofcourse.
Author:
Aleksander Demko
void wexus::Application::RouteBuilder::addStandardRoutes ( void  )

Adds a bunch of default routes.

Author:
Aleksander Demko

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator