mirror of https://github.com/KLayout/klayout.git
Added strm2lstr buddy tool
This commit is contained in:
parent
3809e44777
commit
be62abd646
|
|
@ -14,6 +14,7 @@ SOURCES = \
|
|||
strm2cif.cc \
|
||||
strm2gds.cc \
|
||||
strm2oas.cc \
|
||||
strm2lstr.cc \
|
||||
strmclip.cc \
|
||||
strm2dxf.cc \
|
||||
strm2gdstxt.cc \
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ GenericWriterOptions::init_from_options (const db::SaveLayoutOptions &save_optio
|
|||
const std::string GenericWriterOptions::gds2_format_name = "GDS2";
|
||||
const std::string GenericWriterOptions::gds2text_format_name = "GDS2Text"; // no special options
|
||||
const std::string GenericWriterOptions::oasis_format_name = "OASIS";
|
||||
const std::string GenericWriterOptions::lstream_format_name = "LStream";
|
||||
const std::string GenericWriterOptions::dxf_format_name = "DXF";
|
||||
const std::string GenericWriterOptions::cif_format_name = "CIF";
|
||||
const std::string GenericWriterOptions::mag_format_name = "MAG";
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ public:
|
|||
static const std::string gds2_format_name;
|
||||
static const std::string gds2text_format_name;
|
||||
static const std::string oasis_format_name;
|
||||
static const std::string lstream_format_name;
|
||||
static const std::string cif_format_name;
|
||||
static const std::string dxf_format_name;
|
||||
static const std::string mag_format_name;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2025 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "bdConverterMain.h"
|
||||
#include "bdWriterOptions.h"
|
||||
|
||||
BD_PUBLIC int strm2lstr (int argc, char *argv[])
|
||||
{
|
||||
return bd::converter_main (argc, argv, bd::GenericWriterOptions::lstream_format_name);
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ SUBDIRS = \
|
|||
strm2gds \
|
||||
strm2gdstxt \
|
||||
strm2oas \
|
||||
strm2lstr \
|
||||
strm2mag \
|
||||
strm2txt \
|
||||
strmclip \
|
||||
|
|
@ -20,6 +21,7 @@ strm2dxf.depends += bd
|
|||
strm2gds.depends += bd
|
||||
strm2gdstxt.depends += bd
|
||||
strm2oas.depends += bd
|
||||
strm2lstr.depends += bd
|
||||
strm2mag.depends += bd
|
||||
strm2txt.depends += bd
|
||||
strmclip.depends += bd
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
include($$PWD/../buddy_app.pri)
|
||||
|
|
@ -187,6 +187,31 @@ TEST(6)
|
|||
db::compare_layouts (this, layout, input_au, db::WriteGDS2);
|
||||
}
|
||||
|
||||
// Testing the converter main implementation (LStream)
|
||||
TEST(7)
|
||||
{
|
||||
std::string input = tl::testdata ();
|
||||
input += "/gds/t10.gds";
|
||||
|
||||
std::string output = this->tmp_file ();
|
||||
|
||||
const char *argv[] = { "x", input.c_str (), output.c_str () };
|
||||
|
||||
EXPECT_EQ (bd::converter_main (sizeof (argv) / sizeof (argv[0]), (char **) argv, bd::GenericWriterOptions::lstream_format_name), 0);
|
||||
|
||||
db::Layout layout;
|
||||
|
||||
{
|
||||
tl::InputStream stream (output);
|
||||
db::LoadLayoutOptions options;
|
||||
db::Reader reader (stream);
|
||||
reader.read (layout, options);
|
||||
EXPECT_EQ (reader.format (), "LStream");
|
||||
}
|
||||
|
||||
db::compare_layouts (this, layout, input, db::NoNormalization);
|
||||
}
|
||||
|
||||
// Large LEF/DEF to OAS converter test
|
||||
TEST(10)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue