-
Notifications
You must be signed in to change notification settings - Fork 1
/
BrookMediaTypes.TBrookMediaTypes.html
358 lines (357 loc) · 19.1 KB
/
BrookMediaTypes.TBrookMediaTypes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE html>
<html lang="en">
<head>
<title>Brook Tardigrade: BrookMediaTypes: Class TBrookMediaTypes</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="tipuesearch/tipuesearch.css">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<div class="container"><div class="navigation">
<h2><a href="index.html">Brook Tardigrade</a></h2><ul><li><a href="AllUnits.html">Units</a></li><li><a href="ClassHierarchy.html">Class Hierarchy</a></li><li><a href="AllClasses.html">Classes, Interfaces, Objects and Records</a></li><li><a href="AllTypes.html">Types</a></li><li><a href="AllVariables.html">Variables</a></li><li><a href="AllConstants.html">Constants</a></li><li><a href="AllFunctions.html">Functions and Procedures</a></li><li><a href="AllIdentifiers.html">Identifiers</a></li><li><form class="search-form" action="tipue_results.html"><div class="search-input"><input type="text" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required><div class="search-button"><input type="button" id="tipue_search_button" onclick="this.form.submit();"></div></div></form>
<div style="clear: both"></div>
</li></ul></div><div class="content">
<span id="TBrookMediaTypes"></span><h1 class="cio">Class TBrookMediaTypes</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section"><a class="section" href="#PasDoc-Properties">Properties</a></div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="BrookMediaTypes.html">BrookMediaTypes</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TBrookMediaTypes = class abstract(<a class="normal" href="BrookHandledClasses.TBrookHandledPersistent.html">TBrookHandledPersistent</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Cached abstract class to register, <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Add">add</a>, <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Remove">remove</a>, <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Find">find</a> a media type.</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="ancestor">TPersistent</li>
<li class="ancestor"><a class="normal" href="BrookHandledClasses.TBrookHandledPersistent.html">TBrookHandledPersistent</a></li>
<li class="thisitem">TBrookMediaTypes</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Create">Create</a></strong>; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Destroy">Destroy</a></strong>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#GetRegisterAlias">GetRegisterAlias</a></strong>: string; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#GetDescription">GetDescription</a></strong>: string; virtual; abstract;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#IsValid">IsValid</a></strong>(const AType: string): Boolean; static; inline;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#IsText">IsText</a></strong>(const AType: string): Boolean; static; inline;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#IsExt">IsExt</a></strong>(const AExt: string): Boolean; static; inline;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#NormalizeExt">NormalizeExt</a></strong>(const AExt: string): string; static; inline;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Prepare">Prepare</a></strong>; virtual; abstract;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Add">Add</a></strong>(const AExt, AType: string); virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Remove">Remove</a></strong>(const AExt: string); virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#TryType">TryType</a></strong>(const AExt: string; out AType: string): Boolean; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Find">Find</a></strong>(const AExt, ADefType: string): string; overload; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Find">Find</a></strong>(const AExt: string): string; overload; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Count">Count</a></strong>: Integer; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Clear">Clear</a></strong>; virtual;</code></td>
</tr>
</table>
<span id="PasDoc-Properties"></span><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#DefaultType">DefaultType</a></strong>: string read FDefaultType write SetDefaultType;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="BrookMediaTypes.TBrookMediaTypes.html#Prepared">Prepared</a></strong>: Boolean read IsPrepared;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Create"></span><code>constructor <strong>Create</strong>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Creates an instance of <code><a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html">TBrookMediaTypes</a></code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Destroy"></span><code>destructor <strong>Destroy</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Destroys an instance of <code><a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html">TBrookMediaTypes</a></code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="GetRegisterAlias"></span><code>class function <strong>GetRegisterAlias</strong>: string; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the alias name for media type source. </p>
<h6 class="description_section">Returns</h6>
<p class="return">Media type source alias.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="GetDescription"></span><code>class function <strong>GetDescription</strong>: string; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the description of the media types source. </p>
<h6 class="description_section">Returns</h6>
<p class="return">Description of the media types source.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="IsValid"></span><code>class function <strong>IsValid</strong>(const AType: string): Boolean; static; inline;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns <code>True</code> if a string represents a media type, e.g <code>'text/plain'</code>. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AType[in]</dt>
<dd>Media type identifier.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return"><code>True</code> if a string represents a media type.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="IsText"></span><code>class function <strong>IsText</strong>(const AType: string): Boolean; static; inline;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns <code>True</code> if a string represents a text media type, e.g. <code>'text/plain'</code>. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AType[in]</dt>
<dd>Media type identifier.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return"><code>True</code> if a string represents a text media type.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="IsExt"></span><code>class function <strong>IsExt</strong>(const AExt: string): Boolean; static; inline;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns <code>True</code> if a string represents a file extension, e.g. <code>'text/plain'</code>. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return"><code>True</code> if a string represents a file extension.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="NormalizeExt"></span><code>class function <strong>NormalizeExt</strong>(const AExt: string): string; static; inline;</code></td>
</tr>
<tr><td colspan="2">
<p>
Normalizes file extension by adding a dot, e.g. a <code>'pas'</code> will be normalized to <code>'.pas'</code>. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return">Normalized file extension.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Prepare"></span><code>procedure <strong>Prepare</strong>; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Prepares the media types source.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Add"></span><code>procedure <strong>Add</strong>(const AExt, AType: string); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Adds a new media type to the cache. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
<dt>AType[in]</dt>
<dd>Media type identifier.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Remove"></span><code>procedure <strong>Remove</strong>(const AExt: string); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Removes a media type from the cache. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="TryType"></span><code>function <strong>TryType</strong>(const AExt: string; out AType: string): Boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
If the cache is not <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Prepared">prepared</a> yet, this method prepares it automatically and tries to <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Find">find</a> a media type identifier by file extension. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
<dt>AType[in]</dt>
<dd>Media type identifier.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return"><code>True</code> if the media type identifier is found.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Find"></span><code>function <strong>Find</strong>(const AExt, ADefType: string): string; overload; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Finds a media type identifier by file extension. If the cache is not <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Prepared">prepared</a> yet, this method prepares it automatically. If a media type identifier is not found, the <code>ADefType</code> is returned instead. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
<dt>ADefType[in]</dt>
<dd>Default media type identifier.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return">Media type identifier.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Find"></span><code>function <strong>Find</strong>(const AExt: string): string; overload; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Finds a media type identifier by file extension. If the cache is not <a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Prepared">prepared</a> yet, this method prepares it automatically. If a media type identifier is not found, the <code><a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#DefaultType">DefaultType</a></code> is returned instead. </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>AExt[in]</dt>
<dd>File extension.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return">Media type identifier.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Count"></span><code>function <strong>Count</strong>: Integer; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Counts all media type identifiers present in the cache. </p>
<h6 class="description_section">Returns</h6>
<p class="return">All media type identifiers present in the cache.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Clear"></span><code>procedure <strong>Clear</strong>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Clears all media type identifiers present in the cache.</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="DefaultType"></span><code>property <strong>DefaultType</strong>: string read FDefaultType write SetDefaultType;</code></td>
</tr>
<tr><td colspan="2">
<p>
Default media type identifier returned by <code><a class="normal" href="BrookMediaTypes.TBrookMediaTypes.html#Find">Find</a></code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Prepared"></span><code>property <strong>Prepared</strong>: Boolean read IsPrepared;</code></td>
</tr>
<tr><td colspan="2">
<p>
<code>True</code> if the media types cache is <code>prepared</code>.</p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0</a>. </em>
</span>
</div></div></body></html>