RegisterDatapacketReader procedure
Registers a data packet reader using a specific format for TBufDataset.
Declaration
procedure RegisterDatapacketReader
(ADatapacketReaderClass: TDataPacketReaderClass;
AFormat: TDataPacketFormat)Arguments
ADatapacketReaderClass | Class type used to read data packets in the specified format. |
AFormat | Data packet format used in the reader class type. |
Description
RegisterDatapacketReader is a procedure which registers a class type needed to create data packet readers for a specific format.
ADatapacketReaderClass is the class type used to create new instances of
TDataPacketReader.
AFormat is a
TDataPacketFormat enumeration value that indicates the format supported for data packets in the reader class.
RegisterDatapacketReader accesses a unit variable used to store an array of registered data packet reader classes and their associated formats. RegisterDatapacketReader increments the size of the array variable, and stores the values in ADatapacketReaderClass and AFormat in the TDatapacketReaderRegistration type. It does not perform any checks for duplicate entries, so the procedure should be called exactly once for the class type and format combination.
RegisterDatapacketReader is normally used in the initialization section of a unit that implements a TDataPacketReader descendant for a specific storage format, such as: xmldatapacketreader.pp.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
