Commit Graph

44 Commits

Author SHA1 Message Date
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
Klaus Basan
31646b91f6 refs #330, relevant predicate-based container mutator methods now return the number of elements they modified. 2014-10-07 13:10:34 +02:00
Klaus Basan
053c248f06 refs #325, added async. sort (kind of experimental feature to see performance impact) 2014-10-07 13:10:18 +02: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
83b552faf6 refs #290 added CSequence::truncate method 2014-07-13 20:30:24 +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
bcac93f593 CSequence: frontOrDefault and backOrDefault taking the default value as an argument 2014-07-13 20:30:16 +01:00
Mathew Sutcliffe
e23e418797 incidental refactoring: simplify some predicates by templating their call operators 2014-07-13 00:45:22 +01:00
Mathew Sutcliffe
482ddf2081 fixes #285 removing fake variadics in predicate-based container methods 2014-07-04 11:41:44 +02: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
078ae6c498 refs #260 added frontOrDefault and backOrDefault methods in CSequence 2014-06-05 23:29:10 +01:00
Mathew Sutcliffe
894df23c50 refs #230 methods to combine and bisect containers 2014-05-06 18:13:20 +01:00
Mathew Sutcliffe
e076248cd9 additional support for move semantics in our containers 2014-05-05 01:41:41 +01:00
Klaus Basan
e474671ead refs #207, renamed CValueMap to CIndexVariantMap.
* The map will be used with CSimulaorInfo to transfer a variable number of setting information about the flight simulator. It is being used, because it is already DBus and tupel compliant. The new name better fits its purpose.
* Add == operator for CIndexVariantMap (ambiguity error with tupels)
2014-04-17 00:10:04 +02: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
c966d487f0 refs #91 Doxygen fixes in containers, predicates, and plugins.
Fixed PREDEFINED config in Doxyfile, so Doxygen only sees the variadic predicates.
2014-02-08 14:20:38 +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
d073681630 minor doxygen fixes 2014-01-28 01:50:30 +00:00
Mathew Sutcliffe
88f4a7186f fixed mistake with forgetting to call erase after std::remove 2014-01-27 00:48:14 +00:00
Mathew Sutcliffe
6f19d0a479 containers: added methods contains(), remove(), replace(), replaceOrAdd(),
corresponding to contains(), removeIf(), replaceIf(), and replaceOrAdd(), but overloaded for const T& as well as for predicates.
refs #106
2014-01-25 19:36:42 +00:00
Mathew Sutcliffe
33d555e151 moved removeIf from CContainerBase to CSequence because it can't work with non-sequential containers, fixes #106 2014-01-25 19:36:42 +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
4f4b77f2b2 CSequence: added sort method, an in-place companion to the sorted method
refs #81
2014-01-10 00:20:22 +00:00
Mathew Sutcliffe
08e978c8d6 moved from CContainerBase to CSequence those methods which only support sequential containers
refs #81
2014-01-10 00:20:21 +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