Commit Graph

39 Commits

Author SHA1 Message Date
Roland Winklmeier
08302c23bb Remove obsolete logging framework
This changes removes classes of the obsolete logging frame work and
all its references. It was not used anywhere, but included in several
headers.
Had to add header QDateTime in some places, which was not correctly
included and now missing.

refs #90
2014-01-18 20:09:03 +01:00
Klaus Basan
f883babc20 Only Doxygen fixes in order to answer
https://dev.vatsim-germany.org/boards/22/topics/1417?r=1432#message-1432

Fixed some Doxygen warnings along with it
No code changes!
2014-01-17 22:53:37 +01:00
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
Klaus Basan
c72e8a4a27 made strictness optional in CMeasurementUnit::unitFromSymbol
refs #81
2014-01-08 00:59:27 +00:00
Klaus Basan
f247399575 register CMeasurementUnit as a Qt meta type
refs #81
2014-01-08 00:59:24 +00:00
Klaus Basan
a280d239e6 using hashes to perform comparisons between blackmisc value objects stored inside of QVariant
refs #81
2014-01-08 00:59:00 +00:00
Klaus Basan
67a5dbfe48 converting value objects to/from QVariant
refs #81
2014-01-08 00:58:56 +00:00
Klaus Basan
ded6fc012e rename CStreamable to CValueObject
refs #81
2014-01-08 00:58:50 +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
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
a011bb18e6 fixed compile errors caused by inconsistencies between merged branches 2013-08-29 00:02:47 +01:00
Mathew Sutcliffe
669af6b691 give prefixed units their own names and symbols instead of concatenating prefix and base unit 2013-08-22 19:44:19 +01:00
Mathew Sutcliffe
21ca361bc1 removed operator= and copy ctor from classes where they only duplicated the behaviour of the default implementations that C++ generates automatically 2013-08-19 03:21:12 +01:00
Mathew Sutcliffe
a6f89ce9ea renamed CBaseStreamStringifier to CStreamable 2013-08-19 03:05:09 +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
5257560265 fixed repeatedly increasing memory usage in units unmarshalling code 2013-08-13 22:44:01 +01:00
Mathew Sutcliffe
2c781e8b36 style fixes: mostly just things that make my eyes bleed :) 2013-08-13 22:29:48 +01:00
Klaus Basan
e6e6dea4cd More DBus tests 2013-08-06 13:56:15 +02:00
Klaus Basan
62591a750f Refactoring, renamed: convertToQString (old: stringForConvert) 2013-07-28 03:31:04 +02:00
Klaus Basan
a53ea0c5fd DBus: track, heading, transponder. Added I18N for track/heading, added further I18N keys. Of course not all I18N strings are translated yet. 2013-07-28 03:20:04 +02:00
Klaus Basan
40a97c3d82 Added I18N for PQs, initial version. Hence resource file and language files. Changed samplesphysicalquantities to check some I18N topics. 2013-07-27 20:23:23 +02:00
Klaus Basan
2fc08a0376 Enabled DBus with matrix classes, noticed issue with QList Signature (ad, addddd) 2013-07-25 00:10:50 +02:00
Klaus Basan
9b2cb3b517 Shifted DBus operators to CBaseStreamStringifier, much easier to provide streaming - especially for derived classes.
Still required but unwanted overloaded DBus operator in aviomodulator.h - no compilation without them. Need to be removed.
Enabled more classes for DBus.
2013-07-24 02:20:32 +02: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
abfd72552b Removed template from basestreamstringifier as discussed in https://dev.vatsim-germany.org/boards/15/topics/497?r=503 2013-05-10 22:56:36 +02: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
7c7ca2dfae Fixed some issues with MinGW gcc, e.g. added some includes, removed nullptr, changed some initializer lists (prevents warnings) 2013-04-29 00:15:32 +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
5f678dfe28 String-ifier for streams as preparation for the GeoClasses 2013-04-12 19:21:50 +02:00
Klaus Basan
42712a2baf Fixed Doxygen comments 2013-04-11 00:28:35 +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
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
Klaus Basan
525910c7a3 Moved PQs from blackcore to blackmisc, added header for namespace, mainpage.dox for Doxygen 2013-03-22 16:07:53 +01:00