var searchData= [ ['z_5fdefault_5fcompression_2142',['Z_DEFAULT_COMPRESSION',['../../../../lang/html/group__compression__constants.html#gad0d06df5b25e4e03ca74b6458626d913',1,'Z_DEFAULT_COMPRESSION()(Global Namespace)'],['../../../../lang/html/group__compression__constants.html#gad0d06df5b25e4e03ca74b6458626d913',1,'Qore::Z_DEFAULT_COMPRESSION()']]], ['zip_2143',['zip',['../../../Util/html/namespace_util.html#ae16b9707242c9ac04ec156c5d7c0e596',1,'Util']]], ['zone_2144',['zone',['../../../../lang/html/class_qore_1_1zzz8datezzz9.html#a4a7478124248ca3f481e52598244e2ae',1,'Qore::<date>::zone()'],['../../../../lang/html/struct_qore_1_1_date_time_info.html#a1f4b6d0e4bcf84d68a0b665906211955',1,'Qore::DateTimeInfo::zone()']]], ['zone_5fname_2145',['zone_name',['../../../../lang/html/struct_qore_1_1_date_time_info.html#abd6c3fbd1a1eb9dc6abc5824bf1ae237',1,'Qore::DateTimeInfo']]], ['zzz8binaryzzz9_2146',['binary',['../../../../lang/html/class_qore_1_1zzz8binaryzzz9.html',1,'Qore']]], ['zzz8boolzzz9_2147',['bool',['../../../../lang/html/class_qore_1_1zzz8boolzzz9.html',1,'Qore']]], ['zzz8callrefzzz9_2148',['callref',['../../../../lang/html/class_qore_1_1zzz8callrefzzz9.html',1,'Qore']]], ['zzz8closurezzz9_2149',['closure',['../../../../lang/html/class_qore_1_1zzz8closurezzz9.html',1,'Qore']]], ['zzz8datezzz9_2150',['date',['../../../../lang/html/class_qore_1_1zzz8datezzz9.html',1,'Qore']]], ['zzz8floatzzz9_2151',['float',['../../../../lang/html/class_qore_1_1zzz8floatzzz9.html',1,'Qore']]], ['zzz8hashzzz9_2152',['hash',['../../../../lang/html/class_qore_1_1zzz8hashzzz9.html',1,'Qore']]], ['zzz8intzzz9_2153',['int',['../../../../lang/html/class_qore_1_1zzz8intzzz9.html',1,'Qore']]], ['zzz8listzzz9_2154',['list',['../../../../lang/html/class_qore_1_1zzz8listzzz9.html',1,'Qore']]], ['zzz8nothingzzz9_2155',['nothing',['../../../../lang/html/class_qore_1_1zzz8nothingzzz9.html',1,'Qore']]], ['zzz8numberzzz9_2156',['number',['../../../../lang/html/class_qore_1_1zzz8numberzzz9.html',1,'Qore']]], ['zzz8objectzzz9_2157',['object',['../../../../lang/html/class_qore_1_1zzz8objectzzz9.html',1,'Qore']]], ['zzz8stringzzz9_2158',['string',['../../../../lang/html/class_qore_1_1zzz8stringzzz9.html',1,'Qore']]], ['zzz8valuezzz9_2159',['value',['../../../../lang/html/class_qore_1_1zzz8valuezzz9.html',1,'Qore']]] ];
FixedLengthUtil::FixedLengthAbstractWriter Class Referenceabstract

Structured abstract writer for fixed-length lines. More...

Inheritance diagram for FixedLengthUtil::FixedLengthAbstractWriter:

Public Member Functions

bool checkTransition (*string from, *string to)
 A verification function to be called for each line. This method can be overridden to achieve a begin-to-end validation of the whole input file. More...
 
 constructor (hash< auto > specs, *hash< auto > opts)
 creates the FixedLengthAbstractWriter object More...
 
string formatLine (hash< auto > line)
 Formats a single line from a hash describing the record type and its contents. More...
 
int linesCount ()
 get processed lines count
 
abstract write (hash< auto > line)
 Renders a single line for a single input record hash to the output. More...
 
abstract write (list< auto > lines)
 iterates the input records and writes rendered versions of all input records to the output More...
 
abstract write (Qore::AbstractIterator lines)
 iterates the input records and writes rendered versions of all input records to the output More...
 
- Public Member Functions inherited from FixedLengthUtil::FixedLengthBase
 constructor (hash< auto > m_specs, *hash< auto > m_opts)
 Creates the object from the record specifications.
 
