diff --git a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc index 4c01ee843..2e52c70ae 100644 --- a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc +++ b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc @@ -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; diff --git a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h index de7a6c138..2553cf16d 100644 --- a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h +++ b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h @@ -37,6 +37,8 @@ namespace db class NetTracerTechnologyComponent; +DB_PLUGIN_PUBLIC std::string net_tracer_component_name (); + class DB_PLUGIN_PUBLIC NetTracerLayerExpressionInfo { public: diff --git a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc index bca948d0b..b95f9a605 100644 --- a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc +++ b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc @@ -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 (net_tracer_component_name, + return new db::TechnologyComponentXMLElement (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") ); diff --git a/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc b/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc index 0260491ca..0a12bca78 100644 --- a/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc +++ b/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc @@ -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 (tech->component_by_name (db::net_tracer_component_name)); + const db::NetTracerTechnologyComponent *tech_component = dynamic_cast (tech->component_by_name (db::net_tracer_component_name ())); tl_assert (tech_component != 0); return tech_component->get_tracer_data (layout); diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc index 8b6858afa..18d07bad0 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc @@ -47,11 +47,6 @@ #include #include -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 (tech->component_by_name (db::net_tracer_component_name)); + const db::NetTracerTechnologyComponent *tech_component = dynamic_cast (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; } diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc index cdd46419b..c7e0fcdba 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc @@ -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 editor_decl (new NetTracerTechnologyEditorProvider (), 13000, db::net_tracer_component_name.c_str ()); +static tl::RegisteredClass editor_decl (new NetTracerTechnologyEditorProvider (), 13000, db::net_tracer_component_name ().c_str ()); }