Commit Graph

46 Commits

Author SHA1 Message Date
Mat Sutcliffe
b80114213d Issue #77 Move mixin classes to separate files
By separating them from unrelated code, their dependents
can use them without depending on unrelated code, which
in turn helps to reduce cyclic dependencies.
2020-08-29 14:16:17 +01:00
Mat Sutcliffe
2dc86652c2 Issue #77 Include style 2020-08-28 00:45:26 +01:00
Mat Sutcliffe
470a0b27f5 Fix for undefined behaviour in CCollection::erase. 2019-05-13 11:21:07 +02:00
Mat Sutcliffe
6d9f9a286d Ref T552 Using QDataStream marshalling mixins in value classes. 2019-04-12 13:30:55 +01:00
Mat Sutcliffe
798a0b8f06 Using friend function comparison and arithmetic operators, for parameter symmetry. 2019-04-11 22:12:03 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Mat Sutcliffe
4f2579b812 Ref T275 testaircraftsituation: detach lists to get meaningful benchmark results. 2019-02-22 20:34:58 +00:00
Mathew Sutcliffe
fcb6cf1a52 Removed type erasure in containers
Summary:
Refs T196
Using QVector as this is Qt's recommended container type.

Reviewers: #swift_developers, rwinklmeier

Reviewed By: #swift_developers, rwinklmeier

Subscribers: rwinklmeier, jenkins

Tags: #swift_pilot_client

Maniphest Tasks: T196

Differential Revision: https://dev.swift-project.org/D61
2017-11-23 22:15:23 +00:00
Mathew Sutcliffe
921ef30eda Use C++14 features to simplify our container base classes
Summary: Using C++14 function return type deduction we can simplify the CRTP in CContainerBase etc.

Reviewers: #swift_developers, rwinklmeier

Reviewed By: #swift_developers, rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D65
2017-11-23 21:59:09 +00:00
Mathew Sutcliffe
b20ebd6dfd refs #937 Resolved clazy warnings: rule of three. 2017-04-19 19:31:44 +01:00
Klaus Basan
2f14886db5 refs #879, added utility function toQList in collection 2017-02-24 15:21:27 +00:00
Mathew Sutcliffe
95bfff36b0 refs #800 Use int as size_type for compatibility with Qt containers. 2016-12-13 19:00:41 +01:00
Mathew Sutcliffe
3351b1f8e1 refs #800 Fixed warning: deprecated implicit copy ctor/assign with user-declared dtor (rule of zero). 2016-12-13 19:00:38 +01:00
Mathew Sutcliffe
e20c8bbcbd Doxygen style. 2016-07-04 23:40:30 +01:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Mathew Sutcliffe
a895cc2c54 refs #624 Removed many workarounds, no longer needed. 2016-03-22 16:02:58 +00:00
Mathew Sutcliffe
6f1cf8e3d7 refs #624 Replace typedef with using. 2016-03-22 16:02:50 +00:00
Mathew Sutcliffe
91494ea2e5 refs #624 Swap functions, move constructors, and move assignment operators should all be noexcept where possible. 2016-03-21 02:20:01 +00:00
Mathew Sutcliffe
3bdcd7e386 refs #584 Moved hash related stuff to dictionary.h
This also means moving Mixin::Icon from CContainerBase one step down the inheritance hierarchy
to resolve what would otherwise have been a circular include dependency.
2016-02-08 17:26:45 +00:00
Mathew Sutcliffe
6ddce24f0c Improved efficiency of CSequence::removeIf, but CCollection::removeIf must still use the old algorithm. 2016-01-27 23:37:41 +00:00
Mathew Sutcliffe
e3319f0dae refs #481 Removed old randomElements. 2015-11-19 21:02:58 +00:00
Mathew Sutcliffe
64a25a7860 refs #466 Resolved TODO items in containers. 2015-11-19 21:00:56 +00:00
Klaus Basan
ad1938b8d8 refs #452, allow to pick random elements from collection
(will be used in view resizing)
2015-11-19 20:58:57 +00:00
Mathew Sutcliffe
5a91d761c2 refs #413 Breaking circular dependencies by moving mixin classes from valueobject.h to the files where they fit best:
* DBus mixins moved to dbus.h
* Json mixins moved to json.h
* Icon mixin moved to icon.h
* Comparison mixins moved to compare.h
* Hash and string mixins moved to blackmiscfreefunctions.h
* Index mixin moved to propertyindexvariantmap.h
* MetaType mixins moved to variant.h
* registerMetaValueType moved to variant.h
* valueobject_private.h renamed to variant_private.h
2015-05-12 20:37:59 +01:00
Roland Winklmeier
31863e9ca6 refs #403 fix CCollection::useImplOf implementation 2015-05-05 21:34:08 +02:00
Roland Winklmeier
e4e9d88af8 refs #403 fix return type in CCollection::insert 2015-05-05 21:34:05 +02:00
Klaus Basan
48655bf551 refs #395, signatures for max.aircraft and max.range
(!) This in an intermediate step, the feature is not yet fully operational