*hash< string, AbstractDataField > getRecordType ()
 Returns the description of the record type, if any.
 

Additional Inherited Members

- Protected Attributes inherited from FixedLengthUtil::FixedLengthBase
const GlobalOptionMap
 Translates from global options to data provider options.
 
*hash< auto > m_opts
 Global input or output options.
 
hash< auto > m_specs
 The record specifications.
 

Detailed Description

Structured abstract writer for fixed-length lines.

Member Function Documentation

◆ checkTransition()

bool FixedLengthUtil::FixedLengthAbstractWriter::checkTransition ( *string  from,
*string  to 
)

A verification function to be called for each line. This method can be overridden to achieve a begin-to-end validation of the whole input file.

Parameters
fromType of previous line being processed
toType of the current line being processed

◆ constructor()

FixedLengthUtil::FixedLengthAbstractWriter::constructor ( hash< auto >  specs,
*hash< auto >  opts 
)

creates the FixedLengthAbstractWriter object

Parameters
specsFixed-length line specification; see Specification Hash for more information
optsGlobal options; see Global Options for valid values

◆ formatLine()

string FixedLengthUtil::FixedLengthAbstractWriter::formatLine ( hash< auto >  line)

Formats a single line from a hash describing the record type and its contents.

Parameters
linea hash describing the record to be formatted; the hash must have the following keys:
  • "type": a string giving the record type (must be defined in Specification Hash given in the constructor)
  • "record": a hash giving the input record to be rendered (with keys as defined in the Record Description Hash for the record identified by the type argument)
Exceptions
INVALID-LINE-DATAline argument missing either type or record keys
INVALID-RECORDrecord name (type key in the record hash) not recognized
FIELD-INPUT-ERRORthe input value is too large to render into the output field
RECORD-TRANSITION-ERRORa record transition error occurred; an invalid record sequence was given in the input data

◆ write() [1/3]

abstract FixedLengthUtil::FixedLengthAbstractWriter::write ( hash< auto >  line)
pure virtual

Renders a single line for a single input record hash to the output.

Parameters
lineA hash representing input data to be written to the output; the hash must have the following keys:
  • "type": a string giving the record type (must be defined in Specification Hash given in the constructor)
  • "record": a hash giving the input record to be rendered (with keys as defined in the Record Description Hash for the record identified by the type argument)
Exceptions
INVALID-RECORDrecord name (type key in the record hash) not recognized
FIELD-INPUT-ERRORthe input value is too large to render into the output field
RECORD-TRANSITION-ERRORa record transition error occurred; an invalid record sequence was given in the input data

Implemented in FixedLengthUtil::FixedLengthWriter, FixedLengthUtil::FixedLengthFileWriter, and FixedLengthUtil::FixedLengthDataWriter.

◆ write() [2/3]

abstract FixedLengthUtil::FixedLengthAbstractWriter::write ( list< auto >  lines)
pure virtual

iterates the input records and writes rendered versions of all input records to the output

Parameters
linesA list of input records; each list value must be a hash with the following keys:
  • "type": a string giving the record type (must be defined in Specification Hash given in the constructor)
  • "record": a hash giving the input record to be rendered (with keys as defined in the Record Description Hash for the record identified by the type argument)
Exceptions
INVALID-RECORDrecord name (type key in the record hash) not recognized
FIELD-INPUT-ERRORthe input value is too large to render into the output field
RECORD-TRANSITION-ERRORa record transition error occurred; an invalid record sequence was given in the input data

Implemented in FixedLengthUtil::FixedLengthWriter, FixedLengthUtil::FixedLengthFileWriter, and FixedLengthUtil::FixedLengthDataWriter.

◆ write() [3/3]

abstract FixedLengthUtil::FixedLengthAbstractWriter::write ( Qore::AbstractIterator  lines)
pure virtual

iterates the input records and writes rendered versions of all input records to the output

Parameters
linesAn iterator to stream input records; each iterator value must be a hash with the following keys:
  • "type": a string giving the record type (must be defined in Specification Hash given in the constructor)
  • "record": a hash giving the input record to be rendered (with keys as defined in the Record Description Hash for the record identified by the type argument)
Exceptions
INVALID-RECORDrecord name (type key in the record hash) not recognized
FIELD-INPUT-ERRORthe input value is too large to render into the output field
RECORD-TRANSITION-ERRORa record transition error occurred; an invalid record sequence was given in the input data

Implemented in FixedLengthUtil::FixedLengthWriter, FixedLengthUtil::FixedLengthFileWriter, and FixedLengthUtil::FixedLengthDataWriter.