34 #ifndef SOMAIO_READER_FORMATREADER_D_H 35 #define SOMAIO_READER_FORMATREADER_D_H 50 #define localMsg( message ) cartoCondMsg( 4, message, "FORMATREADER" ) 73 dsi = checkDataSourceInfo( dsi, options );
75 localMsg(
"Copying allocator context...")
77 setup( obj, dsi->
header(), ac, options );
78 read( obj, dsi, ac, options );
86 localMsg(
"Checking data source info...")
87 dsi = checkDataSourceInfo( dsi, options );
91 std::unique_ptr<T> objp( create( dsi->
header(), ac, options ) );
94 read( *obj, dsi, ac, options );
120 localMsg(
"Checking data source informations...")
124 if( new_options.isNone() )
126 new_options->setProperty(
"format", formatID() );
DataAccess accessMode() const
const carto::rc_ptr< DataSource > dataSource() const
static void setup(T &obj, carto::Object header, const AllocatorContext &context, carto::Object options)
Setup (modify) an existing object according to the given header (maybe resize it etc.).
DataSourceInfo check(DataSourceInfo dsi, carto::Object options=carto::none(), int passbegin=1, int passend=3)
Finds the right format checker.
Generic information retreiver / checker for all data sources and file formats.
static T * create(carto::Object header, const AllocatorContext &context, carto::Object options)
Create a new object according to the given header.
Informative object used by IO system.
const carto::Object & header() const