Commit graph

33 commits

Author SHA1 Message Date
e1dd88970c Library: enable the STL algorithms to work with "Lumiera Forward Iterators"
especially std::find is relevant here.
I consider this only a preliminary solution and need to think it over
more in detail. But, judging from the description given in

http://en.cppreference.com/w/cpp/iterator

and

http://en.cppreference.com/w/cpp/concept/InputIterator

...the standard concept of "input iterator" seems to be closest to our
own concept, albeit it requires things like post increment, and a
reference_type convertible to value_type -- requirements we do not
necessarily support with our more limited "Lumiera Forward Iterator"
2018-02-16 06:48:52 +01:00
9c21164ae6 Doxygen Fixes (#1062)
This changeset fixes a huge pile of problems, as indicated in the
error log of the Doxygen run after merging all the recent Doxygen improvements

unfortunately, auto-linking does still not work at various places.
There is no clear indication what might be the problem.
Possibly the rather unstable Sqlite support in this Doxygen version
is the cause. Anyway, needs to be investigated further.
2017-04-02 04:22:51 +02:00
8e6936d0ad Doxygen: fill in missing file level headlines for the Library 2016-11-08 13:18:05 +01:00
6339a288dd Doxygen: insert actual filename into those automatically added file comments
HOWTO
for F in $(find src -type f \( -name '*.cpp' -or -name '*.hpp' \)  -exec egrep -q '§§§' {} \; -print);
    do D=$(basename $F);
       sed -r -e"s/§§§/$D/" $F ;
done
2016-11-03 18:22:31 +01:00
48e9b7594a Doxygen: identify all files lacking a @file comment
reason is, only files with a @file comment will be processed
with further documentation commands. For this reason, our Doxygen
documentation is lacking a lot of entries.

HOWTO:
find src -type f \( -name '*.cpp' -or -name '*.hpp' \) -not -exec egrep -q '\*.+@file' {} \; -print -exec sed -i -r -e'\_\*/_,$ { 1,+0 a\
\
\
/** @file §§§\
 ** TODO §§§\
 */
}' {} \;
2016-11-03 18:20:10 +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
fc5b59a848 change formatting helper to exploit RTTI (!)
our formatting helper for diagnostics output,
which is primarily used in the unit-tests,
first tries to invoke a custom string conversion.

If that is not possible, it falls back to printing
the demangled type name of the object in question.

With just a minor change we're able to evaluate RTTI here
and print the actual type name, instead of the static
supertype the compiler sees on invocation. We just rely
on the typeid(obj) built-in function.

The only catch is we have to strip the " const*" suffix
(and no, it is not possible to do that on metaprogramming
level, due to the special situation where we have a void*)

This also prompted me to write some util functions for
this often encountered task to check / remove a prefix or suffix
Hopefully I've got those functions correct and safe....
2016-01-02 22:32:42 +01:00
61b6868bff pick up work where I left one month ago
OMG, what was all this about?
OK... this cant possibly work this way.
At least we need to trim after splitting the attributes.
But this is not enough, we want the value, which implies
to make the type flexible (since we cant return a const& to
a substring extracted on-the-fly)
2015-08-17 01:22:01 +02:00
50faff29a9 add a startsWith util function
Boost has a starts_with in the string algorithms lib,
but we do not want to pull that in everywhere.
2015-08-16 01:35:28 +02:00
e35a45a65e tricky header reordering to support a hackish-workaround (#944)
right now we have to defeat an unfortunate static assertion in
the standard library, which is expected to go away in the future.
We use a hack to hijack the problematic definition with the preprocessor,
which requires our header to be first.
2014-08-17 08:03:21 +02:00
2b8ac2d071 render job dummy passes unit test
the basic job and job closure interface is mostly settled now.
We can define and invoke render jobs, and distinguish jobs
through a hash ID
2013-09-07 02:37:17 +02:00
602a04c4b5 factor out fequently used functions for ordinal numbers 2012-12-11 04:07:06 +01:00
22322dfec4 refactor the division/quantisation helpers
...no need to keep them in util.hpp, as they
are used rather occasionally, while util.hpp
is used pervasively.
2012-10-10 05:20:12 +02:00
6b1b6cb805 draft how to integrate parsing of timecode formats 2011-05-15 04:19:27 +02:00
b843546922 cumulated build/release fixes
up to corresponding debian/0.pre.01-3
- compile issue (digxel.hpp)
- SCons missing config dependency on test-only
- 32/64bit fixes
2011-03-31 18:43:50 +02:00
c55260d4e4 generalise to long and int; improve test coverage 2011-01-20 21:30:48 +01:00
af9c799fc8 Fix time quantisation to circumvent the precision problem
required to re-arrange several functions in order
to use the new util::floordiv and to get all relevant
calculations into time.h
2011-01-13 03:36:12 +01:00
71aacc7698 implement an Integer-floor function for time quantisation
Contrary to the built-in division operator, this
function always truncates towards the next smaller
integer (also for negative numbers)
2011-01-13 03:36:11 +01:00
2edaae5c5b simplify util::isnil implementation
doh!
2011-01-13 03:36:10 +01:00
3f1b7651e9 GPL header whitespace 2010-12-17 23:28:49 +01:00
2b46574da3 move the for_each helpers into a separate header
(because util.hpp is used pervasively, and I don't want
<tr1/functional> in such a widely used header...
2009-12-29 04:39:27 +01:00
231278bafe implemented comparison on function erasure, pending test 2009-10-11 05:57:43 +02:00
6a77bebb6a fix type for search in map 2009-10-11 05:57:39 +02:00
7fccecacce WIP using the reverse index to find out the Command-ID
this includes using a Command* as key within a std::map
2009-10-11 05:57:39 +02:00
853aff1228 fixed and stubbed until it passes compiler again 2009-08-02 20:57:04 +02:00
299c316ad4 Fix: containment check should take const args 2009-07-25 19:20:21 +02:00
5f0c9e209e remove any use of boost::function in favour of <tr1/functional>
this resolves some long standing problems with ambiguous placeholders
closes Ticket #161
2009-07-19 05:47:36 +02:00
584878e0f8 yet another variation of managing an object in-place 2009-07-18 22:07:46 +02:00
c48f9086b7 extract util: isSameObject (bare ptr comparison) 2009-07-04 02:43:49 +02:00
294c254f29 Fix instantiation of Tuple datastructs 2009-06-20 23:17:22 +02:00
f1827ea753 WIP: test support macro for exception check 2009-06-07 03:22:08 +02:00
b6fb135398 change error notification at subsystem shutdown to use just a string*
(this allows to memoize the error message and call the termination
handler outside the catch block)
2009-01-10 16:15:17 +01:00
Christian Thaeter
3654473b75 WIP: Merge common into lib
* breaks lumigui linking
 * test non functional yet
 * tools cant not be linked because of cross dependency problems
2008-12-17 17:53:32 +01:00
Renamed from src/common/util.hpp (Browse further)