Add converter tools have reader options now.

This commit is contained in:
Matthias Koefferlein 2017-08-17 23:35:05 +02:00
parent aa3caeca07
commit c571ae732d
5 changed files with 35 additions and 5 deletions

View File

@ -22,6 +22,7 @@
#include "bdInit.h"
#include "bdWriterOptions.h"
#include "bdReaderOptions.h"
#include "dbLayout.h"
#include "dbReader.h"
#include "dbCIFWriter.h"
@ -33,10 +34,12 @@ main_func (int argc, char *argv [])
bd::init ();
bd::GenericWriterOptions generic_writer_options;
bd::GenericReaderOptions generic_reader_options;
std::string infile, outfile;
tl::CommandLineOptions cmd;
generic_writer_options.add_options_for_cif (cmd);
generic_reader_options.add_options (cmd);
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
<< tl::arg ("output", &outfile, "The output file")
@ -51,9 +54,12 @@ main_func (int argc, char *argv [])
db::LayerMap map;
{
db::LoadLayoutOptions load_options;
generic_reader_options.configure (load_options);
tl::InputStream stream (infile);
db::Reader reader (stream);
map = reader.read (layout);
map = reader.read (layout, load_options);
}
{

View File

@ -22,6 +22,7 @@
#include "bdInit.h"
#include "bdWriterOptions.h"
#include "bdReaderOptions.h"
#include "dbLayout.h"
#include "dbReader.h"
#include "dbDXFWriter.h"
@ -33,10 +34,12 @@ main_func (int argc, char *argv [])
bd::init ();
bd::GenericWriterOptions generic_writer_options;
bd::GenericReaderOptions generic_reader_options;
std::string infile, outfile;
tl::CommandLineOptions cmd;
generic_writer_options.add_options_for_dxf (cmd);
generic_reader_options.add_options (cmd);
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
<< tl::arg ("output", &outfile, "The output file")
@ -51,9 +54,12 @@ main_func (int argc, char *argv [])
db::LayerMap map;
{
db::LoadLayoutOptions load_options;
generic_reader_options.configure (load_options);
tl::InputStream stream (infile);
db::Reader reader (stream);
map = reader.read (layout);
map = reader.read (layout, load_options);
}
{

View File

@ -22,6 +22,7 @@
#include "bdInit.h"
#include "bdWriterOptions.h"
#include "bdReaderOptions.h"
#include "dbLayout.h"
#include "dbReader.h"
#include "contrib/dbGDS2TextWriter.h"
@ -33,9 +34,11 @@ main_func (int argc, char *argv [])
bd::init ();
bd::GenericWriterOptions generic_writer_options;
bd::GenericReaderOptions generic_reader_options;
std::string infile, outfile;
tl::CommandLineOptions cmd;
generic_reader_options.add_options (cmd);
generic_writer_options.add_options_for_gds2 (cmd);
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
@ -51,9 +54,12 @@ main_func (int argc, char *argv [])
db::LayerMap map;
{
db::LoadLayoutOptions load_options;
generic_reader_options.configure (load_options);
tl::InputStream stream (infile);
db::Reader reader (stream);
map = reader.read (layout);
map = reader.read (layout, load_options);
}
{

View File

@ -22,6 +22,7 @@
#include "bdInit.h"
#include "bdWriterOptions.h"
#include "bdReaderOptions.h"
#include "dbLayout.h"
#include "dbReader.h"
#include "dbOASISWriter.h"
@ -33,9 +34,11 @@ main_func (int argc, char *argv [])
bd::init ();
bd::GenericWriterOptions generic_writer_options;
bd::GenericReaderOptions generic_reader_options;
std::string infile, outfile;
tl::CommandLineOptions cmd;
generic_reader_options.add_options (cmd);
generic_writer_options.add_options_for_oasis (cmd);
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
@ -51,9 +54,12 @@ main_func (int argc, char *argv [])
db::LayerMap map;
{
db::LoadLayoutOptions load_options;
generic_reader_options.configure (load_options);
tl::InputStream stream (infile);
db::Reader reader (stream);
map = reader.read (layout);
map = reader.read (layout, load_options);
}
{

View File

@ -21,6 +21,7 @@
*/
#include "bdInit.h"
#include "bdReaderOptions.h"
#include "dbLayout.h"
#include "dbReader.h"
#include "dbTextWriter.h"
@ -31,9 +32,11 @@ main_func (int argc, char *argv [])
{
bd::init ();
bd::GenericReaderOptions generic_reader_options;
std::string infile, outfile;
tl::CommandLineOptions cmd;
generic_reader_options.add_options (cmd);
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
<< tl::arg ("output", &outfile, "The output file")
@ -48,9 +51,12 @@ main_func (int argc, char *argv [])
db::LayerMap map;
{
db::LoadLayoutOptions load_options;
generic_reader_options.configure (load_options);
tl::InputStream stream (infile);
db::Reader reader (stream);
map = reader.read (layout);
map = reader.read (layout, load_options);
}
{