TResources class
A collection of resources
Declaration
TResources = classDescription
This class represents a format-independent view of a resource file. It holds a collection of resources (TAbstractResource descendants).
Typically, a TResource object is loaded from and written to a stream via format-dependent readers and writers, which are descendants of TAbstractResourceReader and TAbstractResourceWriter, respectively.
Single resources can be added, removed, searched and modified: a resource compiler or editor probably will create resources, set their data, and add them to a TResources object which can then be written to file in the desired format.
This class also provides some class methods to register and find resource readers and writers: these classes, once registered, will be used by a TResources object when it is asked to load or save itself to a stream and the user didn't specify a reader or writer.
See also
Properties
Count | public | The number of resources in the object |
Items | public | Indexed array of resources in the object |
CacheData | public | Controls the copy-on-write behaviour of all resources |
Methods
Create | public | Creates a new TResources object |
Destroy | public | Destroys the object |
Add | public | Adds a resource |
AddAutoID | public | Adds a resource and gives it a new autogenerated name |
Clear | public | Deletes all resources |
Find | public | Searches for a resource |
FindReader | public | Searches for a suitable resource reader |
MoveFrom | public | Moves all resources of another TResources object to itself |
Remove | public | Removes a resource |
LoadFromStream | public | Loads the contents of the object from a stream |
LoadFromFile | public | Loads the contents of the object from a file |
RegisterReader | public | Registers a resource reader class |
RegisterWriter | public | Registers a resource writer class |
WriteToStream | public | Writes the contents of the object to a stream |
WriteToFile | public | Writes the contents of the object to a file |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
