mirror of https://github.com/KLayout/klayout.git
Add converter tools have reader options now.
This commit is contained in:
parent
aa3caeca07
commit
c571ae732d
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "bdInit.h"
|
#include "bdInit.h"
|
||||||
#include "bdWriterOptions.h"
|
#include "bdWriterOptions.h"
|
||||||
|
#include "bdReaderOptions.h"
|
||||||
#include "dbLayout.h"
|
#include "dbLayout.h"
|
||||||
#include "dbReader.h"
|
#include "dbReader.h"
|
||||||
#include "dbCIFWriter.h"
|
#include "dbCIFWriter.h"
|
||||||
|
|
@ -33,10 +34,12 @@ main_func (int argc, char *argv [])
|
||||||
bd::init ();
|
bd::init ();
|
||||||
|
|
||||||
bd::GenericWriterOptions generic_writer_options;
|
bd::GenericWriterOptions generic_writer_options;
|
||||||
|
bd::GenericReaderOptions generic_reader_options;
|
||||||
std::string infile, outfile;
|
std::string infile, outfile;
|
||||||
|
|
||||||
tl::CommandLineOptions cmd;
|
tl::CommandLineOptions cmd;
|
||||||
generic_writer_options.add_options_for_cif (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)")
|
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
|
||||||
<< tl::arg ("output", &outfile, "The output file")
|
<< tl::arg ("output", &outfile, "The output file")
|
||||||
|
|
@ -51,9 +54,12 @@ main_func (int argc, char *argv [])
|
||||||
db::LayerMap map;
|
db::LayerMap map;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
db::LoadLayoutOptions load_options;
|
||||||
|
generic_reader_options.configure (load_options);
|
||||||
|
|
||||||
tl::InputStream stream (infile);
|
tl::InputStream stream (infile);
|
||||||
db::Reader reader (stream);
|
db::Reader reader (stream);
|
||||||
map = reader.read (layout);
|
map = reader.read (layout, load_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "bdInit.h"
|
#include "bdInit.h"
|
||||||
#include "bdWriterOptions.h"
|
#include "bdWriterOptions.h"
|
||||||
|
#include "bdReaderOptions.h"
|
||||||
#include "dbLayout.h"
|
#include "dbLayout.h"
|
||||||
#include "dbReader.h"
|
#include "dbReader.h"
|
||||||
#include "dbDXFWriter.h"
|
#include "dbDXFWriter.h"
|
||||||
|
|
@ -33,10 +34,12 @@ main_func (int argc, char *argv [])
|
||||||
bd::init ();
|
bd::init ();
|
||||||
|
|
||||||
bd::GenericWriterOptions generic_writer_options;
|
bd::GenericWriterOptions generic_writer_options;
|
||||||
|
bd::GenericReaderOptions generic_reader_options;
|
||||||
std::string infile, outfile;
|
std::string infile, outfile;
|
||||||
|
|
||||||
tl::CommandLineOptions cmd;
|
tl::CommandLineOptions cmd;
|
||||||
generic_writer_options.add_options_for_dxf (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)")
|
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
|
||||||
<< tl::arg ("output", &outfile, "The output file")
|
<< tl::arg ("output", &outfile, "The output file")
|
||||||
|
|
@ -51,9 +54,12 @@ main_func (int argc, char *argv [])
|
||||||
db::LayerMap map;
|
db::LayerMap map;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
db::LoadLayoutOptions load_options;
|
||||||
|
generic_reader_options.configure (load_options);
|
||||||
|
|
||||||
tl::InputStream stream (infile);
|
tl::InputStream stream (infile);
|
||||||
db::Reader reader (stream);
|
db::Reader reader (stream);
|
||||||
map = reader.read (layout);
|
map = reader.read (layout, load_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "bdInit.h"
|
#include "bdInit.h"
|
||||||
#include "bdWriterOptions.h"
|
#include "bdWriterOptions.h"
|
||||||
|
#include "bdReaderOptions.h"
|
||||||
#include "dbLayout.h"
|
#include "dbLayout.h"
|
||||||
#include "dbReader.h"
|
#include "dbReader.h"
|
||||||
#include "contrib/dbGDS2TextWriter.h"
|
#include "contrib/dbGDS2TextWriter.h"
|
||||||
|
|
@ -33,9 +34,11 @@ main_func (int argc, char *argv [])
|
||||||
bd::init ();
|
bd::init ();
|
||||||
|
|
||||||
bd::GenericWriterOptions generic_writer_options;
|
bd::GenericWriterOptions generic_writer_options;
|
||||||
|
bd::GenericReaderOptions generic_reader_options;
|
||||||
std::string infile, outfile;
|
std::string infile, outfile;
|
||||||
|
|
||||||
tl::CommandLineOptions cmd;
|
tl::CommandLineOptions cmd;
|
||||||
|
generic_reader_options.add_options (cmd);
|
||||||
generic_writer_options.add_options_for_gds2 (cmd);
|
generic_writer_options.add_options_for_gds2 (cmd);
|
||||||
|
|
||||||
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
|
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::LayerMap map;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
db::LoadLayoutOptions load_options;
|
||||||
|
generic_reader_options.configure (load_options);
|
||||||
|
|
||||||
tl::InputStream stream (infile);
|
tl::InputStream stream (infile);
|
||||||
db::Reader reader (stream);
|
db::Reader reader (stream);
|
||||||
map = reader.read (layout);
|
map = reader.read (layout, load_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "bdInit.h"
|
#include "bdInit.h"
|
||||||
#include "bdWriterOptions.h"
|
#include "bdWriterOptions.h"
|
||||||
|
#include "bdReaderOptions.h"
|
||||||
#include "dbLayout.h"
|
#include "dbLayout.h"
|
||||||
#include "dbReader.h"
|
#include "dbReader.h"
|
||||||
#include "dbOASISWriter.h"
|
#include "dbOASISWriter.h"
|
||||||
|
|
@ -33,9 +34,11 @@ main_func (int argc, char *argv [])
|
||||||
bd::init ();
|
bd::init ();
|
||||||
|
|
||||||
bd::GenericWriterOptions generic_writer_options;
|
bd::GenericWriterOptions generic_writer_options;
|
||||||
|
bd::GenericReaderOptions generic_reader_options;
|
||||||
std::string infile, outfile;
|
std::string infile, outfile;
|
||||||
|
|
||||||
tl::CommandLineOptions cmd;
|
tl::CommandLineOptions cmd;
|
||||||
|
generic_reader_options.add_options (cmd);
|
||||||
generic_writer_options.add_options_for_oasis (cmd);
|
generic_writer_options.add_options_for_oasis (cmd);
|
||||||
|
|
||||||
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
|
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::LayerMap map;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
db::LoadLayoutOptions load_options;
|
||||||
|
generic_reader_options.configure (load_options);
|
||||||
|
|
||||||
tl::InputStream stream (infile);
|
tl::InputStream stream (infile);
|
||||||
db::Reader reader (stream);
|
db::Reader reader (stream);
|
||||||
map = reader.read (layout);
|
map = reader.read (layout, load_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bdInit.h"
|
#include "bdInit.h"
|
||||||
|
#include "bdReaderOptions.h"
|
||||||
#include "dbLayout.h"
|
#include "dbLayout.h"
|
||||||
#include "dbReader.h"
|
#include "dbReader.h"
|
||||||
#include "dbTextWriter.h"
|
#include "dbTextWriter.h"
|
||||||
|
|
@ -31,9 +32,11 @@ main_func (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
bd::init ();
|
bd::init ();
|
||||||
|
|
||||||
|
bd::GenericReaderOptions generic_reader_options;
|
||||||
std::string infile, outfile;
|
std::string infile, outfile;
|
||||||
|
|
||||||
tl::CommandLineOptions cmd;
|
tl::CommandLineOptions cmd;
|
||||||
|
generic_reader_options.add_options (cmd);
|
||||||
|
|
||||||
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
|
cmd << tl::arg ("input", &infile, "The input file (any format, may be gzip compressed)")
|
||||||
<< tl::arg ("output", &outfile, "The output file")
|
<< tl::arg ("output", &outfile, "The output file")
|
||||||
|
|
@ -48,9 +51,12 @@ main_func (int argc, char *argv [])
|
||||||
db::LayerMap map;
|
db::LayerMap map;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
db::LoadLayoutOptions load_options;
|
||||||
|
generic_reader_options.configure (load_options);
|
||||||
|
|
||||||
tl::InputStream stream (infile);
|
tl::InputStream stream (infile);
|
||||||
db::Reader reader (stream);
|
db::Reader reader (stream);
|
||||||
map = reader.read (layout);
|
map = reader.read (layout, load_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue