Commit Graph

36 Commits

Author SHA1 Message Date
Mathew Sutcliffe
798b198d4e refs #345 Style and doxygen. 2014-11-10 20:42:31 +00:00
Klaus Basan
40b428a315 refs #314, renamed convertFromQVariant, convertFromJson
discussion: https://dev.vatsim-germany.org/issues/314#note-19
2014-08-24 02:47:16 +02:00
Klaus Basan
290abe3693 refs #314, fromQVariant / location of toQVariant
* renamed fromQVariant to convertFromQVariant, the "from" methods imply the object is changed (fromJson, fromString ..)
* implemented fromQVariant - changing the object by QVariant
* moved toQVariant into PQ template
* free function setFromQVariant
2014-08-24 02:47:05 +02:00
Klaus Basan
3fb5087ea8 Renaming, header, Doxygen, formatting (during refs #314) 2014-08-24 02:45:52 +02:00
Klaus Basan
88fb9e8832 refs #192, enable value objects for JSON:
* from/toJson methods
* jsonMembers where applicable
2014-03-26 20:18:42 +01:00
Mathew Sutcliffe
7f92b5dbc9 refs #140 to demonstrate the new tuple framework, adapted five typical value classes to use it 2014-03-07 23:15:57 +01:00
Mathew Sutcliffe
35e0c3e085 refs #91 & #124 using override and \copydoc throughout blackmisc 2014-02-17 16:37:04 +00:00
Mathew Sutcliffe
0a6030f5df refs #92 fixing warnings when compiling for 64bits due to conversions between size_t and int 2014-02-07 22:51:23 +00:00
Klaus Basan
ff5cf5ea4a refs #91 & #124 doxygen fixes, style/comment changes, typos, and override keywords 2014-02-05 23:26:13 +00: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
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
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
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
7117545fd6 Operator function templates, using std::enable_if to match only classes
derived from CStreamable, for streaming to/from QtDBusArgument, avoiding
the unrelated operator function template for streaming Container<T>
defined by Qt, by being a better match in overload resolution.
2013-08-26 21:15:59 +01:00
Mathew Sutcliffe
5f267e8245 minor regularization of vectors and matrices 2013-08-19 17:44:33 +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
2c781e8b36 style fixes: mostly just things that make my eyes bleed :) 2013-08-13 22:29:48 +01:00
Klaus Basan
62591a750f Refactoring, renamed: convertToQString (old: stringForConvert) 2013-07-28 03:31: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
7316980a5c Enabled coordinates for DBus 2013-07-25 12:37:51 +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
7b3174fd96 Merge with MS "private instead of protected in CRTP" changes 2013-05-01 00:51:57 +02:00
Klaus Basan
837809b96d Changed round and renamed length in vector / matrix 2013-05-01 00:00:03 +02:00
Mathew Sutcliffe
e5afc2c627 made derived() private instead of protected in CRTP 2013-04-30 20:12:47 +01:00
Mathew Sutcliffe
a05b85135c replaced "clone" with "derived" in CRTP (more usual, more flexible, more clear in its intent, and avoids copying the object twice on compilers that don't optimise return by value) 2013-04-30 00:09:32 +01:00
Klaus Basan
c97ddc4e3b Polymorphic clone for CRT Pattern in templates (basically a static_cast for concrete initializations of template class) 2013-04-27 17:18:32 +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
8ffa443a69 Revised avionics (stringifier) and matrix operations 2013-04-19 14:36:30 +02:00
Klaus Basan
8121babe77 Initial structure for refactoring, some conversions still missing. Especially required further test cases. 2013-04-19 00:19:41 +02:00
Klaus Basan
5bf308c54b Initial refactoring of vector and matrix classes 2013-04-18 01:04:21 +02:00