System to inject record format & data layout definitions for files created without.
More...
#include <LegacyFormatsProvider.h>
System to inject record format & data layout definitions for files created without.
Early VRS files do not include RecordFormat & DataLayout definitions, but often enough, records can easily be described with the right RecordFormat and DataLayout definitions. This allows an easier transition to RecordFormat and DataLayout, as client code can be updated to rely entirely on RecordFormatStreamPlayer to read older and newer VRS files alike. For this, you can inject RecordFormat and DataLayout definitions using this class.
◆ addLegacyRecordFormat()
Method a LegacyFormatsProvider calls to add a legacy record format definition. The signature is identical to Recordable::addRecordFormat(), except for the RecordableTypeId, which is implicit in the context of a Recordable. Attention! when you provide a RecordFormat for a record type & formatVersion, all of the streams' records of that type & formatVersion must comply with that RecordFormat.
- Parameters
-
recordType | The Record::Type to define. |
formatVersion | The format version to define. |
format | The RecordFormat for the records of the type and format version. |
layouts | A vector of pointers to DataLayouts and nullptr. For each DataLayout content block of the RecordFormat, a pointer to a DataLayout must be provided for the matching index. |
- Returns
- True if the RecordFormat and the layouts match as expected. Otherwise, false is returned and errors will be logged to help debug the problem.
◆ registerLegacyRecordFormats()
virtual void vrs::LegacyFormatsProvider::registerLegacyRecordFormats |
( |
RecordableTypeId |
typeId | ) |
|
|
pure virtual |
Method to implement to provide legacy definitions for a specific device type. When this method is called, call the addRecordFormat() method with the definitions.
- Parameters
-
typeId | the recordable type to provide record format definitions for. |
The documentation for this class was generated from the following files: