mirror of https://github.com/KLayout/klayout.git
Some MSVC build issues fixed (hopefully)
This commit is contained in:
parent
8ad6da0281
commit
11cfe36ed1
|
|
@ -670,7 +670,7 @@ namespace
|
|||
/**
|
||||
* @brief A helper class to implement the strange polygon detector
|
||||
*/
|
||||
struct StrangePolygonInsideFunc
|
||||
struct DB_PUBLIC StrangePolygonInsideFunc
|
||||
{
|
||||
inline bool operator() (int wc) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ namespace
|
|||
set ();
|
||||
}
|
||||
|
||||
virtual ~DeepRegionIterator () { }
|
||||
|
||||
virtual bool at_end () const
|
||||
{
|
||||
return m_iter.at_end ();
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ DeepShapeStore::invalidate_hier ()
|
|||
}
|
||||
|
||||
const db::CellMapping &
|
||||
DeepShapeStore::cell_mapping_to_original (size_t layout_index, db::Layout *into_layout, db::cell_index_type into_cell, const std::set<db::cell_index_type> *excluded_cells)
|
||||
DeepShapeStore::cell_mapping_to_original (unsigned int layout_index, db::Layout *into_layout, db::cell_index_type into_cell, const std::set<db::cell_index_type> *excluded_cells)
|
||||
{
|
||||
const db::Layout *source_layout = &m_layouts [layout_index]->layout;
|
||||
if (source_layout->begin_top_down () == source_layout->end_top_cells ()) {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ public:
|
|||
*
|
||||
* "excluded_cells" - if not 0 - will exclude the given cells (and flatten them).
|
||||
*/
|
||||
const db::CellMapping &cell_mapping_to_original (size_t layout_index, db::Layout *into_layout, db::cell_index_type into_cell, const std::set<db::cell_index_type> *excluded_cells = 0);
|
||||
const db::CellMapping &cell_mapping_to_original (unsigned int layout_index, db::Layout *into_layout, db::cell_index_type into_cell, const std::set<db::cell_index_type> *excluded_cells = 0);
|
||||
|
||||
/**
|
||||
* @brief For testing
|
||||
|
|
|
|||
|
|
@ -301,17 +301,14 @@ local_cluster<T>::ensure_sorted ()
|
|||
m_needs_update = false;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template <class T>
|
||||
struct interaction_receiver
|
||||
struct DB_PUBLIC hnp_interaction_receiver
|
||||
: public box_scanner_receiver2<T, unsigned int, T, unsigned int>
|
||||
{
|
||||
public:
|
||||
typedef typename local_cluster<T>::box_type box_type;
|
||||
|
||||
interaction_receiver (const Connectivity &conn, const db::ICplxTrans &trans)
|
||||
hnp_interaction_receiver (const Connectivity &conn, const db::ICplxTrans &trans)
|
||||
: mp_conn (&conn), m_any (false), m_trans (trans)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
|
|
@ -357,8 +354,6 @@ private:
|
|||
Trans m_trans;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class T>
|
||||
typename local_cluster<T>::shape_iterator local_cluster<T>::begin (unsigned int l) const
|
||||
{
|
||||
|
|
@ -464,7 +459,7 @@ local_cluster<T>::interacts (const local_cluster<T> &other, const db::ICplxTrans
|
|||
}
|
||||
}
|
||||
|
||||
interaction_receiver<T> rec (conn, trans);
|
||||
hnp_interaction_receiver<T> rec (conn, trans);
|
||||
return ! scanner.process (rec, 1 /*==touching*/, bc, bc_t);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ public:
|
|||
|
||||
private:
|
||||
template <typename> friend class local_clusters;
|
||||
template <typename> friend class interaction_receiver;
|
||||
template <typename> friend class hnp_interaction_receiver;
|
||||
|
||||
void set_id (id_type id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,47 +27,89 @@ namespace db
|
|||
|
||||
namespace l2n_std_format
|
||||
{
|
||||
template<> DB_PUBLIC const std::string keys<false>::version_key ("version");
|
||||
template<> DB_PUBLIC const std::string keys<false>::description_key ("description");
|
||||
template<> DB_PUBLIC const std::string keys<false>::top_key ("top");
|
||||
template<> DB_PUBLIC const std::string keys<false>::unit_key ("unit");
|
||||
template<> DB_PUBLIC const std::string keys<false>::layer_key ("layer");
|
||||
template<> DB_PUBLIC const std::string keys<false>::connect_key ("connect");
|
||||
template<> DB_PUBLIC const std::string keys<false>::global_key ("global");
|
||||
template<> DB_PUBLIC const std::string keys<false>::circuit_key ("circuit");
|
||||
template<> DB_PUBLIC const std::string keys<false>::net_key ("net");
|
||||
template<> DB_PUBLIC const std::string keys<false>::device_key ("device");
|
||||
template<> DB_PUBLIC const std::string keys<false>::polygon_key ("polygon");
|
||||
template<> DB_PUBLIC const std::string keys<false>::rect_key ("rect");
|
||||
template<> DB_PUBLIC const std::string keys<false>::terminal_key ("terminal");
|
||||
template<> DB_PUBLIC const std::string keys<false>::abstract_key ("abstract");
|
||||
template<> DB_PUBLIC const std::string keys<false>::param_key ("param");
|
||||
template<> DB_PUBLIC const std::string keys<false>::location_key ("location");
|
||||
template<> DB_PUBLIC const std::string keys<false>::rotation_key ("rotation");
|
||||
template<> DB_PUBLIC const std::string keys<false>::mirror_key ("mirror");
|
||||
template<> DB_PUBLIC const std::string keys<false>::scale_key ("scale");
|
||||
template<> DB_PUBLIC const std::string keys<false>::pin_key ("pin");
|
||||
static const std::string long_version_key ("version");
|
||||
static const std::string long_description_key ("description");
|
||||
static const std::string long_top_key ("top");
|
||||
static const std::string long_unit_key ("unit");
|
||||
static const std::string long_layer_key ("layer");
|
||||
static const std::string long_connect_key ("connect");
|
||||
static const std::string long_global_key ("global");
|
||||
static const std::string long_circuit_key ("circuit");
|
||||
static const std::string long_net_key ("net");
|
||||
static const std::string long_device_key ("device");
|
||||
static const std::string long_polygon_key ("polygon");
|
||||
static const std::string long_rect_key ("rect");
|
||||
static const std::string long_terminal_key ("terminal");
|
||||
static const std::string long_abstract_key ("abstract");
|
||||
static const std::string long_param_key ("param");
|
||||
static const std::string long_location_key ("location");
|
||||
static const std::string long_rotation_key ("rotation");
|
||||
static const std::string long_mirror_key ("mirror");
|
||||
static const std::string long_scale_key ("scale");
|
||||
static const std::string long_pin_key ("pin");
|
||||
|
||||
template<> DB_PUBLIC const std::string keys<true>::version_key ("V");
|
||||
template<> DB_PUBLIC const std::string keys<true>::description_key ("B");
|
||||
template<> DB_PUBLIC const std::string keys<true>::top_key ("W");
|
||||
template<> DB_PUBLIC const std::string keys<true>::unit_key ("U");
|
||||
template<> DB_PUBLIC const std::string keys<true>::layer_key ("L");
|
||||
template<> DB_PUBLIC const std::string keys<true>::connect_key ("C");
|
||||
template<> DB_PUBLIC const std::string keys<true>::global_key ("G");
|
||||
template<> DB_PUBLIC const std::string keys<true>::circuit_key ("X");
|
||||
template<> DB_PUBLIC const std::string keys<true>::net_key ("N");
|
||||
template<> DB_PUBLIC const std::string keys<true>::device_key ("D");
|
||||
template<> DB_PUBLIC const std::string keys<true>::polygon_key ("Q");
|
||||
template<> DB_PUBLIC const std::string keys<true>::rect_key ("R");
|
||||
template<> DB_PUBLIC const std::string keys<true>::terminal_key ("T");
|
||||
template<> DB_PUBLIC const std::string keys<true>::abstract_key ("A");
|
||||
template<> DB_PUBLIC const std::string keys<true>::param_key ("E");
|
||||
template<> DB_PUBLIC const std::string keys<true>::location_key ("Y");
|
||||
template<> DB_PUBLIC const std::string keys<true>::rotation_key ("O");
|
||||
template<> DB_PUBLIC const std::string keys<true>::mirror_key ("M");
|
||||
template<> DB_PUBLIC const std::string keys<true>::scale_key ("S");
|
||||
template<> DB_PUBLIC const std::string keys<true>::pin_key ("P");
|
||||
static const std::string short_version_key ("V");
|
||||
static const std::string short_description_key ("B");
|
||||
static const std::string short_top_key ("W");
|
||||
static const std::string short_unit_key ("U");
|
||||
static const std::string short_layer_key ("L");
|
||||
static const std::string short_connect_key ("C");
|
||||
static const std::string short_global_key ("G");
|
||||
static const std::string short_circuit_key ("X");
|
||||
static const std::string short_net_key ("N");
|
||||
static const std::string short_device_key ("D");
|
||||
static const std::string short_polygon_key ("Q");
|
||||
static const std::string short_rect_key ("R");
|
||||
static const std::string short_terminal_key ("T");
|
||||
static const std::string short_abstract_key ("A");
|
||||
static const std::string short_param_key ("E");
|
||||
static const std::string short_location_key ("Y");
|
||||
static const std::string short_rotation_key ("O");
|
||||
static const std::string short_mirror_key ("M");
|
||||
static const std::string short_scale_key ("S");
|
||||
static const std::string short_pin_key ("P");
|
||||
|
||||
template<> const std::string &keys<false>::version_key = long_version_key;
|
||||
template<> const std::string &keys<false>::description_key = long_description_key;
|
||||
template<> const std::string &keys<false>::top_key = long_top_key;
|
||||
template<> const std::string &keys<false>::unit_key = long_unit_key;
|
||||
template<> const std::string &keys<false>::layer_key = long_layer_key;
|
||||
template<> const std::string &keys<false>::connect_key = long_connect_key;
|
||||
template<> const std::string &keys<false>::global_key = long_global_key;
|
||||
template<> const std::string &keys<false>::circuit_key = long_circuit_key;
|
||||
template<> const std::string &keys<false>::net_key = long_net_key;
|
||||
template<> const std::string &keys<false>::device_key = long_device_key;
|
||||
template<> const std::string &keys<false>::polygon_key = long_polygon_key;
|
||||
template<> const std::string &keys<false>::rect_key = long_rect_key;
|
||||
template<> const std::string &keys<false>::terminal_key = long_terminal_key;
|
||||
template<> const std::string &keys<false>::abstract_key = long_abstract_key;
|
||||
template<> const std::string &keys<false>::param_key = long_param_key;
|
||||
template<> const std::string &keys<false>::location_key = long_location_key;
|
||||
template<> const std::string &keys<false>::rotation_key = long_rotation_key;
|
||||
template<> const std::string &keys<false>::mirror_key = long_mirror_key;
|
||||
template<> const std::string &keys<false>::scale_key = long_scale_key;
|
||||
template<> const std::string &keys<false>::pin_key = long_pin_key;
|
||||
|
||||
template<> const std::string &keys<true>::version_key = short_version_key;
|
||||
template<> const std::string &keys<true>::description_key = short_description_key;
|
||||
template<> const std::string &keys<true>::top_key = short_top_key;
|
||||
template<> const std::string &keys<true>::unit_key = short_unit_key;
|
||||
template<> const std::string &keys<true>::layer_key = short_layer_key;
|
||||
template<> const std::string &keys<true>::connect_key = short_connect_key;
|
||||
template<> const std::string &keys<true>::global_key = short_global_key;
|
||||
template<> const std::string &keys<true>::circuit_key = short_circuit_key;
|
||||
template<> const std::string &keys<true>::net_key = short_net_key;
|
||||
template<> const std::string &keys<true>::device_key = short_device_key;
|
||||
template<> const std::string &keys<true>::polygon_key = short_polygon_key;
|
||||
template<> const std::string &keys<true>::rect_key = short_rect_key;
|
||||
template<> const std::string &keys<true>::terminal_key = short_terminal_key;
|
||||
template<> const std::string &keys<true>::abstract_key = short_abstract_key;
|
||||
template<> const std::string &keys<true>::param_key = short_param_key;
|
||||
template<> const std::string &keys<true>::location_key = short_location_key;
|
||||
template<> const std::string &keys<true>::rotation_key = short_rotation_key;
|
||||
template<> const std::string &keys<true>::mirror_key = short_mirror_key;
|
||||
template<> const std::string &keys<true>::scale_key = short_scale_key;
|
||||
template<> const std::string &keys<true>::pin_key = short_pin_key;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,13 +103,29 @@ namespace l2n_std_format
|
|||
template <bool Short>
|
||||
struct DB_PUBLIC keys
|
||||
{
|
||||
static const std::string version_key, description_key, top_key, unit_key,
|
||||
layer_key, connect_key, global_key,
|
||||
circuit_key, net_key, device_key, subcircuit_key,
|
||||
polygon_key, rect_key, terminal_key, abstract_key,
|
||||
param_key, location_key, rotation_key,
|
||||
mirror_key, scale_key, pin_key,
|
||||
indent1, indent2;
|
||||
static const std::string &version_key,
|
||||
&description_key,
|
||||
&top_key,
|
||||
&unit_key,
|
||||
&layer_key,
|
||||
&connect_key,
|
||||
&global_key,
|
||||
&circuit_key,
|
||||
&net_key,
|
||||
&device_key,
|
||||
&subcircuit_key,
|
||||
&polygon_key,
|
||||
&rect_key,
|
||||
&terminal_key,
|
||||
&abstract_key,
|
||||
¶m_key,
|
||||
&location_key,
|
||||
&rotation_key,
|
||||
&mirror_key,
|
||||
&scale_key,
|
||||
&pin_key,
|
||||
&indent1,
|
||||
&indent2;
|
||||
|
||||
inline static bool is_short () { return Short; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -308,7 +308,6 @@ public:
|
|||
return m_layer_definitions.end ();
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Sets the name of the device class and the device extractor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -108,12 +108,7 @@ void NetlistDeviceExtractorMOS3Transistor::extract_devices (const std::vector<db
|
|||
|
||||
// count the number of gate shapes attached to this shape and distribute the area of the
|
||||
// diffusion region to the number of gates
|
||||
int n = rgates.selected_interacting (db::Region (*d)).size ();
|
||||
if (n == 0) { // @@@@
|
||||
printf("@@@ p=%s\n", p->box().to_string().c_str());
|
||||
printf("@@@ rdiff=%s\n", rdiff.to_string().c_str());
|
||||
printf("@@@ rgates=%s\n", rgates.to_string().c_str()); fflush(stdout);
|
||||
}
|
||||
size_t n = rgates.selected_interacting (db::Region (*d)).size ();
|
||||
tl_assert (n > 0);
|
||||
|
||||
device->set_parameter_value (diff_index == 0 ? db::DeviceClassMOS3Transistor::param_id_AS : db::DeviceClassMOS3Transistor::param_id_AD, dbu () * dbu () * d->area () / double (n));
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ public:
|
|||
virtual void write_device_intro (const db::DeviceClass &cls) const;
|
||||
virtual void write_device (const db::Device &dev) const;
|
||||
|
||||
protected:
|
||||
std::string net_to_string (const db::Net *net) const;
|
||||
void emit_line (const std::string &line) const;
|
||||
void emit_comment (const std::string &comment) const;
|
||||
|
|
|
|||
|
|
@ -1083,11 +1083,6 @@ public:
|
|||
gsi::Callback cb_write_header;
|
||||
gsi::Callback cb_write_device_intro;
|
||||
gsi::Callback cb_write_device;
|
||||
|
||||
using db::NetlistSpiceWriterDelegate::emit_comment;
|
||||
using db::NetlistSpiceWriterDelegate::emit_line;
|
||||
using db::NetlistSpiceWriterDelegate::net_to_string;
|
||||
using db::NetlistSpiceWriterDelegate::format_name;
|
||||
};
|
||||
|
||||
Class<NetlistSpiceWriterDelegateImpl> db_NetlistSpiceWriterDelegate ("db", "NetlistSpiceWriterDelegate",
|
||||
|
|
|
|||
|
|
@ -39,18 +39,6 @@ public:
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
using db::NetlistDeviceExtractor::set_name;
|
||||
using db::NetlistDeviceExtractor::define_layer;
|
||||
using db::NetlistDeviceExtractor::define_terminal;
|
||||
using db::NetlistDeviceExtractor::create_device;
|
||||
using db::NetlistDeviceExtractor::dbu;
|
||||
using db::NetlistDeviceExtractor::layout;
|
||||
using db::NetlistDeviceExtractor::cell_index;
|
||||
using db::NetlistDeviceExtractor::cell_name;
|
||||
using db::NetlistDeviceExtractor::error;
|
||||
using db::NetlistDeviceExtractor::get_connectivity;
|
||||
using db::NetlistDeviceExtractor::extract_devices;
|
||||
|
||||
void register_device_class (db::DeviceClass *device_class)
|
||||
{
|
||||
// the class is owned by the extractor
|
||||
|
|
@ -190,7 +178,7 @@ static const std::string &ld_description (const db::NetlistDeviceExtractorLayerD
|
|||
return ld->description;
|
||||
}
|
||||
|
||||
static int ld_index (const db::NetlistDeviceExtractorLayerDefinition *ld)
|
||||
static size_t ld_index (const db::NetlistDeviceExtractorLayerDefinition *ld)
|
||||
{
|
||||
return ld->index;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue