Commit Graph

21 Commits

Author SHA1 Message Date
Klaus Basan
ef21ec67f3 Ref T424, PQ strings without (thousand) separators
* separator can cause issue when sending data (WebService, FSD)
* re-parsing (print and parse again) can cause to undesired results as the separator is mistaken as decimal separator with a different locale
* separator now a parameter so it can still be used
2018-11-06 01:41:48 +01:00
Roland Winklmeier
5e38936fd2 Fix weak vtables 2018-08-25 22:12:06 +02:00
Klaus Basan
787b54108e Ref T261, made Units "static const &"
Remark: Maybe there is a better way than to make both values (Data and the MU itself) static const. If so we should change that.
2018-05-08 16:06:54 +02:00
Klaus Basan
75c481228f Missing include, fixing missing M_PI
Using the little "PI = std::acos(-1);" trick to avoid include issues
2018-05-08 16:06:31 +02:00
Klaus Basan
f936f07c8d Ref T120, PQ units: made final and removed virtual dtor 2017-09-24 19:51:25 +01:00
Mathew Sutcliffe
fd649c0b5c T73 Added virtual final destructors in CMeasurementUnit derived classes.
This fixes the GCC warning "deleting polymorphic object with non-virtual destructor".
They are marked final so the virtual dispatch can be optimized out, because they don't need to be overridden.
2017-05-14 17:21:31 +01:00
Mathew Sutcliffe
c8d78ada65 T73 Flyweight pattern based on pimpl, to reduce CMeasurementUnit memory usage.
* All members of CMeasurementUnit moved into nested pimpl class Data.
* CMeasurementUnit has only one member: a pointer to a const Data.
* Static const CMeasurementUnits replaced with static const Datas.
* Each CMeasurementUnit singleton method returns by-value a CMeasurementUnit containing a pointer to a static const Data.
* Means CMeasurementUnit is trivial to copy because we never copy the pimpl members.
** Works because the available units are fixed at compile time so we never need to create novel units at runtime.
2017-05-14 17:21:23 +01:00
Mathew Sutcliffe
fef2bc528e T73 Enabled for constexpr, to take advantage of constant-initialization.
* CMeasurementUnit and every one of its members is a literal type.
** This requires using QLatin1String instead of QString.
* Every static const CMeasurementUnit is static constexpr.
** This means they are initialized at compile time, no runtime initialization needed.
2017-05-14 17:13:40 +01:00
Mathew Sutcliffe
895190c4d0 T73 Fixed non-threadsafe static initialization. 2017-05-14 15:08:01 +01:00
Mathew Sutcliffe
0ca9fe0a8a refs #837 Abbreviated syntax for specifying a null unit. 2017-01-10 23:44:28 +00:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Mathew Sutcliffe
4bd4baa535 refs #628 Use the metaclass mixins in all value classes. 2016-04-03 18:17:43 +01:00
Mathew Sutcliffe
6f1cf8e3d7 refs #624 Replace typedef with using. 2016-03-22 16:02:50 +00:00
Klaus Basan
c3722f9198 refs #485, refs #584 removed include blackmiscfreefunctions.h 2016-03-18 01:07:49 +00:00
Roland Winklmeier
794bf0cd74 Fix doxygen copydoc documentation
The following issues were fixed
* Fixed wrong/missing namespaces
* Fixed obvious typos in documentation
* Documentation not in sync with source code

refs #544
2016-02-08 01:53:17 +01:00
Mathew Sutcliffe
62418931b0 Removed Mixin::MetaTypeAndQList. 2015-05-31 17:22:24 +01:00
Mathew Sutcliffe
68ebcd7b8d refs #413 Macros to ease the task of disambiguating inherited members when using mixins in an inheritance hierarchy. 2015-05-12 20:37:51 +01:00
Mathew Sutcliffe
36a2e1a2bb refs #413 All value classes which had custom policies shall inherit from mixins instead. 2015-05-12 20:37:50 +01:00
Mathew Sutcliffe
30cc7048ac refs #413 Decomposed dbus-related functions of CValueObject into Mixin::DBusByTuple. 2015-05-12 20:37:31 +01:00
Roland Winklmeier
a089d3641d refs #403 add BlackMisc shared library build 2015-05-05 21:34:19 +02:00
Mathew Sutcliffe
2363fab8c1 refs #396 move Blackmisc PQ classes into subfolder 2015-04-07 19:22:30 +02:00