* max distance for rendering as simulator property
* set max distance / aircraft from GUI

As result of the latest meeting
* changed CCallsignList to CCollection
* fixed some warning with elevated compiler settings (e.g. removed qint values -> int)
2015-03-29 20:15:13 +02:00
Mathew Sutcliffe
31c33b4b8d refs #356 Removed CValueObject and expanded CValueObjectStdTuple to compensate.
* Involves rearranging some header includes to break cyclic include dependencies,
* Adding a new, simple base class CEmpty,
* Removing any remaining polymorphic uses of CValueObject with templates,
* Adding a new trait for use with enable_if to restrict templates to work only with value objects,
* Replacing the polymorphic/runtime multimethod-based compare functions with static/compile-time compare functions.
2015-03-27 19:08:51 +00:00
Klaus Basan
3fb5087ea8 Renaming, header, Doxygen, formatting (during refs #314) 2014-08-24 02:45:52 +02:00
Mathew Sutcliffe
d6234ee2cd refs #311 added initializer_list constructors in containers 2014-08-06 17:29:20 +01:00
Mathew Sutcliffe
98a6854f8c refs #290 using a CRange of iterator adaptors to return from the secondary predicate-based methods of the containers without copying elements 2014-07-13 20:30:20 +01:00
Mathew Sutcliffe
101c5a4f98 refs #290 using a CRange of iterator adaptors to return from the primary predicate-based methods of CRangeBase without copying elements 2014-07-13 20:30:20 +01:00
Mathew Sutcliffe
b5097a0e63 containers: added opaque pointer access to implementation container, to help with debugging 2014-07-01 01:03:32 +01:00
Mathew Sutcliffe
894df23c50 refs #230 methods to combine and bisect containers 2014-05-06 18:13:20 +01:00
Mathew Sutcliffe
18453225bd preparatory to refs #230, need to replace QSet with QOrderedSet
(which is our own custom class) in order to support standard algorithms.
This also means adding generic comparison operators for CValueObject.
2014-05-06 18:13:10 +01:00
Mathew Sutcliffe
e076248cd9 additional support for move semantics in our containers 2014-05-05 01:41:41 +01:00
Mathew Sutcliffe
f60b58ccd2 using intptr_t as the size_type for containers
refs #92 fixes MSVC "possible loss of data" warning when compiling for 64bits
2014-02-17 16:37:02 +00:00
Mathew Sutcliffe
e52a4da826 refs #124 using override keyword in containers' pimpls 2014-02-08 14:20:39 +00:00
Mathew Sutcliffe
04ab68917f fixed mistake in CCollection::remove, detected by GCC
refs #108
2014-01-29 23:08:55 +00:00
Mathew Sutcliffe
7c8aa8226d const corrections 2014-01-28 20:19:06 +00:00
Mathew Sutcliffe
d48d8ed951 refs #106, moved removeIf from CSequence to CContainerBase and added remove method in CCollection (CSequence already had a remove method) 2014-01-28 18:30:06 +00:00
Mathew Sutcliffe
1e153b45f0 refs #108, added find methods in CSequence and CCollection;
CSequence uses std::find, and CCollection uses the more efficient find method of the implementation type,
which requires that the implementation type be an associative container like QSet or std::set.
Modified CContainerBase::contains to use these new find methods.
2014-01-28 18:25:14 +00:00
Mathew Sutcliffe
3d3a43602f removed unnecessary \param and \return lines from doxygen comments for container classes, refs #91 2014-01-25 19:36:41 +00:00
Mathew Sutcliffe
405ad7165e Iterator classes: removed templated ctors and added static methods to replace them,
for consistency with the container classes and to avoid any potential infinite recursion with MSVC2010.
See also commit:6a9065b

Also fixed a mistake in CSequence and CCollection, where Pimpl::erase was calling the wrong version of m_impl.erase
reported by Roland.
2014-01-11 16:53:21 +00:00
Mathew Sutcliffe
6a9065b37f Container classes: removed templated ctors and added static methods to replace them.
This resolves an issue with infinite recursion and stack overflows in MSVC2010.
See also http://connect.microsoft.com/VisualStudio/feedback/details/522094/
2014-01-11 01:32:24 +00:00
Mathew Sutcliffe
a57e640398 generic type-erased container types CSequence and CCollection, including predicate-based algorithms
refs #81
2014-01-08 00:59:31 +00:00