Commit Graph

81 Commits

Author SHA1 Message Date
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Klaus Basan
14c3c51585 Ref T529, get reversed sequence 2019-02-22 20:36:00 +00:00
Klaus Basan
17f67d6106 Style 2019-02-22 20:35:53 +00:00
Mat Sutcliffe
4f2579b812 Ref T275 testaircraftsituation: detach lists to get meaningful benchmark results. 2019-02-22 20:34:58 +00:00
Mat Sutcliffe
4c0bbbae25 Fixed warnings reported by Clang on Windows. 2019-02-22 20:23:27 +00:00
Mat Sutcliffe
71de01065b Ref T464 Implement removal of one sequence from another in O(n),
assuming that elements in both sequences are in the same order in both.
2018-12-14 19:57:29 +01:00
Klaus Basan
7e47349b30 Ref T386, partial sort 2018-10-05 17:39:59 +02:00
Klaus Basan
6bcded9264 Style 2018-07-09 22:30:20 +02:00
Klaus Basan
f7a0c69fc8 Ref T270, push front for sequence and unified "insert" -> "push_back"
Remark: "CSequence::insert" is a synonym "push_back". This makes it clearer that push_back is used.
2018-06-01 01:30:33 +02:00
Klaus Basan
47afc4d6fc Conversion function to int, which can be used when int is needed to avoid 2018-05-12 21:40:18 +02:00
Klaus Basan
89f98a3137 Ref T240, added push_backMaxElements in CSequence 2018-02-04 08:59:45 +01:00
Klaus Basan
51ba6398bb Ref T241, Ref T243, ITimestampWithOffsetObjectList
* there was already ITimestampWithOffsetBased for objects
* this creates the container version
* functions to add objects (parts/situations) and guarantee the sort order
* moved push_frontMaxElements to CSequence (not specific for timestamp lists)
* added in-place reverse
2018-02-04 08:53:50 +01:00
Klaus Basan
fa6f83d87b Ref T218, sequence replaceOrAdd overloads 2018-01-14 18:45:50 +01: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
Mathew Sutcliffe
4d30ce40c7 refs #852 Added reverse iterators to CRange and CSequence. 2017-02-24 00:17:44 +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
c9ddb2ba39 Added missing methods in CSequence. 2016-12-06 09:46:53 +01:00
Mathew Sutcliffe
323a5bb12f refs #698 CSequence iterator should be random access to improve STL algorithm efficiency. 2016-07-04 23:43:33 +01:00
Mathew Sutcliffe
a209f961a6 refs #698 Added unorderedEqualsByKeys method for sequences. 2016-07-04 23:43:29 +01:00
Mathew Sutcliffe
b859bead0c refs #700 Added sortByProperty method for sequences. 2016-07-04 23:43:20 +01:00
Mathew Sutcliffe
e20c8bbcbd Doxygen style. 2016-07-04 23:40:30 +01: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
8d9b3c6e7f CSequence::separate splits up a sequence into a map of sequences categorized by some predicate. 2016-01-27 23:37:42 +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
886f9937ce Fixed errors found while trying to compile with Clang on Windows. 2015-12-08 21:16:57 +00:00
Klaus Basan
71c219842f Fixed doxygen warnings, can be refined as required 2015-11-19 21:06:47 +00:00
Mathew Sutcliffe
eb45d7a409 refs #484 CSequence: added partiallySort family of methods. 2015-11-19 21:04:59 +00:00
Mathew Sutcliffe
e3319f0dae refs #481 Removed old randomElements. 2015-11-19 21:02:58 +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
Roland Winklmeier
41e17aa0c7 Add CSequence::removeIfIn(const CSequence &other)
Remove all elements if they are in other
2015-11-19 20:57:57 +00:00
Roland Winklmeier
a7b71d974b Fix segfault in CSequence::operator <() 2015-11-19 20:57:55 +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
Mathew Sutcliffe
36d116b4e9 refs #413 Removed one overload of CRange::findBy and one of CSequence::applyIf; they were never used and they caused a circular dependency.
Templatized another overload of applyIf to break a circular dependency.
2015-05-12 20:37:53 +01: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
Roland Winklmeier
ab98009996 Several gcc and clang fixes
This superseeds also f1199793 by a cleaner workaround.
2015-03-24 10:47:32 +00:00
Klaus Basan
5ed95aee3d refs #391, allow to send aircraft parts from GUI
* GUI component for aircraft parts
* remote aircraft selector component
* Adjusted GUI for internals component
* Enable / disable debug messages from GUI
* Allow to init engines directly
* Removed unused async sort in sequence

In same step fixed found issues in interpolator
* allow to set max rendered aircraft
2015-03-20 17:08:23 +01:00
Klaus Basan
f31445e873 refs #386, further improvements on interpolation
* extended unit tests for interpolator / parts testing
* allow to skip sorting when splitting by time
* update ot aircraft to FSX in own member function
* Skip time sync parts (FSX) when disabled
2015-03-20 17:08:14 +01:00
Klaus Basan
5bad11dcca Allow init by QList in CSequence 2015-03-20 17:01:16 +01:00
Klaus Basan
eca8c5b637 Reflecting discussed changes for interpolation performance refs #386
(based on FSX testing)
* Only send changed situation to SIM
* Split sending of parts / situations
* Only send parts with a reduced frequency (means slower as positions)
* Mark geodetic height as null for default values (the value is usually unavailable)
* Fixed altitude to MSL for network data
* Trace which aircrafts support aircraft parts via network
* Renamed insert_fron push_front (as proposed by Roland)

Status quo / lessons learnt
* On slower PCs jitter is still noticed for interpolated aircraft.
* Running interpolation in an independent process (aka core, not in GUI) reduced load dependencies
  => it seems to make sense to run driver in own thread
* The onGround flag in parts seems clumsy as it required to retrieve parts for position updates
* In interpolation performance really matters
2015-03-20 17:00:41 +01:00
Klaus Basan
420a47e90c refs #369, changed interpolation to a working (but still too bad performing) version
* using split by callsign everywhere
* helper function to insert_front
* revised linear interpolator
* renamed to remoteAircraft
* renamed to container() in providers (gettters are usually copies)

Issues why changes did so long:
* insert in list is not adding in front, but same as push_back (that was confusing)
* naming of values before/after in interpolator was ambigious
* QMap keeps values sorted by key, not arbitrarily
2015-03-20 16:49:07 +01:00
Mathew Sutcliffe
4960ba5170 Fixed error in CSequence::useImplOf. 2015-01-03 17:55:39 +00:00
Mathew Sutcliffe
d8d361a317 refs #247 Improved CSequence comparison, and suppressed stupid warnings. 2014-12-13 01:38:49 +00:00
Klaus Basan
d4e126932b Fixes of review included (Concurrency 2, https://dev.vatsim-germany.org/issues/325#note-14) 2014-10-07 13:10:48 +02:00
Klaus Basan
ef5f5bde0f Formatting, new icons, minor tweaks 2014-10-07 13:10:37 +02:00