| Description |
I have been using Delphi for several years in writing software for clients and have developed some routines that I have found useful in many of these applications. The applications are mostly databases in which the user did not want all the restrictions imposed by the usual off-the-shelf programs. I have recently retired and decided to turn some of the routines into Delphi components and they are the ones included here -- The FIMA (FIle MAnager) routines. In addition to the components themselves, there is a help file, a 'Create Wizard' that will create various kinds of empty files that represent the early stages of a database system, a program to test the appearance of the SelKey component, a utility program to compress vfiles and a sample application.
- IDGen
- This component supplies record id's for files. When a new record is needed, call the Pop method of this component to get it. Here we use non-negative longints as record id's. The component allows, but does not require, id's from deleted records to be recycled.
- Ffile
- This component is for handling records with fixed lengths. Usually the record is a record structure that has a predictable number of bytes. The file just packs these one after the other. The methods allow for insertion of new records, deleting records and editing and other housekeeping.
- Vfile
- This component is for handling records with variable lengths. Usually the record has some fields with unpredictable lengths, like memos or blobs. The records are not kept in any particular order and can move around when users change their lengths. The file has a companion 'locator' file that keeps track of where things are. In most cases you will have to tell the component the size of the records you are inserting or restoring. Records are transmitted to buffers you provide and there are methods that let you know how big to make the buffer for a record.
- IDSet
- This object allows you to work with sets of id's, important when the id's can be used to fetch records. The methods allow for insertion of new id's into sets, deletion of id's for sets and combining sets in various ways. Use this object by inserting a 'IDSetU' name in the uses clause of your program.
- Key
- This component allows the manipulation of and long term storage of very long lists of shortstrings. These lists can be used by SelKey (see below). Each shortstring (called a key here) has an associated keyid, a longint that can be stored in a database instead of the string. This may result in considerable savings in space. Methods allow easy translation from keyid to and from the string. In addition the user may assign the record identifiers of one or more records to a key and manipulate the list in various ways. Provisions are made to treat the strings as primary or secondary keys for records.
- SelKey
- This component allows the user to select one or more keys from a Key component. A long list appear and the user has powerful navigation tools to quickly scan the list for choosing keys. The programmer can then use the assigned id's to fetch the records for viewing and editing. To get a feel for how this works run the TestKey program that comes as part of the FIMA packet.
Includes full source code, help file, and demo.
|