WIP: removing need to tl::type_traits

This commit is contained in:
Matthias Koefferlein
2021-11-29 22:54:28 +01:00
parent dfa1c0dbfd
commit 132ad2ed8d
76 changed files with 271 additions and 1521 deletions
@@ -92,29 +92,6 @@ public:
gsi::Callback get_cb;
};
}
namespace tl
{
// type traits for BrowserDialog_Stub
template <>
struct type_traits<gsi::BrowserDialog_Stub> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
// type traits for BrowserPanel
template <>
struct type_traits<lay::BrowserPanel> : public type_traits<void> {
typedef tl::false_tag has_default_constructor;
typedef tl::false_tag has_copy_constructor;
};
}
namespace gsi
{
// ---------------------------------------------------------------------------------
// Value classes with "not set" capabilities
-12
View File
@@ -24,18 +24,6 @@
#include "gsiDecl.h"
#include "layLayoutView.h"
namespace tl
{
// NOTE: we don't want references to be passed around and be default-constructed.
// References are only meant as return values for the layer properties iterator and
// be short-living. Hence we disable copying (which will also disable the default
// "assign" implementation) and default construction.
template <> struct type_traits<lay::LayerPropertiesNodeRef> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
}
namespace gsi
{
-12
View File
@@ -44,18 +44,6 @@ public:
tl::Event on_triggered_event;
};
}
namespace tl
{
template <> struct type_traits<ActionStub> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
}
namespace gsi
{
static std::string pack_key_binding (const std::map<std::string, std::string> &kb)
{
std::vector<std::pair<std::string, std::string> > v;
@@ -27,18 +27,6 @@
#include "layNetlistBrowserDialog.h"
#include "layLayoutView.h"
namespace tl
{
// disable copy and default constructor for NetlistBrowserDialog
template <> struct type_traits<lay::NetlistBrowserDialog> : public type_traits<void>
{
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
}
namespace gsi
{
-15
View File
@@ -32,21 +32,6 @@ namespace gsi
{
class PluginFactoryBase;
class PluginBase;
}
namespace tl
{
template <> struct type_traits<gsi::PluginFactoryBase> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
template <> struct type_traits<gsi::PluginBase> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
}
namespace gsi
{
// TODO: these static variables are a bad hack!
// However it's not easy to pass parameters to a C++ classes constructor in Ruby without
-9
View File
@@ -63,15 +63,6 @@
// --------------------------------------------------------------
// A helper class that allows putting a QImage into a tl::Variant
namespace tl
{
template <>
struct type_traits <QImage> : public type_traits<void>
{
typedef true_tag has_equal_operator;
};
}
namespace gtf
{
-17
View File
@@ -822,23 +822,6 @@ private:
}
namespace tl
{
template <> struct type_traits<lay::AbstractMenu> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
template <> struct type_traits<lay::AbstractMenuItem> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
template <> struct type_traits<lay::Action> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
}
#endif
-11
View File
@@ -130,16 +130,5 @@ private:
}
namespace tl
{
template <> struct type_traits<lay::BrowserDialog> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
template <> struct type_traits<lay::BrowserSource> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
}
#endif
-11
View File
@@ -246,15 +246,4 @@ private:
}
namespace tl
{
// disable copy ctor for Dispatcher
template <> struct type_traits<lay::Dispatcher> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
}
#endif
-8
View File
@@ -2934,12 +2934,4 @@ private:
}
namespace tl {
template <> struct type_traits<lay::LayoutView> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
}
#endif
-13
View File
@@ -813,17 +813,4 @@ private:
}
namespace tl {
template <> struct type_traits<lay::Marker> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
template <> struct type_traits<lay::DMarker> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
typedef tl::false_tag has_default_constructor;
};
}
#endif
@@ -99,19 +99,6 @@ class CircuitNetItemData;
class CircuitDeviceItemData;
class CircuitSubCircuitItemData;
}
namespace tl {
// disable copying for NetlistModelItemData
template<> struct type_traits<lay::NetlistModelItemData>
{
typedef false_tag has_copy_constructor;
};
}
namespace lay
{
/**
* @brief A base class for the item data object
*/
-8
View File
@@ -883,14 +883,6 @@ inline bool test_and_set (T &target, const T &source)
}
namespace tl
{
// disable copy ctor for Plugin
template <> struct type_traits<lay::Plugin> : public type_traits<void> {
typedef tl::false_tag has_copy_constructor;
};
}
#endif