Class TBrookURLRoutes

Unit

Declaration

type TBrookURLRoutes = class(TBrookHandledOwnedCollection)

Description

Class to represent an list of URL routes.

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TPersistent); virtual;
Public destructor Destroy; override;
Public class function GetRouterClass: TBrookURLRouteClass; virtual;
Public function GetEnumerator: TBrookURLRoutesEnumerator;
Public function NewPattern: string; virtual;
Public function Add: TBrookURLRoute; virtual;
Public function First: TBrookURLRoute; virtual;
Public function Last: TBrookURLRoute; virtual;
Public function IndexOf(const APattern: string): Integer; virtual;
Public function Find(const APattern: string): TBrookURLRoute; virtual;
Public function FindDefault: TBrookURLRoute; virtual;
Public function Remove(const APattern: string): Boolean; virtual;
Public procedure Clear; virtual;

Properties

Public property Items[AIndex:Integer]: TBrookURLRoute read GetItem write SetItem;

Description

Methods

Public constructor Create(AOwner: TPersistent); virtual;

Creates an instance of TBrookURLRoutes.

Parameters
AOwner[in]
Routes persistent.
Public destructor Destroy; override;

Frees an instance of TBrookURLRoutes.

Public class function GetRouterClass: TBrookURLRouteClass; virtual;

Gets the default class for route item creation.

Public function GetEnumerator: TBrookURLRoutesEnumerator;

Creates an enumerator to iterate the routes through for..in.

Public function NewPattern: string; virtual;

Generates a new route pattern.

Public function Add: TBrookURLRoute; virtual;

Adds a new item to the routes list.

Returns

Route item.

Public function First: TBrookURLRoute; virtual;

Gets the first route in the routes list.

Public function Last: TBrookURLRoute; virtual;

Gets the last route in the routes list.

Public function IndexOf(const APattern: string): Integer; virtual;

Gets the route index by its pattern.

Public function Find(const APattern: string): TBrookURLRoute; virtual;

Finds a route in the routes list by its pattern.

Parameters
APattern[in]
Route name.
Public function FindDefault: TBrookURLRoute; virtual;

Finds a default route in the routes list.

Public function Remove(const APattern: string): Boolean; virtual;

Removes a route from the routes list by its pattern.

Parameters
APattern[in]
Route name.
Public procedure Clear; virtual;

Clears the routes list.

Properties

Public property Items[AIndex:Integer]: TBrookURLRoute read GetItem write SetItem;

Gets/sets a route from/to the routes list by its index.


Generated by PasDoc 0.16.0.