Fixed link issue in net tracer plugin both for Linux and Windows (hopefully)

This commit is contained in:
Matthias Köfferlein 2018-09-10 22:53:49 +02:00
parent c46bed0785
commit 99a71b771d
6 changed files with 14 additions and 25 deletions

View File

@ -27,7 +27,10 @@
namespace db namespace db
{ {
DB_PLUGIN_PUBLIC std::string net_tracer_component_name ("connectivity"); std::string net_tracer_component_name ()
{
return std::string ("connectivity");
}
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
// NetTracerLayerExpressionInfo implementation // NetTracerLayerExpressionInfo implementation
@ -486,13 +489,13 @@ Net::define_layer (unsigned int l, const db::LayerProperties &lp, const db::Laye
// NetTracerTechnologyComponent implementation // NetTracerTechnologyComponent implementation
NetTracerTechnologyComponent::NetTracerTechnologyComponent () 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 .. // .. nothing yet ..
} }
NetTracerTechnologyComponent::NetTracerTechnologyComponent (const NetTracerTechnologyComponent &d) 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_connections = d.m_connections;
m_symbols = d.m_symbols; m_symbols = d.m_symbols;

View File

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

View File

@ -68,8 +68,6 @@ namespace tl
namespace db namespace db
{ {
extern std::string net_tracer_component_name;
class NetTracerTechnologyComponentProvider class NetTracerTechnologyComponentProvider
: public db::TechnologyComponentProvider : public db::TechnologyComponentProvider
{ {
@ -87,7 +85,7 @@ public:
virtual tl::XMLElementBase *xml_element () const 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_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") 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" #include "gsiDecl.h"
namespace db
{
extern std::string net_tracer_component_name;
}
namespace gsi 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); const db::Technology *tech = db::Technologies::instance ()->technology_by_name (tech_name);
tl_assert (tech != 0); 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); tl_assert (tech_component != 0);
return tech_component->get_tracer_data (layout); return tech_component->get_tracer_data (layout);

View File

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

View File

@ -20,6 +20,7 @@
*/ */
#include "dbNetTracerIO.h"
#include "layNetTracerIO.h" #include "layNetTracerIO.h"
#include "layNetTracerDialog.h" #include "layNetTracerDialog.h"
@ -30,11 +31,6 @@
#include "gsiDecl.h" #include "gsiDecl.h"
namespace db
{
DB_PLUGIN_PUBLIC std::string net_tracer_component_name;
}
namespace lay 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 ());
} }