diff --git a/src/buddies/src/bd/bdConverterMain.cc b/src/buddies/src/bd/bdConverterMain.cc index e60c14975..1ecbf8de7 100644 --- a/src/buddies/src/bd/bdConverterMain.cc +++ b/src/buddies/src/bd/bdConverterMain.cc @@ -25,6 +25,7 @@ #include "bdConverterMain.h" #include "dbLayout.h" #include "dbReader.h" +#include "dbWriter.h" #include "tlCommandLineParser.h" namespace bd diff --git a/src/buddies/src/bd/bdReaderOptions.h b/src/buddies/src/bd/bdReaderOptions.h index 93e48c794..e59304e1e 100644 --- a/src/buddies/src/bd/bdReaderOptions.h +++ b/src/buddies/src/bd/bdReaderOptions.h @@ -25,9 +25,9 @@ #include "bdCommon.h" #include "dbCommonReader.h" -#include "dbGDS2Reader.h" -#include "dbOASISReader.h" -#include "dbDXFReader.h" +#include "dbGDS2Format.h" +#include "dbOASISFormat.h" +#include "dbDXFFormat.h" #include "dbCIFFormat.h" #include diff --git a/src/buddies/src/bd/bdWriterOptions.h b/src/buddies/src/bd/bdWriterOptions.h index d4347b2ed..4bbb218bd 100644 --- a/src/buddies/src/bd/bdWriterOptions.h +++ b/src/buddies/src/bd/bdWriterOptions.h @@ -24,9 +24,9 @@ #define HDR_bdWriterOptions #include "bdCommon.h" -#include "dbGDS2WriterBase.h" -#include "dbOASISWriter.h" -#include "dbDXFWriter.h" +#include "dbGDS2Format.h" +#include "dbOASISFormat.h" +#include "dbDXFFormat.h" #include "dbCIFFormat.h" #include diff --git a/src/buddies/src/bd/strm2dxf.cc b/src/buddies/src/bd/strm2dxf.cc index 8ada0018e..bfdb480f2 100644 --- a/src/buddies/src/bd/strm2dxf.cc +++ b/src/buddies/src/bd/strm2dxf.cc @@ -21,7 +21,7 @@ */ #include "bdConverterMain.h" -#include "dbDXFWriter.h" +#include "dbDXFFormat.h" BD_PUBLIC int strm2dxf (int argc, char *argv[]) { diff --git a/src/buddies/src/bd/strm2gds.cc b/src/buddies/src/bd/strm2gds.cc index 4adec9188..55f5198cf 100644 --- a/src/buddies/src/bd/strm2gds.cc +++ b/src/buddies/src/bd/strm2gds.cc @@ -21,7 +21,7 @@ */ #include "bdConverterMain.h" -#include "dbGDS2Writer.h" +#include "dbGDS2Format.h" BD_PUBLIC int strm2gds (int argc, char *argv[]) { diff --git a/src/buddies/src/bd/strm2gdstxt.cc b/src/buddies/src/bd/strm2gdstxt.cc index 2d9a58f24..403beacea 100644 --- a/src/buddies/src/bd/strm2gdstxt.cc +++ b/src/buddies/src/bd/strm2gdstxt.cc @@ -21,7 +21,7 @@ */ #include "bdConverterMain.h" -#include "dbGDS2Writer.h" +#include "dbGDS2Format.h" BD_PUBLIC int strm2gdstxt (int argc, char *argv[]) { diff --git a/src/buddies/src/bd/strm2oas.cc b/src/buddies/src/bd/strm2oas.cc index ab5869b52..51df95a69 100644 --- a/src/buddies/src/bd/strm2oas.cc +++ b/src/buddies/src/bd/strm2oas.cc @@ -21,7 +21,7 @@ */ #include "bdConverterMain.h" -#include "dbOASISWriter.h" +#include "dbOASISFormat.h" BD_PUBLIC int strm2oas (int argc, char *argv[]) { diff --git a/src/plugins/streamers/gds2/db_plugin/dbGDS2Format.h b/src/plugins/streamers/gds2/db_plugin/dbGDS2Format.h index a88f99ad8..9d16b0856 100644 --- a/src/plugins/streamers/gds2/db_plugin/dbGDS2Format.h +++ b/src/plugins/streamers/gds2/db_plugin/dbGDS2Format.h @@ -92,6 +92,114 @@ public: } }; +/** + * @brief Structure that holds the GDS2 specific options for the Writer + * NOTE: this structure is non-public linkage by intention. This way it's instantiated + * in all compile units and the shared object does not need to be linked. + */ +class GDS2WriterOptions + : public FormatSpecificWriterOptions +{ +public: + /** + * @brief The constructor + */ + GDS2WriterOptions () + : max_vertex_count (8000), + no_zero_length_paths (false), + multi_xy_records (false), + max_cellname_length (32000), + libname ("LIB"), + user_units (1.0), + write_timestamps (true), + write_cell_properties (false), + write_file_properties (false) + { + // .. nothing yet .. + } + + /** + * @brief Maximum number of vertices for polygons to write + * + * This property describes the maximum number of point for polygons in GDS2 files. + * Polygons with more points will be split. + * The minimum value for this property is 4. If "multi_xy_records" is true, this + * property is not used. Instead, the number of points is unlimited. + */ + unsigned int max_vertex_count; + + /** + * @brief Eliminate zero-length paths + * + * If this option is set, zero-length paths are replaced by their polygon equivalent. + * For round paths this involves resolution into a polygon with the number of + * points specified in the "circle_points" configuration. + */ + bool no_zero_length_paths; + + /** + * @brief Use multiple XY records in BOUNDARY elements for unlimited large polygons + * + * Setting this property to true allows to produce unlimited polygons + * at the cost of incompatible formats. + */ + bool multi_xy_records; + + /** + * @brief Maximum length of cell names + * + * This property describes the maximum number of characters for cell names. + * Longer cell names will be shortened. + */ + unsigned int max_cellname_length; + + /** + * @brief The library name + * + * This property describes that library name written to the LIBNAME record. + */ + std::string libname; + + /** + * @brief The user units to use + * + * This property describes what user units to use (in micron) + */ + double user_units; + + /** + * @brief Write current time into timestamps + */ + bool write_timestamps; + + /** + * @brief Write cell properties (non-standard PROPATTR/PROPVALUE records) + */ + bool write_cell_properties; + + /** + * @brief Write layout properties (non-standard PROPATTR/PROPVALUE records) + */ + bool write_file_properties; + + /** + * @brief Implementation of FormatSpecificWriterOptions + */ + virtual FormatSpecificWriterOptions *clone () const + { + return new GDS2WriterOptions (*this); + } + + /** + * @brief Implementation of FormatSpecificWriterOptions + */ + virtual const std::string &format_name () const + { + static std::string n ("GDS2"); + return n; + } +}; + } // namespace db #endif diff --git a/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.cc b/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.cc index d8dd26614..fcba31615 100644 --- a/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.cc +++ b/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.cc @@ -29,6 +29,7 @@ #include "dbPolygonTools.h" #include "dbGDS2Writer.h" #include "dbGDS2.h" +#include "dbGDS2Format.h" #include "dbClip.h" #include "dbSaveLayoutOptions.h" #include "dbPolygonGenerators.h" diff --git a/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.h b/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.h index 864db62e8..68dbcbde3 100644 --- a/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.h +++ b/src/plugins/streamers/gds2/db_plugin/dbGDS2WriterBase.h @@ -40,112 +40,6 @@ namespace db class Layout; class SaveLayoutOptions; -/** - * @brief Structure that holds the GDS2 specific options for the Writer - */ -class DB_PLUGIN_PUBLIC GDS2WriterOptions - : public FormatSpecificWriterOptions -{ -public: - /** - * @brief The constructor - */ - GDS2WriterOptions () - : max_vertex_count (8000), - no_zero_length_paths (false), - multi_xy_records (false), - max_cellname_length (32000), - libname ("LIB"), - user_units (1.0), - write_timestamps (true), - write_cell_properties (false), - write_file_properties (false) - { - // .. nothing yet .. - } - - /** - * @brief Maximum number of vertices for polygons to write - * - * This property describes the maximum number of point for polygons in GDS2 files. - * Polygons with more points will be split. - * The minimum value for this property is 4. If "multi_xy_records" is true, this - * property is not used. Instead, the number of points is unlimited. - */ - unsigned int max_vertex_count; - - /** - * @brief Eliminate zero-length paths - * - * If this option is set, zero-length paths are replaced by their polygon equivalent. - * For round paths this involves resolution into a polygon with the number of - * points specified in the "circle_points" configuration. - */ - bool no_zero_length_paths; - - /** - * @brief Use multiple XY records in BOUNDARY elements for unlimited large polygons - * - * Setting this property to true allows to produce unlimited polygons - * at the cost of incompatible formats. - */ - bool multi_xy_records; - - /** - * @brief Maximum length of cell names - * - * This property describes the maximum number of characters for cell names. - * Longer cell names will be shortened. - */ - unsigned int max_cellname_length; - - /** - * @brief The library name - * - * This property describes that library name written to the LIBNAME record. - */ - std::string libname; - - /** - * @brief The user units to use - * - * This property describes what user units to use (in micron) - */ - double user_units; - - /** - * @brief Write current time into timestamps - */ - bool write_timestamps; - - /** - * @brief Write cell properties (non-standard PROPATTR/PROPVALUE records) - */ - bool write_cell_properties; - - /** - * @brief Write layout properties (non-standard PROPATTR/PROPVALUE records) - */ - bool write_file_properties; - - /** - * @brief Implementation of FormatSpecificWriterOptions - */ - virtual FormatSpecificWriterOptions *clone () const - { - return new GDS2WriterOptions (*this); - } - - /** - * @brief Implementation of FormatSpecificWriterOptions - */ - virtual const std::string &format_name () const - { - static std::string n ("GDS2"); - return n; - } -}; - /** * @brief A GDS2 writer abstraction */ diff --git a/src/plugins/streamers/gds2/lay_plugin/layGDS2WriterPlugin.cc b/src/plugins/streamers/gds2/lay_plugin/layGDS2WriterPlugin.cc index 8e5f510b7..ebb22aad7 100644 --- a/src/plugins/streamers/gds2/lay_plugin/layGDS2WriterPlugin.cc +++ b/src/plugins/streamers/gds2/lay_plugin/layGDS2WriterPlugin.cc @@ -21,6 +21,7 @@ */ #include "dbGDS2.h" +#include "dbGDS2Format.h" #include "dbGDS2Writer.h" #include "dbSaveLayoutOptions.h" #include "layCellView.h"