Merge branch 'pymod-fix' of https://github.com/klayoutmatthias/klayout into pymod-fix

This commit is contained in:
Matthias Koefferlein 2018-09-10 21:37:14 +00:00
commit dcfe2977a8
6 changed files with 14 additions and 25 deletions

View File

@ -27,7 +27,10 @@
namespace db
{
DB_PLUGIN_PUBLIC std::string net_tracer_component_name ("connectivity");
std::string net_tracer_component_name ()
{
return std::string ("connectivity");
}
// -----------------------------------------------------------------------------------------
// NetTracerLayerExpressionInfo implementation
@ -486,13 +489,13 @@ Net::define_layer (unsigned int l, const db::LayerProperties &lp, const db::Laye
// NetTracerTechnologyComponent implementation
NetTracerTechnologyComponent::NetTracerTechnologyComponent ()
: db::TechnologyComponent (net_tracer_component_name, tl::to_string (tr ("Connectivity")))
: db::TechnologyComponent (net_tracer_component_name (), tl::to_string (tr ("Connectivity")))
{
// .. nothing yet ..
}
NetTracerTechnologyComponent::NetTracerTechnologyComponent (const NetTracerTechnologyComponent &d)
: db::TechnologyComponent (net_tracer_component_name, tl::to_string (tr ("Connectivity")))
: db::TechnologyComponent (net_tracer_component_name (), tl::to_string (tr ("Connectivity")))
{
m_connections = d.m_connections;
m_symbols = d.m_symbols;

View File

@ -37,6 +37,8 @@ namespace db
class NetTracerTechnologyComponent;
DB_PLUGIN_PUBLIC std::string net_tracer_component_name ();
class DB_PLUGIN_PUBLIC NetTracerLayerExpressionInfo
{
public:

View File

@ -68,8 +68,6 @@ namespace tl
namespace db
{
extern std::string net_tracer_component_name;
class NetTracerTechnologyComponentProvider
: public db::TechnologyComponentProvider
{
@ -87,7 +85,7 @@ public:
virtual tl::XMLElementBase *xml_element () const
{
return new db::TechnologyComponentXMLElement<NetTracerTechnologyComponent> (net_tracer_component_name,
return new db::TechnologyComponentXMLElement<NetTracerTechnologyComponent> (net_tracer_component_name (),
tl::make_member ((NetTracerTechnologyComponent::const_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::begin, (NetTracerTechnologyComponent::const_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::end, &NetTracerTechnologyComponent::add, "connection") +
tl::make_member ((NetTracerTechnologyComponent::const_symbol_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::begin_symbols, (NetTracerTechnologyComponent::const_symbol_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::end_symbols, &NetTracerTechnologyComponent::add_symbol, "symbols")
);

View File

@ -25,11 +25,6 @@
#include "gsiDecl.h"
namespace db
{
extern std::string net_tracer_component_name;
}
namespace gsi
{
@ -107,7 +102,7 @@ static db::NetTracerData get_tracer_data_from_tech (const std::string &tech_name
const db::Technology *tech = db::Technologies::instance ()->technology_by_name (tech_name);
tl_assert (tech != 0);
const db::NetTracerTechnologyComponent *tech_component = dynamic_cast <const db::NetTracerTechnologyComponent *> (tech->component_by_name (db::net_tracer_component_name));
const db::NetTracerTechnologyComponent *tech_component = dynamic_cast <const db::NetTracerTechnologyComponent *> (tech->component_by_name (db::net_tracer_component_name ()));
tl_assert (tech_component != 0);
return tech_component->get_tracer_data (layout);

View File

@ -47,11 +47,6 @@
#include <fstream>
#include <sstream>
namespace db
{
extern std::string net_tracer_component_name;
}
namespace lay
{
@ -341,7 +336,7 @@ NetTracerDialog::do_trace (const db::DBox &start_search_box, const db::DBox &sto
if (! tech) {
return 0;
}
const db::NetTracerTechnologyComponent *tech_component = dynamic_cast <const db::NetTracerTechnologyComponent *> (tech->component_by_name (db::net_tracer_component_name));
const db::NetTracerTechnologyComponent *tech_component = dynamic_cast <const db::NetTracerTechnologyComponent *> (tech->component_by_name (db::net_tracer_component_name ()));
if (! tech_component) {
return 0;
}
@ -1203,7 +1198,7 @@ BEGIN_PROTECTED
db::Technology tech = *db::Technologies::instance ()->technology_by_name (tech_name);
// call the dialog and if successful, install the new technology
lay::TechComponentSetupDialog dialog (this, &tech, db::net_tracer_component_name);
lay::TechComponentSetupDialog dialog (this, &tech, db::net_tracer_component_name ());
if (dialog.exec ()) {
*db::Technologies::instance ()->technology_by_name (tech.name ()) = tech;
}

View File

@ -20,6 +20,7 @@
*/
#include "dbNetTracerIO.h"
#include "layNetTracerIO.h"
#include "layNetTracerDialog.h"
@ -30,11 +31,6 @@
#include "gsiDecl.h"
namespace db
{
DB_PLUGIN_PUBLIC std::string net_tracer_component_name;
}
namespace lay
{
@ -93,7 +89,7 @@ public:
}
};
static tl::RegisteredClass<lay::TechnologyEditorProvider> editor_decl (new NetTracerTechnologyEditorProvider (), 13000, db::net_tracer_component_name.c_str ());
static tl::RegisteredClass<lay::TechnologyEditorProvider> editor_decl (new NetTracerTechnologyEditorProvider (), 13000, db::net_tracer_component_name ().c_str ());
}