RecordFieldWriter.h
Classes
- RecordFieldWriter -- Record field writer. Base class for the copiers. (full description)
- RecordFieldCopier -- Record field copier. Copies field to field as is. (full description)
- UnequalShapeCopier -- Unequal shape copier. (full description)
- MultiRecordFieldWriter -- Multi field writer. Copy many fields with a single call. (full description)
Interface
- Public Members
- virtual ~RecordFieldWriter()
- virtual void writeField() = 0
Review Status
- Date Reviewed:
- yyyy/mm/dd
Etymology
These classes write values to a field or fields in a record.
Synopsis
These classes are used in the ms2sdfits conversion code.
It might be better if they were moved there.
Motivation
It was useful to set up a number of copiers and invoke them as appropriate
via a single function call. Some copiers may be more complicate than a
direct field to field copy.
To Do
- Either make this generally useful here or move them out of containers
- fully document this
Member Description
Interface
- RecordFieldCopier(RecordInterface &outRecord, RecordFieldId whichOutField, const RecordInterface &inRecord, RecordFieldId whichInField)
- void copy()
- virtual void writeField()
Review Status
- Date Reviewed:
- yyyy/mm/dd
Etymology
Copies a field from a record to another record with a field
of the same type.
Motivation
This type of copy can be inlined.
Member Description
RecordFieldCopier(RecordInterface &outRecord, RecordFieldId whichOutField, const RecordInterface &inRecord, RecordFieldId whichInField)
Interface
- UnequalShapeCopier(RecordInterface &outRecord, RecordFieldId whichOutField, const RecordInterface &inRecord, RecordFieldId whichInField)
- virtual void writeField()
Review Status
- Date Reviewed:
- yyyy/mm/dd
Etymology
Copy fields where the two fields fields do not have the same shape,
however, the number of elements must match. Copying is done element
by element in vector order.
Motivation
Sometimes the shapes need to change even though the number of elements
stays the same.
Member Description
UnequalShapeCopier(RecordInterface &outRecord, RecordFieldId whichOutField, const RecordInterface &inRecord, RecordFieldId whichInField)
Interface
- void addWriter(RecordFieldWriter *fromNew)
- void copy()
- ~MultiRecordFieldWriter()
Review Status
- Date Reviewed:
- yyyy/mm/dd
Etymology
This class contains other copiers and copies multiple fields at a time.
Motivation
It was useful to set up a number of copiers and invoke them as appropriate
via a single function call.
Member Description