WIP: fixed streamer headers.

This commit is contained in:
Matthias Koefferlein 2018-06-20 01:13:31 +02:00
parent 15bcfa34e5
commit dd9467d097
11 changed files with 121 additions and 116 deletions

View File

@ -25,6 +25,7 @@
#include "bdConverterMain.h"
#include "dbLayout.h"
#include "dbReader.h"
#include "dbWriter.h"
#include "tlCommandLineParser.h"
namespace bd

View File

@ -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 <string>

View File

@ -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 <string>

View File

@ -21,7 +21,7 @@
*/
#include "bdConverterMain.h"
#include "dbDXFWriter.h"
#include "dbDXFFormat.h"
BD_PUBLIC int strm2dxf (int argc, char *argv[])
{

View File

@ -21,7 +21,7 @@
*/
#include "bdConverterMain.h"
#include "dbGDS2Writer.h"
#include "dbGDS2Format.h"
BD_PUBLIC int strm2gds (int argc, char *argv[])
{

View File

@ -21,7 +21,7 @@
*/
#include "bdConverterMain.h"
#include "dbGDS2Writer.h"
#include "dbGDS2Format.h"
BD_PUBLIC int strm2gdstxt (int argc, char *argv[])
{

View File

@ -21,7 +21,7 @@
*/
#include "bdConverterMain.h"
#include "dbOASISWriter.h"
#include "dbOASISFormat.h"
BD_PUBLIC int strm2oas (int argc, char *argv[])
{

View File

@ -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

View File

@ -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"

View File

@ -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
*/

View File

@ -21,6 +21,7 @@
*/
#include "dbGDS2.h"
#include "dbGDS2Format.h"
#include "dbGDS2Writer.h"
#include "dbSaveLayoutOptions.h"
#include "layCellView.h"