Class TBrookRoutes

Unit

Declaration

type TBrookRoutes = class(TBrookPersistent)

Description

Defines a list of routes.

Hierarchy

Overview

Methods

Protected procedure FreeRoutes; virtual;
Public constructor Create; virtual;
Public destructor Destroy; override;
Public procedure Clear;
Public function Count: Integer;
Public function Add(AActionClass: TBrookActionClass; const APattern: string; const AMethod: TBrookRequestMethod; const ADefault: Boolean): Integer;
Public procedure GetDefaultActionClass(out AClass: TBrookActionClass; out AIndex: Integer);
Public procedure GetEmptyPatternActionClass(out AClass: TBrookActionClass; out AIndex: Integer);
Public function PatternByActionClass(AClass: TBrookActionClass): string;
Public function ActionClassByPattern(const APattern: string): TBrookActionClass;
Public function ActionClassByClassName(const AName: string): TBrookActionClass;

Properties

Protected property List: TFPList read FList;
Public property Items[constAIndex:Integer]: PBrookRoute read GetItems write SetItems;

Description

Methods

Protected procedure FreeRoutes; virtual;
 
Public constructor Create; virtual;

Creates an instance of a TBrookRoutes class.

Public destructor Destroy; override;

Frees an instance of TBrookRoutes class.

Public procedure Clear;

Clears all routes.

Public function Count: Integer;

Returns the number of registered routes.

Public function Add(AActionClass: TBrookActionClass; const APattern: string; const AMethod: TBrookRequestMethod; const ADefault: Boolean): Integer;

Adds a route item.

Public procedure GetDefaultActionClass(out AClass: TBrookActionClass; out AIndex: Integer);

Get the default action class.

Public procedure GetEmptyPatternActionClass(out AClass: TBrookActionClass; out AIndex: Integer);

Get the action class with empty pattern.

Public function PatternByActionClass(AClass: TBrookActionClass): string;

Get the registered pattern of a class.

Public function ActionClassByPattern(const APattern: string): TBrookActionClass;

Get the action class from a patter.

Public function ActionClassByClassName(const AName: string): TBrookActionClass;

Get an action class from its class name.

Properties

Protected property List: TFPList read FList;
 
Public property Items[constAIndex:Integer]: PBrookRoute read GetItems write SetItems;

The list of routes.


Generated by PasDoc 0.15.0.