From 4c4261be6ceb54109589692f4f18a91b52a5c71c Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 16 Sep 2018 08:48:43 +0200 Subject: [PATCH] Initialized netx plugin --- .../tools/netx/db_plugin/dbNetExtractor.cc | 45 +++++++++++++++ .../tools/netx/db_plugin/dbNetExtractor.h | 56 +++++++++++++++++++ .../netx/db_plugin/dbNetExtractorPlugin.cc | 29 ++++++++++ .../tools/netx/db_plugin/db_plugin.pro | 14 +++++ .../netx/db_plugin/gsiDeclDbNetExtractor.cc | 39 +++++++++++++ src/plugins/tools/netx/netx.pro | 11 ++++ .../netx/unit_tests/dbNetExtractorTests.cc | 30 ++++++++++ .../tools/netx/unit_tests/unit_tests.pro | 20 +++++++ 8 files changed, 244 insertions(+) create mode 100644 src/plugins/tools/netx/db_plugin/dbNetExtractor.cc create mode 100644 src/plugins/tools/netx/db_plugin/dbNetExtractor.h create mode 100644 src/plugins/tools/netx/db_plugin/dbNetExtractorPlugin.cc create mode 100644 src/plugins/tools/netx/db_plugin/db_plugin.pro create mode 100644 src/plugins/tools/netx/db_plugin/gsiDeclDbNetExtractor.cc create mode 100644 src/plugins/tools/netx/netx.pro create mode 100644 src/plugins/tools/netx/unit_tests/dbNetExtractorTests.cc create mode 100644 src/plugins/tools/netx/unit_tests/unit_tests.pro diff --git a/src/plugins/tools/netx/db_plugin/dbNetExtractor.cc b/src/plugins/tools/netx/db_plugin/dbNetExtractor.cc new file mode 100644 index 000000000..584a7583c --- /dev/null +++ b/src/plugins/tools/netx/db_plugin/dbNetExtractor.cc @@ -0,0 +1,45 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2018 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#include "dbNetExtractor.h" +#include "tlLog.h" + +namespace db +{ + +NetExtractor::NetExtractor() +{ + + // @@@ + +} + +void NetExtractor::dummy() +{ + // @@@ + tl::log << "@@@ this is net extractor!"; + // @@@ +} + +} + diff --git a/src/plugins/tools/netx/db_plugin/dbNetExtractor.h b/src/plugins/tools/netx/db_plugin/dbNetExtractor.h new file mode 100644 index 000000000..64f107b1e --- /dev/null +++ b/src/plugins/tools/netx/db_plugin/dbNetExtractor.h @@ -0,0 +1,56 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2018 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + + +#ifndef HDR_dbNetExtractor +#define HDR_dbNetExtractor + +#include "dbPluginCommon.h" + +namespace db +{ + +/** + * @brief The net extractor + * + * ... + */ +class DB_PLUGIN_PUBLIC NetExtractor +{ +public: + /** + * @brief Constructs a net extractor + */ + NetExtractor (); + + // @@@ + void dummy (); + +private: + // @@@ +}; + +} + +#endif + diff --git a/src/plugins/tools/netx/db_plugin/dbNetExtractorPlugin.cc b/src/plugins/tools/netx/db_plugin/dbNetExtractorPlugin.cc new file mode 100644 index 000000000..f06459c5b --- /dev/null +++ b/src/plugins/tools/netx/db_plugin/dbNetExtractorPlugin.cc @@ -0,0 +1,29 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2018 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +namespace db +{ + + // @@@ + +} diff --git a/src/plugins/tools/netx/db_plugin/db_plugin.pro b/src/plugins/tools/netx/db_plugin/db_plugin.pro new file mode 100644 index 000000000..9126b6af1 --- /dev/null +++ b/src/plugins/tools/netx/db_plugin/db_plugin.pro @@ -0,0 +1,14 @@ + +TARGET = netx +DESTDIR = $$OUT_PWD/../../../../db_plugins + +include($$PWD/../../../db_plugin.pri) + +HEADERS = \ + dbNetExtractor.h \ + +SOURCES = \ + dbNetExtractor.cc \ + dbNetExtractorPlugin.cc \ + gsiDeclDbNetExtractor.cc \ + diff --git a/src/plugins/tools/netx/db_plugin/gsiDeclDbNetExtractor.cc b/src/plugins/tools/netx/db_plugin/gsiDeclDbNetExtractor.cc new file mode 100644 index 000000000..ef2b53845 --- /dev/null +++ b/src/plugins/tools/netx/db_plugin/gsiDeclDbNetExtractor.cc @@ -0,0 +1,39 @@ +/* + + KLayout Layout Viewer + Copyright (C) 2006-2018 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#include "dbNetExtractor.h" + +#include "gsiDecl.h" + +namespace gsi +{ + +gsi::Class decl_NetNetExtractor ("db", "NetExtractor", + gsi::method ("dummy", &db::NetExtractor::dummy, + "@@@" + ), + "@brief The net extractor\n" + "\n" + "This class has been introduced in version 0.26." +); + +} diff --git a/src/plugins/tools/netx/netx.pro b/src/plugins/tools/netx/netx.pro new file mode 100644 index 000000000..f42b2a627 --- /dev/null +++ b/src/plugins/tools/netx/netx.pro @@ -0,0 +1,11 @@ + +TEMPLATE = subdirs + +SUBDIRS = db_plugin unit_tests +unit_tests.depends += db_plugin + +#!equals(HAVE_QT, "0") { +# SUBDIRS += lay_plugin +# lay_plugin.depends += db_plugin +#} + diff --git a/src/plugins/tools/netx/unit_tests/dbNetExtractorTests.cc b/src/plugins/tools/netx/unit_tests/dbNetExtractorTests.cc new file mode 100644 index 000000000..28ce60281 --- /dev/null +++ b/src/plugins/tools/netx/unit_tests/dbNetExtractorTests.cc @@ -0,0 +1,30 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2018 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#include "tlUnitTest.h" + +TEST(1) +{ + // .. nothing yet .. +} + diff --git a/src/plugins/tools/netx/unit_tests/unit_tests.pro b/src/plugins/tools/netx/unit_tests/unit_tests.pro new file mode 100644 index 000000000..ac1f944ea --- /dev/null +++ b/src/plugins/tools/netx/unit_tests/unit_tests.pro @@ -0,0 +1,20 @@ + +DESTDIR_UT = $$OUT_PWD/../../../.. + +TARGET = net_tracer_tests + +include($$PWD/../../../../lib_ut.pri) + +SOURCES = \ + dbNetExtractor.cc \ + +INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common +DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common + +LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi + +# This makes the test pull the mebes library for testing (not installed) +PLUGINPATH = $$OUT_PWD/../../../../db_plugins +QMAKE_RPATHDIR += $$PLUGINPATH + +LIBS += -L$$PLUGINPATH -lnetx