Commit graph

22 commits

Author SHA1 Message Date
3b3600379a Library: introduce formating variants for decimal10
showDecimal -> decimal10 (maximal precision to survive round-trip through decimal representation=

showComplete -> max_decimal10 (enough decimal places to capture each possible distinct floating-point value)


Use these new functions to rewrite the format4csv() helper
2024-03-14 17:32:22 +01:00
cc56117574 Chain-Load: integrate topology visualisation (DOT)
- provide as ''operator'' on the TestChainLink instance
- show shortened Node-Hash as label on each Node
2023-11-16 18:42:36 +01:00
f393780845 Lib: fix a bug with diagnostic output
The header "format-cout.hpp" offers a convenience function
to print pretty much any object or data in human readable form.
However, the formatter for pointers used within this framework
switched std::cout into hexadecimal display of numbers and failed
to clean-up this state.

Since the "stickyness" of IOS stream manipulators is generally a problem,
we now provide a RAII helper to capture the previous stream state and
automatically restore it when leaving the scope.
2022-09-27 01:51:21 +02:00
ae10442cf2 some whitespace clean-up 2021-08-20 14:33:21 +02:00
02c5809707 Global-Layer-Renaming: adjust namespace qualification 2018-11-15 23:59:23 +01:00
5a7a5a5720 DOC: fix syntax of some doxygen links
seemingly we really need the \ref in the link target expression
2018-09-21 14:33:12 +02:00
99e3eeca9f Library: formatting of simplified types adjusted
Need to be more careful when eating trailing spaces after a std::string.
Because the full-blown type is a template, sometimes the compiler adds a spurious
additional space behind the closing angle bracket, due to the now obsolete
"maximum munch rule" of C++98 -- to prevent closing angle brackets to become '>>'.
But in other cases, some type adornments or other language identifiers follow the
string type, like e.g. 'const'. In those cases, the trailing space must be retained.

We solve this by a look-ahead assertion in the regular expression:
consume the trailing space _only_ if a non-word character follows (like '>').
2018-09-14 21:06:14 +02:00
5fc85df385 DI: inline into lib::Depend to obsolete InstanceHolder
but now we've got two factory functors.
So there is yet more potential for simplification & refactoring
2018-03-29 16:57:55 +02:00
136e78d023 DockAccess: decide on next steps towards integration (#1126) 2018-02-01 23:08:43 +01:00
0c073ad6e2 fix diagnostic type formatting
...again to make it work with GCC-5,
also to allow more leeway using various compilers

Explanation: we use a helper function to abbreviate the
demangled type names to make diagnostic ouput more readable.
Obviously such a function needs to be adjusted to the
way concrete compilers generate their type output; GCC-5
slightly differs to GCC-4.9 here, so I've made the regular
expressions a bit more flexible
2017-05-02 21:01:41 +02:00
1bebb0ef8d SessionCommand: draft a massive multithreaded stress test 2017-01-14 04:19:58 +01:00
cbe29fead3 Library: allow for pretty-printing of smart-ptr values
- an extension to our custom toString and typeString helpers.
- currently just for shared_ptr and unique_ptr
- might add further overloads for other smart-ptr types
2016-07-31 00:33:26 +02:00
e518a19435 wrap-up(#985): resolve various leftovers
- replace remaining usages of typeid(T).name()
- add another type simplification to handle the STL map allocator
- clean-up usage in lib/format-string
- complete the unit tests
- fix some more bugs
2016-01-10 11:21:34 +01:00
b56f5a8945 type-display(#985): improvements and supplements
- a regexp based function to discard non-identifier chars
- nice human readable display of boolean values
2016-01-10 03:59:01 +01:00
21c02e3015 type-display(#985): implement extractor for simple type designator
using a heuristic approach on a merely lexical level
2016-01-10 02:02:18 +01:00
08c3d5d4c5 type-display(#985): implement better simplification scheme
use a regexp to scan for some known obnoxious prefixes
2016-01-10 00:31:13 +01:00
615f112f5c clean-up(#985): unify various type-indicating helpers
over time, we got quite a jungle with all those
shome-me-the-type-of helper functions.

Reduced and unified all those into
- typeString : a human readable, slightly simplified full type
- typeSymbol : a single word identifier, extracted lexically from the type

note: this changeset causes a lot of tests to break,
since we're using unmangeled type-IDs pretty much everywhere now.
Beore fixing those, I'll have to implement a better simplification
scheme for the "human readable" type names....
2016-01-09 02:05:23 +01:00
99c478768c generic-toString(#985): define streamlined converter
...based on all the clean-up and reorganisation done thus far,
we're now able to rebuild the util::str in a more direct and
sane way, and thus to disentangle the header inclusion problem.
2016-01-08 09:17:58 +01:00
b021a2e769 sharpen the formatting API: take arguments as const always 2016-01-07 20:17:07 +01:00
2cf127e16a formatting(#985): define pretty-printing format for addresses
use a shortened display, showing only the last 4 bytes for diagnostics
since we're typically only interested in spotting "same" and "different",
while the full memory address is irrelevant
2016-01-06 06:24:02 +01:00
60a7e7acb2 formatting-utils(#985): provide some basics
No more fiddling with printf just to show a number reliably!

simple functions to pretty-print addresses,
doubles and floats (fixed-point, with rounding).

Also make all these basic formatting helpers noexcept
2016-01-06 04:04:56 +01:00
0c4495a451 reorganisation(#985): move basic typeString implementation into lib::meta
- simple function to pick up the mangled type
- pretty-printing is implemented in format-obj.cpp
- also move the demangleCxx()-Function to that location,
  it starts to be used for real, outside the test framework
2016-01-05 23:34:53 +01:00