[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'BufDataset' (#fcl)

RegisterDatapacketReader

Registers a data packet reader using a specific format for TBufDataset

Declaration

Source position: bufdataset.pas line 705

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

TDataPacketReader

  

Implements a data packet reader for TBufDataset

TDataPacketFormat

  

Indicates the format used for data packets in TBufDataset

TXMLDatapacketReader


Documentation generated on: Jun 22 2020