Class TBrookMediaTypes
Unit
Declaration
type TBrookMediaTypes = class abstract(TBrookHandledPersistent)
Description
Cached abstract class to register, add, remove, find a media type.
Hierarchy
- TObject
- TPersistent
- TBrookHandledPersistent
- TBrookMediaTypes
Overview
Methods
![]() |
constructor Create; virtual; |
![]() |
destructor Destroy; override; |
![]() |
class function GetRegisterAlias: string; virtual; |
![]() |
class function GetDescription: string; virtual; abstract; |
![]() |
class function IsValid(const AType: string): Boolean; static; inline; |
![]() |
class function IsText(const AType: string): Boolean; static; inline; |
![]() |
class function IsExt(const AExt: string): Boolean; static; inline; |
![]() |
class function NormalizeExt(const AExt: string): string; static; inline; |
![]() |
procedure Prepare; virtual; abstract; |
![]() |
procedure Add(const AExt, AType: string); virtual; |
![]() |
procedure Remove(const AExt: string); virtual; |
![]() |
function TryType(const AExt: string; out AType: string): Boolean; virtual; |
![]() |
function Find(const AExt, ADefType: string): string; overload; virtual; |
![]() |
function Find(const AExt: string): string; overload; virtual; |
![]() |
function Count: Integer; virtual; |
![]() |
procedure Clear; virtual; |
Properties
![]() |
property DefaultType: string read FDefaultType write SetDefaultType; |
![]() |
property Prepared: Boolean read IsPrepared; |
Description
Methods
![]() |
constructor Create; virtual; |
Creates an instance of |
![]() |
destructor Destroy; override; |
Destroys an instance of |
![]() |
class function GetRegisterAlias: string; virtual; |
Returns the alias name for media type source. ReturnsMedia type source alias. |
![]() |
class function GetDescription: string; virtual; abstract; |
Returns the description of the media types source. ReturnsDescription of the media types source. |
![]() |
procedure Prepare; virtual; abstract; |
Prepares the media types source. |
![]() |
procedure Add(const AExt, AType: string); virtual; |
Adds a new media type to the cache. Parameters
|
![]() |
procedure Remove(const AExt: string); virtual; |
Removes a media type from the cache. Parameters
|
![]() |
function TryType(const AExt: string; out AType: string): Boolean; virtual; |
If the cache is not prepared yet, this method prepares it automatically and tries to find a media type identifier by file extension. Parameters
Returns
|
![]() |
function Find(const AExt, ADefType: string): string; overload; virtual; |
Finds a media type identifier by file extension. If the cache is not prepared yet, this method prepares it automatically. If a media type identifier is not found, the Parameters
ReturnsMedia type identifier. |
![]() |
function Find(const AExt: string): string; overload; virtual; |
Finds a media type identifier by file extension. If the cache is not prepared yet, this method prepares it automatically. If a media type identifier is not found, the Parameters
ReturnsMedia type identifier. |
![]() |
function Count: Integer; virtual; |
Counts all media type identifiers present in the cache. ReturnsAll media type identifiers present in the cache. |
![]() |
procedure Clear; virtual; |
Clears all media type identifiers present in the cache. |
Properties
![]() |
property DefaultType: string read FDefaultType write SetDefaultType; |
Default media type identifier returned by |
![]() |
property Prepared: Boolean read IsPrepared; |
|
Generated by PasDoc 0.16.0.