Qore FixedLengthUtil Module Reference 1.5
Loading...
Searching...
No Matches
FixedLengthUtil::FixedLengthWriteDataProvider Class Reference

Provides a data provider for reading fixed-length files. More...

#include <FixedLengthWriteDataProvider.qc.dox.h>

Inheritance diagram for FixedLengthUtil::FixedLengthWriteDataProvider:
[legend]

Public Member Methods

 constructor (*hash< auto > options)
 Creates the object from constructor options.
 
 constructor (OutputStream stream, hash< auto > specs, *hash< auto > opts)
 Creates the FixedLengthWriteDataProvider with the output data stream where data will be writeen and an option hash. More...
 
 constructor (string path, hash< auto > specs, *hash< auto > opts)
 Creates the FixedLengthWriteDataProvider with the output path and optionally an option hash. More...
 
string getName ()
 Returns the object name.
 

Public Attributes

const ConstructorOptions
 Constructor options.
 
const FixedLengthWriteOptionList = keys (ConstructorOptions - ("path", "stream", "spec"))
 write option list
 
const ProviderInfo
 Provider info.
 

Private Member Methods

*hash< auto > createRecordImpl (hash< auto > rec, *hash< auto > create_options)
 Creates the given record to the data provider. More...
 
*hash< string, AbstractDataField > getRecordTypeImpl (*hash< auto > search_options)
 Returns the description of the record type, if any.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 

Private Attributes

FixedLengthAbstractWriter writer
 the writer object
 

Detailed Description

Provides a data provider for reading fixed-length files.

Member Function Documentation

◆ constructor() [1/2]

FixedLengthUtil::FixedLengthWriteDataProvider::constructor ( OutputStream  stream,
hash< auto >  specs,
*hash< auto >  opts 
)

Creates the FixedLengthWriteDataProvider with the output data stream where data will be writeen and an option hash.

Parameters
streamthe output stream for writing the data
specsFixed-length line specification; see Specification Hash for more information
optsGlobal options; see Global Options for valid values
Exceptions
FIXED-LENGTH-UTIL-PADDING-ERRORrecord padding error

◆ constructor() [2/2]

FixedLengthUtil::FixedLengthWriteDataProvider::constructor ( string  path,
hash< auto >  specs,
*hash< auto >  opts 
)

Creates the FixedLengthWriteDataProvider with the output path and optionally an option hash.

Parameters
pathThe output file to write
specsFixed-length line specification; see Specification Hash for more information
optsGlobal options; see Global Options for valid values
Exceptions
FIXED-LENGTH-UTIL-PADDING-ERRORrecord padding error

◆ createRecordImpl()

*hash< auto > FixedLengthUtil::FixedLengthWriteDataProvider::createRecordImpl ( hash< auto >  rec,
*hash< auto >  create_options 
)
private

Creates the given record to the data provider.

Parameters
reca hash representing a single input record
create_optionsthe create options after processing by validateCreateOptions()
Returns
the data written to the data provider