mirror of https://github.com/KLayout/klayout.git
WIP: fixed some build errors
This commit is contained in:
parent
132ad2ed8d
commit
6b49386b67
|
|
@ -3114,10 +3114,10 @@ END
|
|||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
ttfile.puts("")
|
||||
ttfile.puts("#endif")
|
||||
end
|
||||
|
||||
puts("#{ttfile_name} written.")
|
||||
|
||||
|
|
|
|||
|
|
@ -74,14 +74,14 @@ private:
|
|||
/// @brief a helper class providing a linear-time iterator difference which is not necessarily
|
||||
/// the actual difference but monotonous
|
||||
|
||||
template <class X>
|
||||
size_t box_tree_lt_difference (const tl::reuse_vector_const_iterator<X> &a, const tl::reuse_vector_const_iterator<X> &b)
|
||||
template <class X, bool R>
|
||||
size_t box_tree_lt_difference (const tl::reuse_vector_const_iterator<X, R> &a, const tl::reuse_vector_const_iterator<X, R> &b)
|
||||
{
|
||||
return a.index () - b.index ();
|
||||
}
|
||||
|
||||
template <class X>
|
||||
size_t box_tree_lt_difference_ptr (const X *a, const tl::reuse_vector_const_iterator<X> &b)
|
||||
template <class X, bool R>
|
||||
size_t box_tree_lt_difference_ptr (const X *a, const tl::reuse_vector_const_iterator<X, R> &b)
|
||||
{
|
||||
return a - b.unsafe_target_addr ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
|
||||
namespace tl
|
||||
{
|
||||
template <class X> class vector;
|
||||
template <class X> class reuse_vector;
|
||||
template <class> class vector;
|
||||
template <class, bool> class reuse_vector;
|
||||
class Variant;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -786,8 +786,8 @@ public:
|
|||
* we would probably create too much constness. Hence we use const_cast to convert it
|
||||
* to a non-const one.
|
||||
*/
|
||||
template <class Obj>
|
||||
Shape (const db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj> &tree_iter)
|
||||
template <class Obj, bool R>
|
||||
Shape (const db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj, R> &tree_iter)
|
||||
: mp_shapes (const_cast<db::Shapes *> (shapes)), m_with_props (false), m_stable (true)
|
||||
{
|
||||
typename Obj::tag tag = typename Obj::tag ();
|
||||
|
|
@ -800,8 +800,8 @@ public:
|
|||
/**
|
||||
* @brief Construct as a proxy to a certain object given by an iterator
|
||||
*/
|
||||
template <class Obj>
|
||||
Shape (db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj> &tree_iter)
|
||||
template <class Obj, bool R>
|
||||
Shape (db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj, R> &tree_iter)
|
||||
: mp_shapes (shapes), m_with_props (false), m_stable (true)
|
||||
{
|
||||
typename Obj::tag tag = typename Obj::tag ();
|
||||
|
|
@ -818,8 +818,8 @@ public:
|
|||
* we would probably create too much constness. Hence we use const_cast to convert it
|
||||
* to a non-const one.
|
||||
*/
|
||||
template <class Obj, class Trans>
|
||||
Shape (const db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj> &tree_iter, const Trans &trans)
|
||||
template <class Obj, bool R, class Trans>
|
||||
Shape (const db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj, R> &tree_iter, const Trans &trans)
|
||||
: mp_shapes (const_cast<db::Shapes *> (shapes)), m_with_props (false), m_stable (true)
|
||||
{
|
||||
typename Obj::tag tag = typename Obj::tag ();
|
||||
|
|
@ -832,8 +832,8 @@ public:
|
|||
/**
|
||||
* @brief Construct as a proxy to a certain object given by an iterator
|
||||
*/
|
||||
template <class Obj, class Trans>
|
||||
Shape (db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj> &tree_iter, const Trans &trans)
|
||||
template <class Obj, bool R, class Trans>
|
||||
Shape (db::Shapes *shapes, const tl::reuse_vector_const_iterator<Obj, R> &tree_iter, const Trans &trans)
|
||||
: mp_shapes (shapes), m_with_props (false), m_stable (true)
|
||||
{
|
||||
typename Obj::tag tag = typename Obj::tag ();
|
||||
|
|
|
|||
|
|
@ -93,9 +93,6 @@ public:
|
|||
gsi::Callback cb_extract_devices;
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief A DeviceClassFactory implementation that allows reimplementation of the virtual methods
|
||||
*/
|
||||
|
|
@ -123,6 +120,9 @@ public:
|
|||
|
||||
}
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
Class<DeviceClassFactoryImpl> decl_dbDeviceClassFactoryBase ("db", "DeviceClassFactory",
|
||||
gsi::factory_callback ("create_class", &DeviceClassFactoryImpl::create_class, &DeviceClassFactoryImpl::cb_create_class,
|
||||
"@brief Creates the DeviceClass object\n"
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ public:
|
|||
|
||||
void read (void *a, tl::Extractor &ex) const
|
||||
{
|
||||
const T *t = a;
|
||||
T *t = (T *) a;
|
||||
ex.read (*t);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -452,6 +452,8 @@ private:
|
|||
std::unique_ptr<tl::Expression> mp_expr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
static tl::Variant eval_expr (const std::string &e)
|
||||
{
|
||||
ExpressionWrapper expr;
|
||||
|
|
@ -476,6 +478,9 @@ static ExpressionWrapper *new_expr2 (const std::string &e, const std::map<std::s
|
|||
return expr.release ();
|
||||
}
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
Class<tl::Eval> decl_ExpressionContext ("tl", "ExpressionContext",
|
||||
gsi::method ("var", &tl::Eval::set_var, gsi::arg ("name"), gsi::arg ("value"),
|
||||
"@brief Defines a variable with the given name and value\n"
|
||||
|
|
@ -635,16 +640,6 @@ public:
|
|||
gsi::Callback cleanup_cb;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace tl
|
||||
{
|
||||
template <> struct type_traits<gsi::Executable_Impl> : public type_traits<tl::Executable> { };
|
||||
}
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
Class<tl::Executable> decl_Executable ("tl", "ExecutableBase",
|
||||
gsi::Methods (),
|
||||
"@hide\n@alias Executable"
|
||||
|
|
@ -693,16 +688,6 @@ public:
|
|||
gsi::Callback executable_cb;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace tl
|
||||
{
|
||||
template <> struct type_traits<gsi::Recipe_Impl> : public type_traits<tl::Recipe> { };
|
||||
}
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
static Recipe_Impl *make_recipe (const std::string &name, const std::string &description)
|
||||
{
|
||||
return new Recipe_Impl (name, description);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
*/
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#if QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtGui/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtGui/gsiQtExternals.h"
|
||||
#else
|
||||
# include "../qt4/QtGui/gsiQtExternals.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
*/
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#if QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtWidgets/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtWidgets/gsiQtExternals.h"
|
||||
#else
|
||||
// no present in Qt4
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ public:
|
|||
tl::Event on_triggered_event;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ ValueWrapper::to_string (const Database *rdb) const
|
|||
std::string r;
|
||||
r.reserve (200);
|
||||
|
||||
if (tag_id () > 0) {
|
||||
if (tag_id () > 0 && rdb) {
|
||||
r += "[";
|
||||
const Tag &tag = rdb->tags ().tag (tag_id ());
|
||||
if (tag.is_user_tag ()) {
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ public:
|
|||
/**
|
||||
* @brief Convert the values collection to a string
|
||||
*/
|
||||
std::string to_string (const Database *rdb) const;
|
||||
std::string to_string (const Database *rdb = 0) const;
|
||||
|
||||
/**
|
||||
* @brief Fill the values collection from the string
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
template <class Type, class CanCopy> friend class list_impl;
|
||||
template <class Type, bool copy_constructible> friend class list_impl;
|
||||
template <class Type> friend class list;
|
||||
template <class Type> friend class list_iterator;
|
||||
template <class Type> friend class reverse_list_iterator;
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
template <class V> friend class reuse_vector_const_iterator;
|
||||
template <class, bool> friend class reuse_vector_const_iterator;
|
||||
|
||||
reuse_vector<Value, trivial_relocate> *mp_v;
|
||||
size_type m_n;
|
||||
|
|
@ -360,7 +360,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
template <class V> friend class reuse_vector_iterator;
|
||||
template <class, bool> friend class reuse_vector_iterator;
|
||||
|
||||
const reuse_vector<Value, trivial_relocate> *mp_v;
|
||||
size_type m_n;
|
||||
|
|
@ -955,8 +955,8 @@ private:
|
|||
value_type *mp_start, *mp_finish, *mp_capacity;
|
||||
ReuseData *mp_rdata;
|
||||
|
||||
template<class V> friend class reuse_vector_iterator;
|
||||
template<class V> friend class reuse_vector_const_iterator;
|
||||
template<class, bool> friend class reuse_vector_iterator;
|
||||
template<class, bool> friend class reuse_vector_const_iterator;
|
||||
|
||||
void init ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ struct has_equal_operator
|
|||
/**
|
||||
* @brief Detects whether a class has a less operator
|
||||
*/
|
||||
template <typename T> static __yes_type &__test_less_func (decltype (&T::operator==));
|
||||
template <typename T> static __yes_type &__test_less_func (decltype (&T::operator<));
|
||||
template <typename> static __no_type &__test_less_func (...);
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
|
|
@ -139,27 +139,27 @@ public:
|
|||
|
||||
virtual bool equal (const void *a, const void *b) const
|
||||
{
|
||||
return _var_user_equal_impl<T, tl::has_equal_operator<T>::value> ((const T *) a, (const T *) b);
|
||||
return _var_user_equal_impl<T, tl::has_equal_operator<T>::value>::call ((const T *) a, (const T *) b);
|
||||
}
|
||||
|
||||
virtual bool less (const void *a, const void *b) const
|
||||
{
|
||||
return _var_user_less_impl<T, tl::has_less_operator<T>::value> ((const T *) a, (const T *) b);
|
||||
return _var_user_less_impl<T, tl::has_less_operator<T>::value>::call ((const T *) a, (const T *) b);
|
||||
}
|
||||
|
||||
virtual void *clone (const void *a) const
|
||||
{
|
||||
return _var_user_clone_impl<T, std::is_copy_constructible<T>::value> ((const T *) a);
|
||||
return _var_user_clone_impl<T, std::is_copy_constructible<T>::value>::call ((const T *) a);
|
||||
}
|
||||
|
||||
virtual void assign (void *a, const void *b) const
|
||||
{
|
||||
_var_user_assign_impl<T, std::is_copy_assignable<T>::value> ((T *) a, (const T *)b);
|
||||
_var_user_assign_impl<T, std::is_copy_assignable<T>::value>::call ((T *) a, (const T *)b);
|
||||
}
|
||||
|
||||
virtual std::string to_string (const void *a) const
|
||||
{
|
||||
return _var_user_to_string_impl<T, tl::has_to_string<T>::value> ((const T *) a);
|
||||
return _var_user_to_string_impl<T, tl::has_to_string<T>::value>::call ((const T *) a);
|
||||
}
|
||||
|
||||
virtual void read (void *a, tl::Extractor &ex) const
|
||||
|
|
|
|||
Loading…
Reference in New Issue