Mathew Sutcliffe
db4c05dd9f
refs #84 removed the CValueObject::compare method and added a friend function BlackMisc::compare to replace it.
...
The new compare is implemented using "multimethods" described in the book Advanced C++ Programming Styles and Idioms by James Coplien.
First, the isA method is used to determine which of the values being compared is the most general. (For example, CLength is more general than CAltitude.)
Then the compareImpl method is called on the most general value, with the other value as an argument.
If there is not a direct inheritance relation between the two values (or they are the same class) then the comparison is invalid and a assert is triggered.
2014-01-17 01:38:27 +00:00
Mathew Sutcliffe
917e1829d1
reviewed backlog INetwork and CContextNetwork changes from kbatclist
...
* INetwork setOwnAircraft slots
* ATIS received shimlib callback triggers separate VoiceRoom and LogoffTime signals
* INetwork statusMessage signal emitted in response to shimlib errors
* INetwork::ConnectionStatus added a DisconnectedError value and toString conversion
* INetwork::isConnected method
* Argument in CNetworkVatlib constructor to enable stealth or observer mode
* Update CLI sample, tests, and CContextNetwork accordingly
2014-01-14 23:30:21 +00:00
Mathew Sutcliffe
60ad43d291
INetwork: removed the five connectionStatus signals and added one signal with an enum argument to replace them.
...
Requested by Klaus, to ease the implementation of signal consumers.
2014-01-11 17:59:45 +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
Klaus Basan
51cbd2a394
all app projects need QT+=network used by the core for downloading ATC bookings
...
refs #81
2014-01-09 01:15:57 +00:00
Klaus Basan
bb61654a29
style and consistency:
...
* rename CStatusMessages to CStatusMessageList
* rename NetworkVatlib to CNetworkVatlib
* replace all occurrences of Realname with RealName (correct camel case)
* CSequence method corresponding to CList::append is push_back
* don't compile the qdbuscpp2xml metadata plugin by default
* CAircraftIcao string members always trimmed and capitalized
* added CComSystem::roundTo25KHz
* using epsilon comparison in a couple of places
refs #81
2014-01-09 01:15:56 +00:00
Klaus Basan
ab17dabd5b
samples and tests for all kbatclist branch changes
...
refs #81
2014-01-08 01:00:28 +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
Klaus Basan
c6da7b0d35
removing unneeded code
...
refs #81
2014-01-08 00:58:08 +00:00
Klaus Basan
978f3c88e5
style changes and removals of typeid
...
refs #81
2014-01-08 00:57:43 +00:00
Mathew Sutcliffe
ac1b014f1b
minor fix, only in doxygen comments
2013-10-21 03:43:09 +01:00
Mathew Sutcliffe
e607121cc4
Updating IContext to our current style and making it less reliant on macros.
...
Updating code that uses IContext to a more conformant pattern of usage.
2013-10-05 18:12:16 +01:00
Mathew Sutcliffe
5483f71c9b
test_blackcore.pro includes externals.pri
...
removed TODO comments
fixed mistake regarding backslash line continuations
2013-09-21 14:50:01 +01:00
Mathew Sutcliffe
e12d7fbd7a
Had a bit of spare time so tried out the policy design pattern I've been learning about, applying it to PQ converters.
...
Some interesting results:
* Minor simplification of PQ converters and unit ctors; may not seem like much, but I think it enables possible future simplifications of a similar kind.
* CMeasurementPrefix is gone, no longer needed. Now prefixes are applied at the template stage.
* Apart from that, PQs public API is unchanged.
* Discovered that ft/s^2 conversion factor was wrong: fixed.
2013-09-15 22:01:11 +01:00
Mathew Sutcliffe
00473e6f5f
improved error reporting in BlackCoreTest::Expect
2013-09-03 19:29:04 +01:00
Mathew Sutcliffe
891d47c8ff
Pure Qt/C++ test harness for INetwork
2013-09-01 21:09:22 +01:00
Mathew Sutcliffe
7a7fd69ee1
Perl-based test harness for the commandline client sample
2013-08-31 01:04:34 +01:00
Mathew Sutcliffe
0ae6ae5fea
fixed atclist unittest: call QCoreApplication::processEvents() after each signal is emitted, because they use Qt::QueuedConnection
2013-08-29 00:12:57 +01:00
Mathew Sutcliffe
20c33bf77c
Merge branch 'fsd'
2013-08-28 23:29:10 +01:00
Mathew Sutcliffe
0107d24523
create a dummy implementation of INetwork for testing purposes, and use it in the atc list unittest
2013-08-24 16:54:36 +01:00
Mathew Sutcliffe
74452599bf
disambiguate metric tonne (1,000kg) and US ton (2,000lb)
2013-08-22 19:59:41 +01:00
Mathew Sutcliffe
9b239f12aa
fixes for MinGW, including adding CONFIG += c++11 in all qmake project files
2013-08-19 18:46:37 +01:00
Mathew Sutcliffe
cec9de5cc5
use enums instead of bools to distinguish true/magnetic headings and tracks and MSL/AGL altitudes
2013-08-19 18:11:54 +01:00
Mathew Sutcliffe
da8ba9aac3
First major wave of PQ refactoring, including but not limited to:
...
* Default unit is more clearly stated in one place, not restated in many different places, and is not always the SI unit
* Converter strategy pattern in CMeasurementUnit, covering linear, affine, and different kinds of sexagesimal units
* General reorganization of CMeasurementUnit construction and CPhysicalQuantity methods, not removing any behvaiour
* Move duplicated method unitFromSymbol from derived classes into base class CMeasurementUnit
* For DBus, CPhysicalQuantity marshals both in its own unit and in the default unit
2013-08-19 03:05:08 +01:00
Mathew Sutcliffe
5d4fcc8d40
resolved pressure constants 1013.2hPa != 29.92inHg
2013-08-18 17:29:37 +01:00
Mathew Sutcliffe
baa0ac147e
remove integer quantities
2013-08-14 18:05:15 +01:00
Mathew Sutcliffe
586be27502
update unit tests
2013-08-14 18:05:13 +01:00
Mathew Sutcliffe
e194773c5b
CAtcListManager class
2013-08-09 00:55:46 +01:00
Klaus Basan
8b512ba818
DBus enabling of base classes plus sample for testing / show how to use them. Also qdbuscpp2xml plugin for blackmisc classes.
2013-07-22 14:33:50 +02:00
Klaus Basan
837809b96d
Changed round and renamed length in vector / matrix
2013-05-01 00:00:03 +02:00
Klaus Basan
ad6ac0186b
Cleaned up tests / samples a bit
2013-04-30 03:27:34 +02:00
Klaus Basan
b84df5fc21
Merged with changes of MS, some similar bug fixes done in parallel
2013-04-30 02:34:15 +02:00
Klaus Basan
8f5d9263fd
Fixed all issues detected by the test cases under MinGW - such as usage of abs() -> changed to qAbs(), rounding issues detected during calculations, and changed streaming methods with qDebug() (QDebug vs &QDebug issue).
2013-04-30 01:43:14 +02:00
Mathew Sutcliffe
3c2b894c93
fixed qmake files to support GNU make _and_ MSVC (discussed in #34 )
2013-04-29 23:14:42 +01:00
Klaus Basan
c6426a0759
Move Math constants into class (to be consistent with other constants), tested against minGW / gcc 4.7.2 and fixed various issues (mainly initializer lists, unused variables). BlackMisc compiles now in MinGW, but still issues (especially with qDebug() friend methods)
2013-04-29 16:00:41 +02:00
Klaus Basan
c5b9c48cd6
Changed interpolator (preliminary) to work with PQs and new classes, added stubs for unit tests in BlackCore
2013-04-27 02:09:42 +02:00
Klaus Basan
5eac9be7d5
Unit tests for acceleration and more for vector
2013-04-25 20:21:04 +02:00
Klaus Basan
a31e405b6b
Implemented commutative multiplications as friends in the templates, further test cases (unit tests), fixed Doxygen attributes, renamed test classes
2013-04-25 01:56:18 +02:00
Klaus Basan
472521f281
Further details on classes like epsilon compare, further unit tests.
2013-04-24 01:59:17 +02:00
Klaus Basan
bd53371de4
Fixed some issue with scalar multiplications (explicit) and continued with UNIT tests
2013-04-21 01:13:23 +02:00
Klaus Basan
f4affe55ef
Had to withdraw 3Vector3D, since they store values internally as float (idiotic design). Hence qreal will be dropped. Started with Unit tests.
2013-04-20 17:46:46 +02:00
Klaus Basan
7b0468d300
Completed transformation class and created samples for this class
2013-04-20 01:49:50 +02:00
Klaus Basan
e196a5585f
Added legal header, changed include guards to contain namespace prefix e.g BLACKMISC_XYZ_H
2013-04-10 00:50:25 +02:00
Klaus Basan
9a87731944
Avionics classes for Transponder, ADF, changed namespace to 2ndlevel
2013-04-09 02:00:38 +02:00
Klaus Basan
eb102372f1
Individual (per object) conversion as well as per unit (class) now possible, this is required for sexagesimal conversion (degrees) and will be required for geo-positions. Further classed for avionics.
2013-04-05 02:29:52 +02:00
Klaus Basan
943872ff67
Changed order of samples directory, started with aviation classes.
2013-04-01 21:53:35 +02:00
Klaus Basan
f77258343d
CAngleUnit::sexagesimalDeg(), moved conversion to virtual method in CMeasurmenetUnit, made string conversion virtual and also moved it to CMeasurmenetUnit (=>individual formatters). Time unit added.
2013-03-31 00:35:25 +01:00
Klaus Basan
be34b78425
Renamed distamce to SI conform name length: CDistance->CLength
...
Started with aviation classes
2013-03-27 18:09:39 +01:00
Klaus Basan
5677cd41e3
Changed PQ to template, removed unit default values, checked unit tests
2013-03-27 12:03:16 +01:00
Klaus Basan
3b99954bdc
Unit tests for temperature, virtual method for value conversion
2013-03-22 23:02:25 +01:00