mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-07 11:31:08 +02:00
WIP: first steps for making technology a db component.
This commit is contained in:
@@ -164,6 +164,25 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_reader_options_element () const
|
||||
{
|
||||
return new db::ReaderOptionsXMLElement<db::CIFReaderOptions> ("cif",
|
||||
tl::make_member (&db::CIFReaderOptions::wire_mode, "wire-mode") +
|
||||
tl::make_member (&db::CIFReaderOptions::dbu, "dbu") +
|
||||
tl::make_member (&db::CIFReaderOptions::layer_map, "layer-map") +
|
||||
tl::make_member (&db::CIFReaderOptions::create_other_layers, "create-other-layers") +
|
||||
tl::make_member (&db::CIFReaderOptions::keep_layer_names, "keep-layer-names")
|
||||
);
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_writer_options_element () const
|
||||
{
|
||||
return new db::WriterOptionsXMLElement<db::CIFWriterOptions> ("cif",
|
||||
tl::make_member (&db::CIFWriterOptions::dummy_calls, "dummy-calls") +
|
||||
tl::make_member (&db::CIFWriterOptions::blank_separator, "blank-separator")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<db::StreamFormatDeclaration> reader_decl (new CIFFormatDeclaration (), 100, "CIF");
|
||||
|
||||
@@ -49,7 +49,7 @@ CIFReaderOptionPage::~CIFReaderOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
CIFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
CIFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
static const db::CIFReaderOptions default_options;
|
||||
const db::CIFReaderOptions *options = dynamic_cast<const db::CIFReaderOptions *> (o);
|
||||
@@ -65,7 +65,7 @@ CIFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay:
|
||||
}
|
||||
|
||||
void
|
||||
CIFReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
CIFReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
db::CIFReaderOptions *options = dynamic_cast<db::CIFReaderOptions *> (o);
|
||||
if (options) {
|
||||
@@ -102,17 +102,6 @@ public:
|
||||
{
|
||||
return new db::CIFReaderOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::ReaderOptionsXMLElement<db::CIFReaderOptions> ("cif",
|
||||
tl::make_member (&db::CIFReaderOptions::wire_mode, "wire-mode") +
|
||||
tl::make_member (&db::CIFReaderOptions::dbu, "dbu") +
|
||||
tl::make_member (&db::CIFReaderOptions::layer_map, "layer-map") +
|
||||
tl::make_member (&db::CIFReaderOptions::create_other_layers, "create-other-layers") +
|
||||
tl::make_member (&db::CIFReaderOptions::keep_layer_names, "keep-layer-names")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::CIFReaderPluginDeclaration (), 10000, "CIFReader");
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
CIFReaderOptionPage (QWidget *parent);
|
||||
~CIFReaderOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
|
||||
private:
|
||||
Ui::CIFReaderOptionPage *mp_ui;
|
||||
|
||||
@@ -51,7 +51,7 @@ CIFWriterOptionPage::~CIFWriterOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
CIFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
CIFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
const db::CIFWriterOptions *options = dynamic_cast<const db::CIFWriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -61,7 +61,7 @@ CIFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay:
|
||||
}
|
||||
|
||||
void
|
||||
CIFWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool /*gzip*/)
|
||||
CIFWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/, bool /*gzip*/)
|
||||
{
|
||||
db::CIFWriterOptions *options = dynamic_cast<db::CIFWriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -92,14 +92,6 @@ public:
|
||||
{
|
||||
return new db::CIFWriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::CIFWriterOptions> ("cif",
|
||||
tl::make_member (&db::CIFWriterOptions::dummy_calls, "dummy-calls") +
|
||||
tl::make_member (&db::CIFWriterOptions::blank_separator, "blank-separator")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::CIFWriterPluginDeclaration (), 10000, "CIFWriter");
|
||||
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
CIFWriterOptionPage (QWidget *parent);
|
||||
~CIFWriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const db::Technology *tech, bool gzip);
|
||||
|
||||
private:
|
||||
Ui::CIFWriterOptionPage *mp_ui;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = lay_plugin
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CommonReaderOptionPage</class>
|
||||
<widget class="QWidget" name="CommonReaderOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>629</width>
|
||||
<height>519</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Feature Subset</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enable_text_cbx">
|
||||
<property name="text">
|
||||
<string>Enable text objects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enable_properties_cbx">
|
||||
<property name="text">
|
||||
<string>Enable properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="layer_subset_grp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Layer Subset And Layer Mapping</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" rowspan="10" colspan="2">
|
||||
<widget class="lay::LayerMappingWidget" name="layer_map">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="read_all_cbx">
|
||||
<property name="text">
|
||||
<string>Read all layers (additionally to the ones in the mapping table)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>lay::LayerMappingWidget</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>layLayerMappingWidget.h</header>
|
||||
<container>1</container>
|
||||
<slots>
|
||||
<signal>enable_all_layers(bool)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>layer_map</sender>
|
||||
<signal>enable_all_layers(bool)</signal>
|
||||
<receiver>read_all_cbx</receiver>
|
||||
<slot>setChecked(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>131</x>
|
||||
<y>180</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>107</x>
|
||||
<y>139</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,107 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 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 "dbCommonReader.h"
|
||||
#include "dbLoadLayoutOptions.h"
|
||||
#include "layCommonReaderPlugin.h"
|
||||
#include "ui_CommonReaderOptionsPage.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// CommonReaderOptionPage definition and implementation
|
||||
|
||||
CommonReaderOptionPage::CommonReaderOptionPage (QWidget *parent)
|
||||
: StreamReaderOptionsPage (parent)
|
||||
{
|
||||
mp_ui = new Ui::CommonReaderOptionPage ();
|
||||
mp_ui->setupUi (this);
|
||||
}
|
||||
|
||||
CommonReaderOptionPage::~CommonReaderOptionPage ()
|
||||
{
|
||||
delete mp_ui;
|
||||
mp_ui = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CommonReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
static const db::CommonReaderOptions default_options;
|
||||
const db::CommonReaderOptions *options = dynamic_cast<const db::CommonReaderOptions *> (o);
|
||||
if (!options) {
|
||||
options = &default_options;
|
||||
}
|
||||
|
||||
mp_ui->enable_text_cbx->setChecked (options->enable_text_objects);
|
||||
mp_ui->enable_properties_cbx->setChecked (options->enable_properties);
|
||||
mp_ui->layer_map->set_layer_map (options->layer_map);
|
||||
mp_ui->read_all_cbx->setChecked (options->create_other_layers);
|
||||
}
|
||||
|
||||
void
|
||||
CommonReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
db::CommonReaderOptions *options = dynamic_cast<db::CommonReaderOptions *> (o);
|
||||
if (options) {
|
||||
|
||||
options->enable_text_objects = mp_ui->enable_text_cbx->isChecked ();
|
||||
options->enable_properties = mp_ui->enable_properties_cbx->isChecked ();
|
||||
options->layer_map = mp_ui->layer_map->get_layer_map ();
|
||||
options->create_other_layers = mp_ui->read_all_cbx->isChecked ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// CommonReaderPluginDeclaration definition and implementation
|
||||
|
||||
class CommonReaderPluginDeclaration
|
||||
: public StreamReaderPluginDeclaration
|
||||
{
|
||||
public:
|
||||
CommonReaderPluginDeclaration ()
|
||||
: StreamReaderPluginDeclaration (db::CommonReaderOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamReaderOptionsPage *format_specific_options_page (QWidget *parent) const
|
||||
{
|
||||
return new CommonReaderOptionPage (parent);
|
||||
}
|
||||
|
||||
db::FormatSpecificReaderOptions *create_specific_options () const
|
||||
{
|
||||
return new db::CommonReaderOptions ();
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::CommonReaderPluginDeclaration (), 10000, "CommonReader");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
TARGET = cif
|
||||
DESTDIR = $$OUT_PWD/../../../../lay_plugins
|
||||
|
||||
include($$PWD/../../../lay_plugin.pri)
|
||||
|
||||
INCLUDEPATH += $$PWD/../db_plugin
|
||||
DEPENDPATH += $$PWD/../db_plugin
|
||||
LIBS += -L$$DESTDIR/../db_plugins -lcif
|
||||
|
||||
!isEmpty(RPATH) {
|
||||
QMAKE_RPATHDIR += $$RPATH/db_plugins
|
||||
}
|
||||
|
||||
HEADERS = \
|
||||
|
||||
SOURCES = \
|
||||
layCommonStreamOptions.cc \
|
||||
|
||||
FORMS = \
|
||||
CommonReaderOptionsPage.ui \
|
||||
@@ -139,6 +139,31 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_reader_options_element () const
|
||||
{
|
||||
return new db::ReaderOptionsXMLElement<db::DXFReaderOptions> ("dxf",
|
||||
tl::make_member (&db::DXFReaderOptions::dbu, "dbu") +
|
||||
tl::make_member (&db::DXFReaderOptions::unit, "unit") +
|
||||
tl::make_member (&db::DXFReaderOptions::text_scaling, "text-scaling") +
|
||||
tl::make_member (&db::DXFReaderOptions::circle_points, "circle-points") +
|
||||
tl::make_member (&db::DXFReaderOptions::circle_accuracy, "circle-accuracy") +
|
||||
tl::make_member (&db::DXFReaderOptions::contour_accuracy, "contour-accuracy") +
|
||||
tl::make_member (&db::DXFReaderOptions::polyline_mode, "polyline-mode") +
|
||||
tl::make_member (&db::DXFReaderOptions::render_texts_as_polygons, "render-texts-as-polygons") +
|
||||
tl::make_member (&db::DXFReaderOptions::keep_other_cells, "keep-other-cells") +
|
||||
tl::make_member (&db::DXFReaderOptions::keep_layer_names, "keep-layer-names") +
|
||||
tl::make_member (&db::DXFReaderOptions::create_other_layers, "create-other-layers") +
|
||||
tl::make_member (&db::DXFReaderOptions::layer_map, "layer-map")
|
||||
);
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_writer_options_element () const
|
||||
{
|
||||
return new db::WriterOptionsXMLElement<db::DXFWriterOptions> ("cif",
|
||||
tl::make_member (&db::DXFWriterOptions::polygon_mode, "polygon-mode")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<db::StreamFormatDeclaration> reader_decl (new DXFFormatDeclaration (), 100, "DXF");
|
||||
|
||||
@@ -48,7 +48,7 @@ DXFReaderOptionPage::~DXFReaderOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
DXFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
DXFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
static const db::DXFReaderOptions default_options;
|
||||
const db::DXFReaderOptions *options = dynamic_cast<const db::DXFReaderOptions *> (o);
|
||||
@@ -71,7 +71,7 @@ DXFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay:
|
||||
}
|
||||
|
||||
void
|
||||
DXFReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
DXFReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
db::DXFReaderOptions *options = dynamic_cast<db::DXFReaderOptions *> (o);
|
||||
if (options) {
|
||||
@@ -124,24 +124,6 @@ public:
|
||||
{
|
||||
return new db::DXFReaderOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::ReaderOptionsXMLElement<db::DXFReaderOptions> ("dxf",
|
||||
tl::make_member (&db::DXFReaderOptions::dbu, "dbu") +
|
||||
tl::make_member (&db::DXFReaderOptions::unit, "unit") +
|
||||
tl::make_member (&db::DXFReaderOptions::text_scaling, "text-scaling") +
|
||||
tl::make_member (&db::DXFReaderOptions::circle_points, "circle-points") +
|
||||
tl::make_member (&db::DXFReaderOptions::circle_accuracy, "circle-accuracy") +
|
||||
tl::make_member (&db::DXFReaderOptions::contour_accuracy, "contour-accuracy") +
|
||||
tl::make_member (&db::DXFReaderOptions::polyline_mode, "polyline-mode") +
|
||||
tl::make_member (&db::DXFReaderOptions::render_texts_as_polygons, "render-texts-as-polygons") +
|
||||
tl::make_member (&db::DXFReaderOptions::keep_other_cells, "keep-other-cells") +
|
||||
tl::make_member (&db::DXFReaderOptions::keep_layer_names, "keep-layer-names") +
|
||||
tl::make_member (&db::DXFReaderOptions::create_other_layers, "create-other-layers") +
|
||||
tl::make_member (&db::DXFReaderOptions::layer_map, "layer-map")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::DXFReaderPluginDeclaration (), 10000, "DXFReader");
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
DXFReaderOptionPage (QWidget *parent);
|
||||
~DXFReaderOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
|
||||
private:
|
||||
Ui::DXFReaderOptionPage *mp_ui;
|
||||
|
||||
@@ -48,7 +48,7 @@ DXFWriterOptionPage::~DXFWriterOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
DXFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
DXFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
const db::DXFWriterOptions *options = dynamic_cast<const db::DXFWriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -57,7 +57,7 @@ DXFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay:
|
||||
}
|
||||
|
||||
void
|
||||
DXFWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool /*gzip*/)
|
||||
DXFWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/, bool /*gzip*/)
|
||||
{
|
||||
db::DXFWriterOptions *options = dynamic_cast<db::DXFWriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -87,13 +87,6 @@ public:
|
||||
{
|
||||
return new db::DXFWriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::DXFWriterOptions> ("cif",
|
||||
tl::make_member (&db::DXFWriterOptions::polygon_mode, "polygon-mode")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::DXFWriterPluginDeclaration (), 10000, "DXFWriter");
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
DXFWriterOptionPage (QWidget *parent);
|
||||
~DXFWriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const db::Technology *tech, bool gzip);
|
||||
|
||||
private:
|
||||
Ui::DXFWriterOptionPage *mp_ui;
|
||||
|
||||
@@ -65,6 +65,29 @@ class GDS2FormatDeclaration
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_writer_options_element () const
|
||||
{
|
||||
return new db::WriterOptionsXMLElement<db::GDS2WriterOptions> ("gds2",
|
||||
tl::make_member (&db::GDS2WriterOptions::write_timestamps, "write-timestamps") +
|
||||
tl::make_member (&db::GDS2WriterOptions::write_cell_properties, "write-cell-properties") +
|
||||
tl::make_member (&db::GDS2WriterOptions::write_file_properties, "write-file-properties") +
|
||||
tl::make_member (&db::GDS2WriterOptions::no_zero_length_paths, "no-zero-length-paths") +
|
||||
tl::make_member (&db::GDS2WriterOptions::multi_xy_records, "multi-xy-records") +
|
||||
tl::make_member (&db::GDS2WriterOptions::max_vertex_count, "max-vertex-count") +
|
||||
tl::make_member (&db::GDS2WriterOptions::max_cellname_length, "max-cellname-length") +
|
||||
tl::make_member (&db::GDS2WriterOptions::libname, "libname")
|
||||
);
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_reader_options_element () const
|
||||
{
|
||||
return new db::ReaderOptionsXMLElement<db::GDS2ReaderOptions> ("gds2",
|
||||
tl::make_member (&db::GDS2ReaderOptions::box_mode, "box-mode") +
|
||||
tl::make_member (&db::GDS2ReaderOptions::allow_big_records, "allow-big-records") +
|
||||
tl::make_member (&db::GDS2ReaderOptions::allow_multi_xy_records, "allow-multi-xy-records")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<db::StreamFormatDeclaration> format_decl (new GDS2FormatDeclaration (), 0, "GDS2");
|
||||
|
||||
@@ -50,7 +50,7 @@ GDS2ReaderOptionPage::~GDS2ReaderOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
GDS2ReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
GDS2ReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
static const db::GDS2ReaderOptions default_options;
|
||||
const db::GDS2ReaderOptions *options = dynamic_cast<const db::GDS2ReaderOptions *> (o);
|
||||
@@ -64,7 +64,7 @@ GDS2ReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay
|
||||
}
|
||||
|
||||
void
|
||||
GDS2ReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
GDS2ReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
db::GDS2ReaderOptions *options = dynamic_cast<db::GDS2ReaderOptions *> (o);
|
||||
if (options) {
|
||||
@@ -98,15 +98,6 @@ public:
|
||||
{
|
||||
return new db::GDS2ReaderOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::ReaderOptionsXMLElement<db::GDS2ReaderOptions> ("gds2",
|
||||
tl::make_member (&db::GDS2ReaderOptions::box_mode, "box-mode") +
|
||||
tl::make_member (&db::GDS2ReaderOptions::allow_big_records, "allow-big-records") +
|
||||
tl::make_member (&db::GDS2ReaderOptions::allow_multi_xy_records, "allow-multi-xy-records")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::GDS2ReaderPluginDeclaration (), 10000, "GDS2Reader");
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
GDS2ReaderOptionPage (QWidget *parent);
|
||||
~GDS2ReaderOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
|
||||
private:
|
||||
Ui::GDS2ReaderOptionPage *mp_ui;
|
||||
|
||||
@@ -51,7 +51,7 @@ GDS2WriterOptionPage::~GDS2WriterOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
GDS2WriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
GDS2WriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
const db::GDS2WriterOptions *options = dynamic_cast<const db::GDS2WriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -68,7 +68,7 @@ GDS2WriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay
|
||||
}
|
||||
|
||||
void
|
||||
GDS2WriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool /*gzip*/)
|
||||
GDS2WriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/, bool /*gzip*/)
|
||||
{
|
||||
db::GDS2WriterOptions *options = dynamic_cast<db::GDS2WriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -135,20 +135,6 @@ public:
|
||||
return new db::GDS2WriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::GDS2WriterOptions> ("gds2",
|
||||
tl::make_member (&db::GDS2WriterOptions::write_timestamps, "write-timestamps") +
|
||||
tl::make_member (&db::GDS2WriterOptions::write_cell_properties, "write-cell-properties") +
|
||||
tl::make_member (&db::GDS2WriterOptions::write_file_properties, "write-file-properties") +
|
||||
tl::make_member (&db::GDS2WriterOptions::no_zero_length_paths, "no-zero-length-paths") +
|
||||
tl::make_member (&db::GDS2WriterOptions::multi_xy_records, "multi-xy-records") +
|
||||
tl::make_member (&db::GDS2WriterOptions::max_vertex_count, "max-vertex-count") +
|
||||
tl::make_member (&db::GDS2WriterOptions::max_cellname_length, "max-cellname-length") +
|
||||
tl::make_member (&db::GDS2WriterOptions::libname, "libname")
|
||||
);
|
||||
}
|
||||
|
||||
void initialize_options_from_layout_handle (db::FormatSpecificWriterOptions *o, const lay::LayoutHandle &lh) const
|
||||
{
|
||||
// Initialize the libname property from meta data with key "libname".
|
||||
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
GDS2WriterOptionPage (QWidget *parent);
|
||||
~GDS2WriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const db::Technology *tech, bool gzip);
|
||||
|
||||
public slots:
|
||||
void multi_xy_clicked ();
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 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 "tlTimer.h"
|
||||
#include "tlStream.h"
|
||||
|
||||
#include "dbReader.h"
|
||||
#include "dbStream.h"
|
||||
#include "dbLEFImporter.h"
|
||||
#include "dbDEFImporter.h"
|
||||
#include "dbLEFDEFImporter.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
namespace db
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Plugin for the stream reader
|
||||
|
||||
/**
|
||||
* @brief Determines the format of the given stream
|
||||
* Returns true, if the stream has LEF format
|
||||
*/
|
||||
static bool is_lef_format (const std::string &fn)
|
||||
{
|
||||
static const char *suffixes[] = { ".lef", ".LEF", ".lef.gz", ".LEF.gz" };
|
||||
|
||||
// NOTE: there is no reliable way of (easily) detecting the format. Hence we use the file
|
||||
// name's suffix for the format hint.
|
||||
for (size_t i = 0; i < sizeof (suffixes) / sizeof (suffixes[0]); ++i) {
|
||||
std::string suffix = suffixes [i];
|
||||
if (fn.size () > suffix.size () && fn.find (suffix) == fn.size () - suffix.size ()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Determines the format of the given stream
|
||||
* Returns true, if the stream has DEF format
|
||||
*/
|
||||
static bool is_def_format (const std::string &fn)
|
||||
{
|
||||
static const char *suffixes[] = { ".def", ".DEF", ".def.gz", ".DEF.gz" };
|
||||
|
||||
// NOTE: there is no reliable way of (easily) detecting the format. Hence we use the file
|
||||
// name's suffix for the format hint.
|
||||
for (size_t i = 0; i < sizeof (suffixes) / sizeof (suffixes[0]); ++i) {
|
||||
std::string suffix = suffixes [i];
|
||||
if (fn.size () > suffix.size () && fn.find (suffix) == fn.size () - suffix.size ()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
class LEFDEFReader
|
||||
: public db::ReaderBase
|
||||
{
|
||||
public:
|
||||
|
||||
LEFDEFReader (tl::InputStream &s)
|
||||
: m_stream (s)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
virtual const db::LayerMap &read (db::Layout &layout, const db::LoadLayoutOptions &options) throw (tl::Exception)
|
||||
{
|
||||
return read_lefdef (layout, options, is_lef_format (m_stream.filename ()));
|
||||
}
|
||||
|
||||
virtual const db::LayerMap &read (db::Layout &layout) throw (tl::Exception)
|
||||
{
|
||||
return read_lefdef (layout, db::LoadLayoutOptions (), is_lef_format (m_stream.filename ()));
|
||||
}
|
||||
|
||||
virtual const char *format () const
|
||||
{
|
||||
return "LEFDEF";
|
||||
}
|
||||
private:
|
||||
tl::InputStream &m_stream;
|
||||
db::LayerMap m_layer_map;
|
||||
|
||||
std::string correct_path (const std::string &fn)
|
||||
{
|
||||
QFileInfo fi (tl::to_qstring (fn));
|
||||
if (! fi.isAbsolute ()) {
|
||||
QDir input_dir (QFileInfo (tl::to_qstring (m_stream.absolute_path ())).dir ());
|
||||
return tl::to_string (input_dir.filePath (fi.filePath ()));
|
||||
} else {
|
||||
return fn;
|
||||
}
|
||||
}
|
||||
|
||||
const db::LayerMap &read_lefdef (db::Layout &layout, const db::LoadLayoutOptions &options, bool import_lef) throw (tl::Exception)
|
||||
{
|
||||
const db::LEFDEFReaderOptions *lefdef_options = dynamic_cast<const db::LEFDEFReaderOptions *> (options.get_options (format ()));
|
||||
static db::LEFDEFReaderOptions default_options;
|
||||
if (! lefdef_options) {
|
||||
lefdef_options = &default_options;
|
||||
}
|
||||
|
||||
// Take the layer map and the "read all layers" flag from the reader options - hence we override the
|
||||
db::LEFDEFLayerDelegate layers (lefdef_options);
|
||||
layers.prepare (layout);
|
||||
layout.dbu (lefdef_options->dbu ());
|
||||
|
||||
if (import_lef) {
|
||||
|
||||
tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (QObject::tr ("Reading LEF file")));
|
||||
|
||||
db::LEFImporter importer;
|
||||
|
||||
for (std::vector<std::string>::const_iterator l = lefdef_options->begin_lef_files (); l != lefdef_options->end_lef_files (); ++l) {
|
||||
|
||||
std::string lp = correct_path (*l);
|
||||
|
||||
tl::InputStream lef_stream (lp);
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << lp;
|
||||
importer.read (lef_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << m_stream.source ();
|
||||
importer.read (m_stream, layout, layers);
|
||||
|
||||
} else {
|
||||
|
||||
tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (QObject::tr ("Reading DEF file")));
|
||||
|
||||
DEFImporter importer;
|
||||
|
||||
for (std::vector<std::string>::const_iterator l = lefdef_options->begin_lef_files (); l != lefdef_options->end_lef_files (); ++l) {
|
||||
|
||||
std::string lp = correct_path (*l);
|
||||
|
||||
tl::InputStream lef_stream (lp);
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << lp;
|
||||
importer.read_lef (lef_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
// Additionally read all LEF files next to the DEF file
|
||||
|
||||
QDir input_dir (QFileInfo (tl::to_qstring (m_stream.absolute_path ())).dir ());
|
||||
if (input_dir.exists () && input_dir.isReadable ()) {
|
||||
|
||||
QStringList entries = input_dir.entryList ();
|
||||
for (QStringList::const_iterator e = entries.begin (); e != entries.end (); ++e) {
|
||||
|
||||
if (is_lef_format (tl::to_string (*e))) {
|
||||
|
||||
std::string lp = tl::to_string (input_dir.filePath (*e));
|
||||
tl::InputStream lef_stream (lp);
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << lp;
|
||||
importer.read_lef (lef_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << m_stream.source ();
|
||||
importer.read (m_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
layers.finish (layout);
|
||||
|
||||
m_layer_map = layers.layer_map ();
|
||||
return m_layer_map;
|
||||
}
|
||||
};
|
||||
|
||||
class LEFDEFFormatDeclaration
|
||||
: public db::StreamFormatDeclaration
|
||||
{
|
||||
virtual std::string format_name () const { return "LEFDEF"; }
|
||||
virtual std::string format_desc () const { return "LEF/DEF"; }
|
||||
virtual std::string format_title () const { return "LEF/DEF (unified reader)"; }
|
||||
virtual std::string file_format () const { return "LEF/DEF files (*.lef *.LEF *.lef.gz *.LEF.gz *.def *.DEF *.def.gz *.DEF.gz)"; }
|
||||
|
||||
virtual bool detect (tl::InputStream &stream) const
|
||||
{
|
||||
return is_lef_format (stream.filename ()) || is_def_format (stream.filename ());
|
||||
}
|
||||
|
||||
virtual db::ReaderBase *create_reader (tl::InputStream &s) const
|
||||
{
|
||||
return new db::LEFDEFReader (s);
|
||||
}
|
||||
|
||||
virtual db::WriterBase *create_writer () const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual bool can_read () const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool can_write () const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_reader_options_element () const
|
||||
{
|
||||
return new db::ReaderOptionsXMLElement<LEFDEFReaderOptions> ("lefdef",
|
||||
tl::make_member (&LEFDEFReaderOptions::read_all_layers, &LEFDEFReaderOptions::set_read_all_layers, "read-all-layers") +
|
||||
tl::make_member (&LEFDEFReaderOptions::layer_map, &LEFDEFReaderOptions::set_layer_map, "layer-map") +
|
||||
tl::make_member (&LEFDEFReaderOptions::dbu, &LEFDEFReaderOptions::set_dbu, "dbu") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_net_names, &LEFDEFReaderOptions::set_produce_net_names, "produce-net-names") +
|
||||
tl::make_member (&LEFDEFReaderOptions::net_property_name, &LEFDEFReaderOptions::set_net_property_name, "net-property-name") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_inst_names, &LEFDEFReaderOptions::set_produce_inst_names, "produce-inst-names") +
|
||||
tl::make_member (&LEFDEFReaderOptions::inst_property_name, &LEFDEFReaderOptions::set_inst_property_name, "inst-property-name") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_cell_outlines, &LEFDEFReaderOptions::set_produce_cell_outlines, "produce-cell-outlines") +
|
||||
tl::make_member (&LEFDEFReaderOptions::cell_outline_layer, &LEFDEFReaderOptions::set_cell_outline_layer, "cell-outline-layer") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_placement_blockages, &LEFDEFReaderOptions::set_produce_placement_blockages, "produce-placement-blockages") +
|
||||
tl::make_member (&LEFDEFReaderOptions::placement_blockage_layer, &LEFDEFReaderOptions::set_placement_blockage_layer, "placement-blockage-layer") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_regions, &LEFDEFReaderOptions::set_produce_regions, "produce-regions") +
|
||||
tl::make_member (&LEFDEFReaderOptions::region_layer, &LEFDEFReaderOptions::set_region_layer, "region-layer") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_via_geometry, &LEFDEFReaderOptions::set_produce_via_geometry, "produce-via-geometry") +
|
||||
tl::make_member (&LEFDEFReaderOptions::via_geometry_suffix, &LEFDEFReaderOptions::set_via_geometry_suffix, "via-geometry-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::via_geometry_datatype, &LEFDEFReaderOptions::set_via_geometry_datatype, "via-geometry-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_pins, &LEFDEFReaderOptions::set_produce_pins, "produce-pins") +
|
||||
tl::make_member (&LEFDEFReaderOptions::pins_suffix, &LEFDEFReaderOptions::set_pins_suffix, "pins-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::pins_datatype, &LEFDEFReaderOptions::set_pins_datatype, "pins-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_obstructions, &LEFDEFReaderOptions::set_produce_obstructions, "produce-obstructions") +
|
||||
tl::make_member (&LEFDEFReaderOptions::obstructions_suffix, &LEFDEFReaderOptions::set_obstructions_suffix, "obstructions-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::obstructions_datatype, &LEFDEFReaderOptions::set_obstructions_datatype, "obstructions-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_blockages, &LEFDEFReaderOptions::set_produce_blockages, "produce-blockages") +
|
||||
tl::make_member (&LEFDEFReaderOptions::blockages_suffix, &LEFDEFReaderOptions::set_blockages_suffix, "blockages-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::blockages_datatype, &LEFDEFReaderOptions::set_blockages_datatype, "blockages-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_labels, &LEFDEFReaderOptions::set_produce_labels, "produce-labels") +
|
||||
tl::make_member (&LEFDEFReaderOptions::labels_suffix, &LEFDEFReaderOptions::set_labels_suffix, "labels-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::labels_datatype, &LEFDEFReaderOptions::set_labels_datatype, "labels-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_routing, &LEFDEFReaderOptions::set_produce_routing, "produce-routing") +
|
||||
tl::make_member (&LEFDEFReaderOptions::routing_suffix, &LEFDEFReaderOptions::set_routing_suffix, "routing-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::routing_datatype, &LEFDEFReaderOptions::set_routing_datatype, "routing-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::begin_lef_files, &LEFDEFReaderOptions::end_lef_files, &LEFDEFReaderOptions::push_lef_file, "lef-files")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<db::StreamFormatDeclaration> format_decl (new LEFDEFFormatDeclaration (), 500, "LEFDEF");
|
||||
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@ DESTDIR = $$OUT_PWD/../../../../db_plugins
|
||||
include($$PWD/../../../db_plugin.pri)
|
||||
|
||||
HEADERS = \
|
||||
dbDEFImporter.h \
|
||||
dbLEFDEFImporter.h \
|
||||
dbLEFImporter.h
|
||||
dbDEFImporter.h \
|
||||
dbLEFDEFImporter.h \
|
||||
dbLEFImporter.h
|
||||
|
||||
SOURCES = \
|
||||
gsiDeclDbLEFDEF.cc \
|
||||
dbDEFImporter.cc \
|
||||
dbLEFDEFImporter.cc \
|
||||
dbLEFImporter.cc
|
||||
dbLEFDEFPlugin.cc \
|
||||
dbDEFImporter.cc \
|
||||
dbLEFDEFImporter.cc \
|
||||
dbLEFImporter.cc
|
||||
|
||||
@@ -128,10 +128,10 @@ public:
|
||||
tl::InputStream stream (data.file);
|
||||
|
||||
std::string tech_name = lay::MainWindow::instance ()->initial_technology ();
|
||||
if (! lay::Technologies::instance ()->has_technology (tech_name)) {
|
||||
if (! db::Technologies::instance ()->has_technology (tech_name)) {
|
||||
tech_name.clear (); // use default technology
|
||||
}
|
||||
const lay::Technology *tech = lay::Technologies::instance ()->technology_by_name (tech_name);
|
||||
const db::Technology *tech = db::Technologies::instance ()->technology_by_name (tech_name);
|
||||
db::LEFDEFReaderOptions options;
|
||||
if (tech) {
|
||||
const db::LEFDEFReaderOptions *tech_options = dynamic_cast<const db::LEFDEFReaderOptions *>(tech->load_layout_options ().get_options ("LEFDEF"));
|
||||
|
||||
@@ -317,11 +317,11 @@ BEGIN_PROTECTED
|
||||
|
||||
std::string tech_name;
|
||||
tech_name = lay::MainWindow::instance ()->initial_technology ();
|
||||
if (! lay::Technologies::instance ()->has_technology (tech_name)) {
|
||||
if (! db::Technologies::instance ()->has_technology (tech_name)) {
|
||||
tech_name.clear (); // use default technology
|
||||
}
|
||||
|
||||
lay::Technology *tech = lay::Technologies::instance ()->technology_by_name (tech_name);
|
||||
db::Technology *tech = db::Technologies::instance ()->technology_by_name (tech_name);
|
||||
if (!tech) {
|
||||
return;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ LEFDEFReaderOptionsEditor::LEFDEFReaderOptionsEditor (QWidget *parent)
|
||||
}
|
||||
|
||||
void
|
||||
LEFDEFReaderOptionsEditor::commit (db::FormatSpecificReaderOptions *options, const lay::Technology * /*tech*/)
|
||||
LEFDEFReaderOptionsEditor::commit (db::FormatSpecificReaderOptions *options, const db::Technology * /*tech*/)
|
||||
{
|
||||
db::LEFDEFReaderOptions *data = dynamic_cast<db::LEFDEFReaderOptions *> (options);
|
||||
if (! data) {
|
||||
@@ -436,7 +436,7 @@ LEFDEFReaderOptionsEditor::commit (db::FormatSpecificReaderOptions *options, con
|
||||
}
|
||||
|
||||
void
|
||||
LEFDEFReaderOptionsEditor::setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech)
|
||||
LEFDEFReaderOptionsEditor::setup (const db::FormatSpecificReaderOptions *options, const db::Technology *tech)
|
||||
{
|
||||
static db::LEFDEFReaderOptions empty;
|
||||
const db::LEFDEFReaderOptions *data = dynamic_cast<const db::LEFDEFReaderOptions *> (options);
|
||||
@@ -445,7 +445,7 @@ LEFDEFReaderOptionsEditor::setup (const db::FormatSpecificReaderOptions *options
|
||||
}
|
||||
|
||||
// TODO: there should be a const weak ptr ...
|
||||
mp_tech.reset (const_cast<lay::Technology *> (tech));
|
||||
mp_tech.reset (const_cast<db::Technology *> (tech));
|
||||
|
||||
dbu->setText (tl::to_qstring (tl::to_string (data->dbu ())));
|
||||
read_all_cbx->setChecked (data->read_all_layers ());
|
||||
|
||||
@@ -89,8 +89,8 @@ Q_OBJECT
|
||||
public:
|
||||
LEFDEFReaderOptionsEditor (QWidget *parent);
|
||||
|
||||
void commit (db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const db::Technology *tech);
|
||||
|
||||
private slots:
|
||||
void checkbox_changed ();
|
||||
@@ -100,7 +100,7 @@ private slots:
|
||||
void move_lef_files_down_clicked ();
|
||||
|
||||
private:
|
||||
tl::weak_ptr<lay::Technology> mp_tech;
|
||||
tl::weak_ptr<db::Technology> mp_tech;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -34,214 +34,9 @@
|
||||
#include "layStream.h"
|
||||
#include "layLEFDEFImportDialogs.h"
|
||||
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
namespace db
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Plugin for the stream reader
|
||||
|
||||
/**
|
||||
* @brief Determines the format of the given stream
|
||||
* Returns true, if the stream has LEF format
|
||||
*/
|
||||
static bool is_lef_format (const std::string &fn)
|
||||
{
|
||||
static const char *suffixes[] = { ".lef", ".LEF", ".lef.gz", ".LEF.gz" };
|
||||
|
||||
// NOTE: there is no reliable way of (easily) detecting the format. Hence we use the file
|
||||
// name's suffix for the format hint.
|
||||
for (size_t i = 0; i < sizeof (suffixes) / sizeof (suffixes[0]); ++i) {
|
||||
std::string suffix = suffixes [i];
|
||||
if (fn.size () > suffix.size () && fn.find (suffix) == fn.size () - suffix.size ()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Determines the format of the given stream
|
||||
* Returns true, if the stream has DEF format
|
||||
*/
|
||||
static bool is_def_format (const std::string &fn)
|
||||
{
|
||||
static const char *suffixes[] = { ".def", ".DEF", ".def.gz", ".DEF.gz" };
|
||||
|
||||
// NOTE: there is no reliable way of (easily) detecting the format. Hence we use the file
|
||||
// name's suffix for the format hint.
|
||||
for (size_t i = 0; i < sizeof (suffixes) / sizeof (suffixes[0]); ++i) {
|
||||
std::string suffix = suffixes [i];
|
||||
if (fn.size () > suffix.size () && fn.find (suffix) == fn.size () - suffix.size ()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
class LEFDEFReader
|
||||
: public db::ReaderBase
|
||||
{
|
||||
public:
|
||||
|
||||
LEFDEFReader (tl::InputStream &s)
|
||||
: m_stream (s)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
virtual const db::LayerMap &read (db::Layout &layout, const db::LoadLayoutOptions &options) throw (tl::Exception)
|
||||
{
|
||||
return read_lefdef (layout, options, is_lef_format (m_stream.filename ()));
|
||||
}
|
||||
|
||||
virtual const db::LayerMap &read (db::Layout &layout) throw (tl::Exception)
|
||||
{
|
||||
return read_lefdef (layout, db::LoadLayoutOptions (), is_lef_format (m_stream.filename ()));
|
||||
}
|
||||
|
||||
virtual const char *format () const
|
||||
{
|
||||
return "LEFDEF";
|
||||
}
|
||||
private:
|
||||
tl::InputStream &m_stream;
|
||||
db::LayerMap m_layer_map;
|
||||
|
||||
std::string correct_path (const std::string &fn)
|
||||
{
|
||||
QFileInfo fi (tl::to_qstring (fn));
|
||||
if (! fi.isAbsolute ()) {
|
||||
QDir input_dir (QFileInfo (tl::to_qstring (m_stream.absolute_path ())).dir ());
|
||||
return tl::to_string (input_dir.filePath (fi.filePath ()));
|
||||
} else {
|
||||
return fn;
|
||||
}
|
||||
}
|
||||
|
||||
const db::LayerMap &read_lefdef (db::Layout &layout, const db::LoadLayoutOptions &options, bool import_lef) throw (tl::Exception)
|
||||
{
|
||||
const db::LEFDEFReaderOptions *lefdef_options = dynamic_cast<const db::LEFDEFReaderOptions *> (options.get_options (format ()));
|
||||
static db::LEFDEFReaderOptions default_options;
|
||||
if (! lefdef_options) {
|
||||
lefdef_options = &default_options;
|
||||
}
|
||||
|
||||
// Take the layer map and the "read all layers" flag from the reader options - hence we override the
|
||||
db::LEFDEFLayerDelegate layers (lefdef_options);
|
||||
layers.prepare (layout);
|
||||
layout.dbu (lefdef_options->dbu ());
|
||||
|
||||
if (import_lef) {
|
||||
|
||||
tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (QObject::tr ("Reading LEF file")));
|
||||
|
||||
db::LEFImporter importer;
|
||||
|
||||
for (std::vector<std::string>::const_iterator l = lefdef_options->begin_lef_files (); l != lefdef_options->end_lef_files (); ++l) {
|
||||
|
||||
std::string lp = correct_path (*l);
|
||||
|
||||
tl::InputStream lef_stream (lp);
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << lp;
|
||||
importer.read (lef_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << m_stream.source ();
|
||||
importer.read (m_stream, layout, layers);
|
||||
|
||||
} else {
|
||||
|
||||
tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (QObject::tr ("Reading DEF file")));
|
||||
|
||||
DEFImporter importer;
|
||||
|
||||
for (std::vector<std::string>::const_iterator l = lefdef_options->begin_lef_files (); l != lefdef_options->end_lef_files (); ++l) {
|
||||
|
||||
std::string lp = correct_path (*l);
|
||||
|
||||
tl::InputStream lef_stream (lp);
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << lp;
|
||||
importer.read_lef (lef_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
// Additionally read all LEF files next to the DEF file
|
||||
|
||||
QDir input_dir (QFileInfo (tl::to_qstring (m_stream.absolute_path ())).dir ());
|
||||
if (input_dir.exists () && input_dir.isReadable ()) {
|
||||
|
||||
QStringList entries = input_dir.entryList ();
|
||||
for (QStringList::const_iterator e = entries.begin (); e != entries.end (); ++e) {
|
||||
|
||||
if (is_lef_format (tl::to_string (*e))) {
|
||||
|
||||
std::string lp = tl::to_string (input_dir.filePath (*e));
|
||||
tl::InputStream lef_stream (lp);
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << lp;
|
||||
importer.read_lef (lef_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tl::log << tl::to_string (QObject::tr ("Reading")) << " " << m_stream.source ();
|
||||
importer.read (m_stream, layout, layers);
|
||||
|
||||
}
|
||||
|
||||
layers.finish (layout);
|
||||
|
||||
m_layer_map = layers.layer_map ();
|
||||
return m_layer_map;
|
||||
}
|
||||
};
|
||||
|
||||
class LEFDEFFormatDeclaration
|
||||
: public db::StreamFormatDeclaration
|
||||
{
|
||||
virtual std::string format_name () const { return "LEFDEF"; }
|
||||
virtual std::string format_desc () const { return "LEF/DEF"; }
|
||||
virtual std::string format_title () const { return "LEF/DEF (unified reader)"; }
|
||||
virtual std::string file_format () const { return "LEF/DEF files (*.lef *.LEF *.lef.gz *.LEF.gz *.def *.DEF *.def.gz *.DEF.gz)"; }
|
||||
|
||||
virtual bool detect (tl::InputStream &stream) const
|
||||
{
|
||||
return is_lef_format (stream.filename ()) || is_def_format (stream.filename ());
|
||||
}
|
||||
|
||||
virtual db::ReaderBase *create_reader (tl::InputStream &s) const
|
||||
{
|
||||
return new LEFDEFReader (s);
|
||||
}
|
||||
|
||||
virtual db::WriterBase *create_writer () const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual bool can_read () const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool can_write () const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<db::StreamFormatDeclaration> format_decl (new LEFDEFFormatDeclaration (), 500, "LEFDEF");
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// LEFDEFPluginDeclaration definition and implementation
|
||||
|
||||
@@ -264,44 +59,6 @@ public:
|
||||
{
|
||||
return new LEFDEFReaderOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::ReaderOptionsXMLElement<LEFDEFReaderOptions> ("lefdef",
|
||||
tl::make_member (&LEFDEFReaderOptions::read_all_layers, &LEFDEFReaderOptions::set_read_all_layers, "read-all-layers") +
|
||||
tl::make_member (&LEFDEFReaderOptions::layer_map, &LEFDEFReaderOptions::set_layer_map, "layer-map") +
|
||||
tl::make_member (&LEFDEFReaderOptions::dbu, &LEFDEFReaderOptions::set_dbu, "dbu") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_net_names, &LEFDEFReaderOptions::set_produce_net_names, "produce-net-names") +
|
||||
tl::make_member (&LEFDEFReaderOptions::net_property_name, &LEFDEFReaderOptions::set_net_property_name, "net-property-name") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_inst_names, &LEFDEFReaderOptions::set_produce_inst_names, "produce-inst-names") +
|
||||
tl::make_member (&LEFDEFReaderOptions::inst_property_name, &LEFDEFReaderOptions::set_inst_property_name, "inst-property-name") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_cell_outlines, &LEFDEFReaderOptions::set_produce_cell_outlines, "produce-cell-outlines") +
|
||||
tl::make_member (&LEFDEFReaderOptions::cell_outline_layer, &LEFDEFReaderOptions::set_cell_outline_layer, "cell-outline-layer") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_placement_blockages, &LEFDEFReaderOptions::set_produce_placement_blockages, "produce-placement-blockages") +
|
||||
tl::make_member (&LEFDEFReaderOptions::placement_blockage_layer, &LEFDEFReaderOptions::set_placement_blockage_layer, "placement-blockage-layer") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_regions, &LEFDEFReaderOptions::set_produce_regions, "produce-regions") +
|
||||
tl::make_member (&LEFDEFReaderOptions::region_layer, &LEFDEFReaderOptions::set_region_layer, "region-layer") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_via_geometry, &LEFDEFReaderOptions::set_produce_via_geometry, "produce-via-geometry") +
|
||||
tl::make_member (&LEFDEFReaderOptions::via_geometry_suffix, &LEFDEFReaderOptions::set_via_geometry_suffix, "via-geometry-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::via_geometry_datatype, &LEFDEFReaderOptions::set_via_geometry_datatype, "via-geometry-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_pins, &LEFDEFReaderOptions::set_produce_pins, "produce-pins") +
|
||||
tl::make_member (&LEFDEFReaderOptions::pins_suffix, &LEFDEFReaderOptions::set_pins_suffix, "pins-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::pins_datatype, &LEFDEFReaderOptions::set_pins_datatype, "pins-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_obstructions, &LEFDEFReaderOptions::set_produce_obstructions, "produce-obstructions") +
|
||||
tl::make_member (&LEFDEFReaderOptions::obstructions_suffix, &LEFDEFReaderOptions::set_obstructions_suffix, "obstructions-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::obstructions_datatype, &LEFDEFReaderOptions::set_obstructions_datatype, "obstructions-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_blockages, &LEFDEFReaderOptions::set_produce_blockages, "produce-blockages") +
|
||||
tl::make_member (&LEFDEFReaderOptions::blockages_suffix, &LEFDEFReaderOptions::set_blockages_suffix, "blockages-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::blockages_datatype, &LEFDEFReaderOptions::set_blockages_datatype, "blockages-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_labels, &LEFDEFReaderOptions::set_produce_labels, "produce-labels") +
|
||||
tl::make_member (&LEFDEFReaderOptions::labels_suffix, &LEFDEFReaderOptions::set_labels_suffix, "labels-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::labels_datatype, &LEFDEFReaderOptions::set_labels_datatype, "labels-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::produce_routing, &LEFDEFReaderOptions::set_produce_routing, "produce-routing") +
|
||||
tl::make_member (&LEFDEFReaderOptions::routing_suffix, &LEFDEFReaderOptions::set_routing_suffix, "routing-suffix") +
|
||||
tl::make_member (&LEFDEFReaderOptions::routing_datatype, &LEFDEFReaderOptions::set_routing_datatype, "routing-datatype") +
|
||||
tl::make_member (&LEFDEFReaderOptions::begin_lef_files, &LEFDEFReaderOptions::end_lef_files, &LEFDEFReaderOptions::push_lef_file, "lef-files")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new LEFDEFPluginDeclaration (), 10001, "LEFDEFReader");
|
||||
|
||||
@@ -463,6 +463,18 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_writer_options_element () const
|
||||
{
|
||||
return new db::WriterOptionsXMLElement<db::OASISWriterOptions> ("oasis",
|
||||
tl::make_member (&db::OASISWriterOptions::compression_level, "compression-level") +
|
||||
tl::make_member (&db::OASISWriterOptions::write_cblocks, "write-cblocks") +
|
||||
tl::make_member (&db::OASISWriterOptions::strict_mode, "strict-mode") +
|
||||
tl::make_member (&db::OASISWriterOptions::write_std_properties, "write-std-properties") +
|
||||
tl::make_member (&db::OASISWriterOptions::subst_char, "subst-char") +
|
||||
tl::make_member (&db::OASISWriterOptions::permissive, "permissive")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<db::StreamFormatDeclaration> reader_decl (new OASISFormatDeclaration (), 10, "OASIS");
|
||||
|
||||
@@ -43,8 +43,8 @@ public:
|
||||
OASISWriterOptionPage (QWidget *parent);
|
||||
~OASISWriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const db::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const db::Technology *tech, bool gzip);
|
||||
|
||||
private:
|
||||
Ui::OASISWriterOptionPage *mp_ui;
|
||||
@@ -63,7 +63,7 @@ OASISWriterOptionPage::~OASISWriterOptionPage ()
|
||||
}
|
||||
|
||||
void
|
||||
OASISWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
OASISWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/)
|
||||
{
|
||||
const db::OASISWriterOptions *options = dynamic_cast<const db::OASISWriterOptions *> (o);
|
||||
if (options) {
|
||||
@@ -77,7 +77,7 @@ OASISWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const la
|
||||
}
|
||||
|
||||
void
|
||||
OASISWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool gzip)
|
||||
OASISWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const db::Technology * /*tech*/, bool gzip)
|
||||
{
|
||||
if (gzip && mp_ui->write_cblocks->isChecked ()) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("gzip compression cannot be used with CBLOCK compression")));
|
||||
@@ -120,18 +120,6 @@ public:
|
||||
{
|
||||
return new db::OASISWriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::OASISWriterOptions> ("oasis",
|
||||
tl::make_member (&db::OASISWriterOptions::compression_level, "compression-level") +
|
||||
tl::make_member (&db::OASISWriterOptions::write_cblocks, "write-cblocks") +
|
||||
tl::make_member (&db::OASISWriterOptions::strict_mode, "strict-mode") +
|
||||
tl::make_member (&db::OASISWriterOptions::write_std_properties, "write-std-properties") +
|
||||
tl::make_member (&db::OASISWriterOptions::subst_char, "subst-char") +
|
||||
tl::make_member (&db::OASISWriterOptions::permissive, "permissive")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::OASISWriterPluginDeclaration (), 10000, "OASISWriter");
|
||||
|
||||
Reference in New Issue
Block a user