TResources.RegisterReader¶
Registers a resource reader class
Declaration¶
Source position: resource.pp line 279
public
class procedure TResources.RegisterReader(const aExtension: string;
aClass: TResourceReaderClass);
Description¶
This class method registers a resource reader class.
When registered, a class is known to TResources class, and can be used by FindReader, LoadFromStream and LoadFromFile methods when probing.
Usually this method is called in the initialization section of the unit implementing a TAbstractResourceReader descendant.
A class can be registered multiple times, one for each extension it is able to read. Multiple class can be registered for the same extension (e.g. both a coff and a elf reader can be registered for the .o extension). The extension must include the leading dot unless the empty string is used (which means "no extension", e.g. a unix executable, which doesn't have an extension).
See also¶
| Name | Description |
|---|---|
| TAbstractResourceReader | Base abstract resource reader class |
| TResources.FindReader | Searches for a suitable resource reader |
| TResources.LoadFromStream | Loads the contents of the object from a stream |
| TResources.LoadFromFile | Loads the contents of the object from a file |