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.
This is a notable difference to the boost or tr1-function objects
we used up to now. Thus the behavour is now straight forward without
any exception. If the function takes an argument by reference,
this is replicated through bind and function expressions
a real fix would be to rewrite the test to collect the retrieved
values and do a structural verification of the results. This
would mean to write a lot of code for such a marginal topic,
which was implemented just for sake of completenes anyway.
Hopefully my lack of "motivation" doesn't backfire eventually ;-)
Conversion means automatic conversion. In our case,
what we need ist the ability to *construct* a bool from
our (function) object -- while functors aren't automatically
convertible to bool. Thus we use one of the new predicates
from <type_traits>
...uncovered by switching to c++11
When invoking an individual test, we used to erase
the 0-th cmdline argument, which happens to be allways
the name of the test being invoked. Yet none of our
tests actually complied to that contract. Rather,
all tests taking arguments access them by 1-based
argument index. Previously, the argument values just
happened to be still in memory at the original location
after erasing the 0st element.
"Fixed" that by changing the contract. Now, the 0th argument
remains in place, but when there are no additional arguments,
the whole cmdline is cleared.
This is messy, but the test runer needs to be rewritten
entirely, the whole API is clumsy and dangerous. Ticket #289
this is rather a workaround.
The problem is a wraparound while calculating the common denominator in
Time rawTime (dirt + frames*F25);
Currently we're using boost_rational<long>, and long is only 32bit
on 32bit platforms. The workaround commited here just avoids
the calculation of the fractional value, and adds 64bit time values
instead. But the real solution would be to use a consistent
approach for dealing with frame counts and frame rates, all
based on 64bit values. See Ticket #939
This is a partial and preliminary fix; we had an occasional
numeric overflow on 32bit platforms in some tests.
The complete fix will be to introduce a typedef and then
rework the relevant APIs (which are preliminary anyway,
thus no urge right now)
- upgrade the configuration to a current version
- provide a frontpage with cross-links to other documentation
- define a set of modules; relevant classes and files can be
added to these, to create a exploration path for new readers
- fix a lot of errors in documentation comments
- use a custom configuration for the documentation pages
- tweak the navigation, the sections and further arrangements
to make them stand out more prominently, some entity comments
where started with a line of starts. Unfortunately, doxygen
(and javadoc) only recogise comments which are started exactly
with /**
This caused quite some comments to be ignored by doxygen.
Credits to Hendrik Boom for spotting this problem!
A workaround is to end the line of stars with *//**
We don't need this ability and it pushes us into using a
central registry. This solution turned out to be problematic
when loading dynamic libraries (plug-ins).
Clang doesn't allow to declare a private nested class as friend.
This is unfortunate, but likely correct to the letter of the standard.
As a workaround, now we're creating the instances within a static
function of DependencyFactory -- in the end this improves readability
A second issue fixed with this changeset is the scope of the
marker function. Clang is right, this isn't ADL, thus an inline
friend definition is simply not visible outside the class.
lib::Depend<TY> works as drop-in replacement for lib::Singleton<TY>
This changeset removes the convoluted special cases like
SingletonSub and MockInjector.
Clang seems to evaluate the terms of a function call in another order
than GCC -- this uncovered re-entrance errors in some metaprogramming tests,
where we re-used a global formatter object in recursive instantiations.
Compilation with Clang 3.0 (which is available in Debian/stable) fails,
mostly due to some scoping and naming inconsistencies which weren't detected
by GCC. At some instances, Clang seems to have problems to figure out a
perfectly valid type definition; these can be resolved by more explicit
typing (which is preferrable anyway)
using our util::_Fmt front-end helps to reduce the code size,
since all usages rely on a single inclusion of boost::format
including boost::format via header can cause quite some code bloat
NOTE: partial solution, still some further includes to reorganise
...this was quite insidious, but most of the problems
were in the test fixture. Treating the root context
on re-creation is something to be carefull though
While this isn't immediately relevant to the problem at hand,
it looks like a sensible idea to be able to explore
an existing data structure by iterators exposing pointers
(instead of reference wrappers).
Generally speaking, reference wrappers would be preferrable,
but, especially when the data structure relies on STL containers,
the default constructed values for resizing rule out
the standard reference wrapper, which can't be default
constructed. Using a custom variant would be equivalent
to using just a plain pointer (since both can be NULL and can be rebound)
...for the very specific situation when we want
to explore an existing data structure, and the
exploration assumes value semantics.
The workaround then is to use pointers as values.
This test setup is intended to emulate the situation
when adding jobs to the scheduler; thus we should use
an implicit sequence as root element.
I.e. we have to treat a wood, not a single tree
Note: test still fails, since we take a copy
of a Node object somewhere inadvertently
...attempt to build it based on the monadic iterator primitives.
Only problem is: need to find out relation between nodes
after the fact. In the real usage situation, this
is not a problem, since we have a state object
there, which can track the relation as it is established
the buildsystem will now pick up and link
all test cases according to the layer, e.g.
backend tests will automatically be linked
against the backend + library solely.
* tmpbuf got its own implementation files
* Some optimizations on the tmpbuf implementation, handling tiny,
small and huge allocations better.
* tiny allocation smaller than sizeof(void*) are not aligned
* Reduced the ring sizes to 16 (configureable in tmpbuf.h)
This is only the tmpbuf refactoring, fixes following on the next
commits.
test.h introduces a PLANNED_TEST() macro for C code, shows what tests
are provided and so on (the nobug version did that since some time).
test names are now passed as identifers and translated to strings by the
macros.
A lot fixes for existing tests, replace some printfs with ECHO, cosmetics.
one threadpool (sync_many) test is broken and set to PLANNED, this needs
further testsuite support for dispatching output.
add a TEST nobug flag to test.h
* commit '99b5f8':
adapt the Sync template
Add reccondition to threads, make its functionality complete
fix some includes for new mutex/recmutex headers
weed out reccondition bugs/typos
New condition and reccondition implementation
split mutex.h again into mutex.h and recmutex.h
typo fix in mutex.h
rename casing of RecMutex to Recmutex to be consistent
store lumiera_rwlock in sectionlock
store a lumiera_mutex in a sectionlock, looks cleaner
add check to chained locking validating that the parent lock is held
rwlock makeover, locksections etc...
error code changed to LOCK_DESTROY
fix: forgotten backcasts in mutex.h
new mutex and recmutex implementation (breaks sync.hpp for now)
lumiera_error_set() now takes an optional extra string which can be used
to pass context relevant data along. This string gets copied into the
error state so one can easily create it by the tmpbuf_snprintf() facility.
Also a lot of places which define errors get fixed according to this.
Recursive mutex can be locked multiple times by a single thread they
are initialitzed by lumiera_recmutex_init() and used by LUMIERA_RECMUTEX_*
macros.
Chained mutex use the mutexacquirer from the outer scope now. Maybe its
later needed to pass acquirers explicit, we will see.
* 'configloader_devel' of git://git.lumiera.org/lumiera/simeon: (24 commits)
Added directive-parser and tests for a content-check of a parsed configitem
Fixed configitem_move, first parsing tests pass now
FIX: Remove llist_move again and put a note to list_relocate, add test
WIP: add config_lookup skeleton
filedescriptor fixup for new copy func in cuckoo
add a custom copy function to the cuckoo hash
fixes after the cuckoo update in filedescriptor.c
Cuckoo hash update
Added two very simple tests for configitem
Typo fix
Fix for section-parser
added section part to parser
parser improvements, compiles now
added CONFIG_SYNTAX errors
typo fix and redundant comment removal
add configitem and configentry to the build system
give the charsets for config keys some constants
fix to make parser mockup compileable, little simplified
WIP: started low-level parser
more functional mockup of the configitem bootstrap
...
Conflicts:
src/backend/config.c
src/backend/config.h
src/backend/config_lookup.c
src/backend/config_lookup.h
src/backend/configitem.c
src/backend/configitem.h
src/backend/filedescriptor.c
src/lib/cuckoo.c
src/lib/cuckoo.h
tests/22config_highlevel.tests
tests/backend/test-config.c
There was a fatal thinko, llist_relocate NUST NOT be called on a empty
list, the pointers will just point to invaildated memory. This cant be
handled by the llist code. The programmer is responsible to take proper
actions.
There was a fatal thinko, llist_relocate NUST NOT be called on a empty
list, the pointers will just point to invaildated memory. This cant be
handled by the llist code. The programmer is responsible to take proper
actions.
tmpbuf_tr takes an input string and 2 sets of characters plus a
default character. It produces a output string with all
characters from the first set translated to the correspondending
character in the 2nd set, similar to the shell 'tr' util.
uuid's are somewhat standardized, we use our uid's slightly differently,
so change the name not to be confused with standards.
* Small fix for luid generation
* build a 'luidgen' tool which will be used by the interface gen later
* add emacs vars
* include the luidgen tool in automake