From dc10c78a8319df64bb03dfef913c2601486549c0 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 10 Mar 2008 09:28:58 +0100 Subject: [PATCH 01/80] merge Lumiera renaming --- DIR_INFO | 2 +- INSTALL | 4 ++-- LICENSE | 11 ++--------- README | 29 ++++++++++++++++++----------- SConstruct | 30 +++++++++++++++--------------- admin/scons/Buildhelper.py | 8 ++++---- bin/DIR_INFO | 2 +- oldsrc/DIR_INFO | 2 +- src/lib/DIR_INFO | 2 +- src/main.cpp | 14 ++++++++------ src/nobugcfg.h | 6 +++--- src/plugin/helloplugin.c | 4 ++-- src/tool/DIR_INFO | 2 +- src/tool/SConscript | 4 ---- src/tool/hello.c | 4 ++-- tests/test.sh | 2 +- 16 files changed, 62 insertions(+), 64 deletions(-) diff --git a/DIR_INFO b/DIR_INFO index 39fd1850f..f05e9a881 100644 --- a/DIR_INFO +++ b/DIR_INFO @@ -1 +1 @@ -The root dir for the cinelerra3 project +The root dir for the Lumiera project diff --git a/INSTALL b/INSTALL index c6cf3ff92..7983166ec 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -Running / Installing Cinelerra-3 Prototype -========================================== +Running / Installing Lumiera Prototype +====================================== ** to be written ** diff --git a/LICENSE b/LICENSE index b93cee22f..4a684524d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,10 @@ -The Cinelerra source code is (C) by the original authors (see AUTHORS) +The Lumiera source code is (C) by the original authors (see AUTHORS) ======================================================================= -Cinelerra is free software -- you may use and redistribute it under the +Lumiera is free software -- you may use and redistribute it under the Terms and conditions of the GNU GENERAL PUBLIC LICENSE (GPL); either version 2 of the License, or (at your option) any later version. ======================================================================= For a copy of the GPL Version 2 see the file "COPYING" -In addition to the GPL's warranty stipulation, Cinelerra is distributed WITHOUT -GUARANTEED SUPPORT; without even the guarantee of ADDITIONAL LABOR. Support -that is not guaranteed includes technical support, compiler troubleshooting, -debugging, version matching, updating, among other additional labor which -may or may not be required to meet a user's requirements. - - diff --git a/README b/README index 0ab5fe3ae..7913094ee 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ -====================================== -Cinelerra -- the video NLE for Linux -====================================== +==================================== +Lumiera -- the video NLE for Linux +==================================== - Cinelerra is a nonlinear video editing and compositing tool. + Lumiera is a nonlinear video editing and compositing tool. It understands some of the common multimedia formats (quicktime, avi, ogg) and audio/video compression codecs (divx, xvid, mpeg1/2/4, ...) @@ -12,23 +12,30 @@ Cinelerra -- the video NLE for Linux and RGB-float colormodels and the ability to mix media with differing sizes and framerates. +For more information about Lumiera visit http://lumiera.org/ For more information about Cinelerra visit http://cinelerra.org/ ------------------------------- -"Cinelerra-3" prototype code ------------------------------- +---------------------------- +"Lumiera" prototype code +---------------------------- -**This source tree doesn't contain a working video editing application** -Rather, it contains some design studies and prototype code for improving -some aspects of the Cinelerra Application. This work may eventually -evolve into a new major release of Cinelerra. +**This source tree doesn't yet contain a working video editing application** +Rather, it contains the initial framework and core modules of the lower and +middle layer of the envisioned new Application "Lumiera". As of 7/2007, we start here with some backend and render engine modules together with some unit tests. You should find a wiki with detailed design considerations and developer documentation and a UML model (usable with BOUML 2.29) in the sibling directories. +As of 2/2008 the project has been separated completely from his ancestor "Cinelerra" +The Community, which is largely identical to the Cinelerra-CV community, choose the +new project name "Lumiera". The basic project infrastructure is up and running, +and work on the new codebase is going on continuosely. We can show nothing but +a running test suite for now. + + Build Requirements ------------------ diff --git a/SConstruct b/SConstruct index 5dc55580a..4d2f2ee9c 100644 --- a/SConstruct +++ b/SConstruct @@ -1,10 +1,10 @@ # -*- python -*- ## -## SConstruct - SCons based build-sytem for Cinelerra +## SConstruct - SCons based build-sytem for Lumiera ## -# Copyright (C) CinelerraCV -# 2007, Hermann Vosseler +# Copyright (C) Lumiera.org +# 2008, Hermann Vosseler # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -61,7 +61,7 @@ def setupBasicEnvironment(): , SRCDIR=SRCDIR , BINDIR=BINDIR , CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root - , CPPDEFINES=['-DCINELERRA_VERSION='+VERSION ] # note: it's a list to append further defines + , CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CCFLAGS='-Wall ' # -fdiagnostics-show-option ) @@ -134,7 +134,7 @@ def defineCmdlineOptions(): def prepareOptionsHelp(opts,env): prelude = """ USAGE: scons [-c] [OPTS] [key=val [key=val...]] [TARGETS] - Build and optionally install Cinelerra. + Build and optionally install Lumiera. Without specifying any target, just the (re)build target will run. Add -c to the commandline to clean up anything a given target would produce @@ -234,21 +234,21 @@ def defineBuildTargets(env, artifacts): We use a custom function to declare a whole tree of srcfiles. """ - cinobj = ( srcSubtree(env,'$SRCDIR/backend') + lumobj = ( srcSubtree(env,'$SRCDIR/backend') + srcSubtree(env,'$SRCDIR/proc') + srcSubtree(env,'$SRCDIR/common') + srcSubtree(env,'$SRCDIR/lib') ) plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True) - core = env.StaticLibrary('$BINDIR/core.la', cinobj) - #core = cinobj # use this for linking directly + core = env.StaticLibrary('$BINDIR/core.la', lumobj) + #core = lumobj # use this for linking directly # use PCH to speed up building precomp = env.PrecompiledHeader('$SRCDIR/pre') - env.Depends(cinobj, precomp) + env.Depends(lumobj, precomp) - artifacts['cinelerra'] = env.Program('$BINDIR/cinelerra', ['$SRCDIR/main.cpp']+ core ) - artifacts['plugins'] = env.SharedLibrary('$BINDIR/cinelerra-plugin', plugobj) + artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core ) + artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj) # call subdir SConscript(s) for independent components SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts') @@ -264,7 +264,7 @@ def definePostBuildTargets(env, artifacts): il = env.Alias('install-lib', '$DESTDIR/lib') env.Alias('install', [ib, il]) - build = env.Alias('build', artifacts['cinelerra']+artifacts['plugins']) + build = env.Alias('build', artifacts['lumiera']+artifacts['plugins']) allbu = env.Alias('allbuild', build+artifacts['testsuite']) env.Default('build') # additional files to be cleaned when cleaning 'build' @@ -286,11 +286,11 @@ def definePostBuildTargets(env, artifacts): def defineInstallTargets(env, artifacts): """ define some artifacts to be installed into target locations. """ - env.Install(dir = '$DESTDIR/bin', source=artifacts['cinelerra']) + env.Install(dir = '$DESTDIR/bin', source=artifacts['lumiera']) env.Install(dir = '$DESTDIR/lib', source=artifacts['plugins']) env.Install(dir = '$DESTDIR/bin', source=artifacts['tools']) - env.Install(dir = '$DESTDIR/share/doc/cinelerra$VERSION/devel', source=artifacts['doxydoc']) + env.Install(dir = '$DESTDIR/share/doc/lumiera$VERSION/devel', source=artifacts['doxydoc']) ##################################################################### @@ -310,7 +310,7 @@ artifacts = {} # the various things we build. # Each entry actually is a SCons-Node list. # Passing these entries to other builders defines dependencies. -# 'cinelerra' : the App +# 'lumiera' : the App # 'plugins' : plugin shared lib # 'tools' : small tool applications (e.g mpegtoc) # 'src,tar' : source tree as tarball (without doc) diff --git a/admin/scons/Buildhelper.py b/admin/scons/Buildhelper.py index 419de6e68..ae3f5fb1f 100644 --- a/admin/scons/Buildhelper.py +++ b/admin/scons/Buildhelper.py @@ -3,8 +3,8 @@ ## Buildhelper.py - helpers, custom builders, for SConstruct ## -# Copyright (C) CinelerraCV -# 2007, Hermann Vosseler +# Copyright (C) Lumiera.org +# 2008, Hermann Vosseler # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -123,8 +123,8 @@ def Tarball(env,location,dirs,suffix=''): """ targetID = '../extern-tar%s' % suffix versionID = env['VERSION'] - defaultName = 'cinelerra%s_%s' % (suffix, versionID) - nameprefix = 'cinelerra-%s/' % (versionID) + defaultName = 'lumiera%s_%s' % (suffix, versionID) + nameprefix = 'lumiera-%s/' % (versionID) location = env.subst(location) dirs = env.subst(dirs) return env.Command(targetID,None, createTarball, diff --git a/bin/DIR_INFO b/bin/DIR_INFO index c9048f8c1..9dafe61c3 100644 --- a/bin/DIR_INFO +++ b/bin/DIR_INFO @@ -1 +1 @@ -cinelerra executable(s) and libraries will be built here +Lumiera executable(s) and libraries will be built here diff --git a/oldsrc/DIR_INFO b/oldsrc/DIR_INFO index 666124344..e3f9d5b47 100644 --- a/oldsrc/DIR_INFO +++ b/oldsrc/DIR_INFO @@ -1 +1 @@ -cinelerra2 sources, added per case when needed +Cinelerra2 sources, added per case when needed diff --git a/src/lib/DIR_INFO b/src/lib/DIR_INFO index 1bc5bfed3..6946a8b7e 100644 --- a/src/lib/DIR_INFO +++ b/src/lib/DIR_INFO @@ -1,2 +1,2 @@ -cinelerra support library +Lumiera support library This dir contains the code for some tools and library code which will be used in many places diff --git a/src/main.cpp b/src/main.cpp index 18384f0c7..398cdc3df 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,8 @@ /* - main.cpp - start the Cinelerra Application + main.cpp - start the Lumiera Application - Copyright (C) CinelerraCV - 2007, Christian Thaeter + Copyright (C) Lumiera.org + 2008, Christian Thaeter Hermann Vosseler This program is free software; you can redistribute it and/or @@ -23,14 +23,16 @@ #include +#include "lumiera.h" + using std::cout; using std::endl; +using lumiera::Appconfig; int main (int argc, char* argv[]) { - cout << "*** Cinelerra NLE for Linux ***" << endl - << " hello SCONS build system" << endl; + cout << "*** Lumiera NLE for Linux ***" << endl + << " Version: " << Appconfig::get("version") << endl; return 0; } - diff --git a/src/nobugcfg.h b/src/nobugcfg.h index 7907d50a1..916f28663 100644 --- a/src/nobugcfg.h +++ b/src/nobugcfg.h @@ -2,8 +2,8 @@ NOBUGCFG.h - global configuration and definitions for NoBug - Copyright (C) CinelerraCV - 2007, Christian Thaeter + Copyright (C) Lumiera.org + 2008, Christian Thaeter Hermann Vosseler This program is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ ** The idea is that configuration and some globally used flag ** declarations are to be kept in one central location. Normally, ** this header will be included by appconfig.hpp, which in turn gets - ** included by cinelerra.h + ** included by lumiera.h ** @par Besides the usual guarded declarations, this header contains ** one section with the corresponding definitions. This section ** is to be called by appconfig.cpp only, which deals with application diff --git a/src/plugin/helloplugin.c b/src/plugin/helloplugin.c index 62a033f4e..d75f55f94 100644 --- a/src/plugin/helloplugin.c +++ b/src/plugin/helloplugin.c @@ -1,12 +1,12 @@ /* * hello.c - demonstrates how to build a standalone tool (C source) - * integrated into the SCons based build system of Cinelerra + * integrated into the SCons based build system of Lumiera */ #include int main(int argc, char* argv[]) { - printf("hello cinelerra world"); + printf("hello lumiera world"); return 0; } diff --git a/src/tool/DIR_INFO b/src/tool/DIR_INFO index 76e84db53..c8933be3e 100644 --- a/src/tool/DIR_INFO +++ b/src/tool/DIR_INFO @@ -1 +1 @@ -source code of supplementary tools to be built alongside with Cinelerra +source code of supplementary tools to be built alongside with Lumiera diff --git a/src/tool/SConscript b/src/tool/SConscript index fe3a35dcc..738483498 100644 --- a/src/tool/SConscript +++ b/src/tool/SConscript @@ -5,10 +5,6 @@ Import('env','artifacts') -# at the moment (8/07), Ichthyo tries to find out how to configure NoBug -# does it help, if we set the NOBUG_LOG to the environment used for building?? -env = env.Clone() -env['ENV']['NOBUG_LOG'] = 'ttt:WARNING' # build the ubiquitous Hello World application (note: C source) artifacts['tools'] = [ env.Program('#$BINDIR/hello-world','hello.c') diff --git a/src/tool/hello.c b/src/tool/hello.c index 62a033f4e..d75f55f94 100644 --- a/src/tool/hello.c +++ b/src/tool/hello.c @@ -1,12 +1,12 @@ /* * hello.c - demonstrates how to build a standalone tool (C source) - * integrated into the SCons based build system of Cinelerra + * integrated into the SCons based build system of Lumiera */ #include int main(int argc, char* argv[]) { - printf("hello cinelerra world"); + printf("hello lumiera world"); return 0; } diff --git a/tests/test.sh b/tests/test.sh index 1e4256eb2..b692b3959 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) CinelerraCV +# Copyright (C) Lumiera.org # 2007, Christian Thaeter # Hermann Vosseler # From bfa4b2bc70d49405f8da98a67ef409f1f0a287df Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 05:01:56 +0200 Subject: [PATCH 02/80] (irrelevant) adjustments to make the SCons build of the nonexistant source happen --- SConstruct | 1 - src/main.cpp | 10 ++-------- src/proc/lumiera.hpp | 5 +---- src/proc/nobugcfg.hpp | 4 +--- tests/00test.tests | 11 +++++++++++ tests/SConscript | 8 ++++---- tests/bugs/buggy.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 tests/bugs/buggy.cpp diff --git a/SConstruct b/SConstruct index cef5ebda0..b76e0101e 100644 --- a/SConstruct +++ b/SConstruct @@ -247,7 +247,6 @@ def defineBuildTargets(env, artifacts): # use PCH to speed up building precomp = ( env.PrecompiledHeader('$SRCDIR/pre') - + env.PrecompiledHeader('$SRCDIR/pre_a') ) env.Depends(objproc, precomp) env.Depends(objlib, precomp) diff --git a/src/main.cpp b/src/main.cpp index 0e04ef89f..ffa3957f9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,21 +26,15 @@ #include "proc/lumiera.hpp" using std::cout; -using std::endl; -using lumiera::Appconfig; -using lumiera::ON_GLOBAL_INIT; -using lumiera::ON_GLOBAL_SHUTDOWN; int main (int argc, char* argv[]) { - cout << "*** Lumiera NLE for Linux ***" << endl - << " Version: " << Appconfig::get("version") << "\n"; + cout << "*** Lumiera NLE for Linux ***" << "\n" + << " Version: quasi niente" << "\n"; - Appconfig::lifecycle (ON_GLOBAL_INIT); // great things are happening here.... - Appconfig::lifecycle (ON_GLOBAL_SHUTDOWN); return 0; } diff --git a/src/proc/lumiera.hpp b/src/proc/lumiera.hpp index b56ab69b6..f67ec719b 100644 --- a/src/proc/lumiera.hpp +++ b/src/proc/lumiera.hpp @@ -30,10 +30,7 @@ /* common types frequently used... */ -#include "common/util.hpp" -#include "common/time.hpp" -#include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp -#include "lib/appconfig.hpp" +#include "proc/nobugcfg.hpp" namespace lumiera diff --git a/src/proc/nobugcfg.hpp b/src/proc/nobugcfg.hpp index 567838320..aa9411471 100644 --- a/src/proc/nobugcfg.hpp +++ b/src/proc/nobugcfg.hpp @@ -45,8 +45,6 @@ #include #include -#include "lib/appconfig.hpp" -#include "common/error.hpp" ///< make assertions throw instead of abort() /* declare flags used throughout the code base... */ @@ -61,7 +59,7 @@ namespace lumiera { void initialize_NoBug (); namespace { - LifecycleHook schedule_ (ON_BASIC_INIT, &initialize_NoBug); +// LifecycleHook schedule_ (ON_BASIC_INIT, &initialize_NoBug); } } #endif /*NOBUGCFG_H ======= (End) Part 1: DECLARATIONS ======== */ diff --git a/tests/00test.tests b/tests/00test.tests index 4d8781629..60b4b26d1 100644 --- a/tests/00test.tests +++ b/tests/00test.tests @@ -11,3 +11,14 @@ err: /bin/cat: ,nonexistent_file: No such file or directory return: 1 END + +TESTING "Run the Dummy Test Executable" ./test-bugs + +TEST "I am a dummy test" < + Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + + +#include + +#include "proc/lumiera.hpp" + +using std::cout; + + +int main (int argc, char* argv[]) +{ + cout << "*** Lumiera NLE for Linux ***" << "\n" + << " This is a dummy test" << "\n"; + + + // great things are happening here.... + + return 2; +} From 50f8be0e161d7b6fe839692ee2801590305da19d Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 05:20:22 +0200 Subject: [PATCH 03/80] merge after integrating backend/library work --- SConstruct | 3 ++- admin/vgsuppression.c | 1 - tests/00test.tests | 1 + tests/SConscript | 6 ++++- tests/test.h | 52 +++++++++++++++++++++++++++++++++++++++++++ tests/test.sh | 3 +-- 6 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 tests/test.h diff --git a/SConstruct b/SConstruct index b76e0101e..8434b0a98 100644 --- a/SConstruct +++ b/SConstruct @@ -33,7 +33,7 @@ CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'bin' TESTDIR = 'tests' -VERSION = '3+alpha.01' +VERSION = '0.1+pre.01' #-----------------------------------Configuration # NOTE: scons -h for help. @@ -68,6 +68,7 @@ def setupBasicEnvironment(): RegisterPrecompiledHeader_Builder(env) handleNoBugSwitches(env) + env.Append(CPPDEFINES = '_GNU_SOURCE') appendCppDefine(env,'DEBUG','DEBUG', 'NDEBUG') appendCppDefine(env,'OPENGL','USE_OPENGL') appendVal(env,'ARCHFLAGS', 'CCFLAGS') # for both C and C++ diff --git a/admin/vgsuppression.c b/admin/vgsuppression.c index 0e1f41fca..cad026e52 100644 --- a/admin/vgsuppression.c +++ b/admin/vgsuppression.c @@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define _GNU_SOURCE /* just place any problematic calls where valgrind whines about in main (with comments please) diff --git a/tests/00test.tests b/tests/00test.tests index 60b4b26d1..d1205b8c1 100644 --- a/tests/00test.tests +++ b/tests/00test.tests @@ -22,3 +22,4 @@ END PLANNED "this may never happen" END + diff --git a/tests/SConscript b/tests/SConscript index 44d34e047..5a7c0145d 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -9,6 +9,10 @@ from Buildhelper import globRootdirs Import('env','artifacts','core') +# temp fix to add test.h -- wouldn't it be better to put this header be into src/lib ? +env = env.Clone() +env.Append(CPPPATH='#/.') # add Rootdir to Includepath, so test/test.h is found +# temp fix------------- def testExecutable(env,tree, exeName=None, obj=None): """ declare all targets needed to create a standalone @@ -52,7 +56,7 @@ def treatPluginTestcase(env): moduledirs = globRootdirs('*') # but have to treat some subdirs individually. -specials = ['plugin','locking','library'] +specials = ['plugin','locking','library','backend'] diff --git a/tests/test.h b/tests/test.h new file mode 100644 index 000000000..d25fa0a59 --- /dev/null +++ b/tests/test.h @@ -0,0 +1,52 @@ +/* + test.h - macros for running tests + + Copyright (C) CinelerraCV + 2008, Christian Thaeter + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef TEST_H +#define TEST_H + +#include + +#include "lib/error.h" + +LUMIERA_ERROR_DEFINE (TEST, "test error"); + +#define TESTS_BEGIN \ +int \ +main (int argc, char** argv) \ +{ \ + NOBUG_INIT; \ + \ + if (argc == 1) \ + return 1; + +#define TEST(name) \ + else if (!strcmp(argv[1], name)) + + +#define TESTS_END \ + else \ + return 1; \ + \ + return 0; \ +} + + +#endif diff --git a/tests/test.sh b/tests/test.sh index 77bac66bf..d919ed073 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,7 +1,6 @@ #!/bin/bash # Copyright (C) Lumiera.org -# 2007, Christian Thaeter -# Hermann Vosseler +# 2007 - 2008, Christian Thaeter # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as From 7a6b987a5032fb2c96c1b2182212e1ead79cf175 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 05:35:48 +0200 Subject: [PATCH 04/80] merge after integrating the GUI draft; now using multiple build environments and check via pkg-config --- .gitignore | 2 +- SConstruct | 86 ++++++++++++---- admin/scons/Buildhelper.py | 16 ++- admin/scons/LumieraEnvironment.py | 97 ++++++++++++++++++ src/gui/lumiera_ui.rc | 157 ++++++++++++++++++++++++++++++ 5 files changed, 334 insertions(+), 24 deletions(-) create mode 100644 admin/scons/LumieraEnvironment.py create mode 100644 src/gui/lumiera_ui.rc diff --git a/.gitignore b/.gitignore index 5dc912d9e..10dbaee23 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ *.os *.gch ,valgrind.log* -Buildhelper.pyc +admin/scons/*.pyc optcache Makefile.in build/* diff --git a/SConstruct b/SConstruct index 8434b0a98..173803853 100644 --- a/SConstruct +++ b/SConstruct @@ -26,6 +26,8 @@ sys.path.append("./admin/scons") import os from Buildhelper import * +from LumieraEnvironment import * + #-----------------------------------Configuration OPTIONSCACHEFILE = 'optcache' @@ -33,6 +35,7 @@ CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'bin' TESTDIR = 'tests' +ICONDIR = 'icons' VERSION = '0.1+pre.01' #-----------------------------------Configuration @@ -53,13 +56,13 @@ def setupBasicEnvironment(): EnsureSConsVersion(0,96,90) opts = defineCmdlineOptions() - - env = Environment(options=opts) - + env = LumieraEnvironment(options=opts) + env.Append ( CCCOM=' -std=gnu99') # workaround for a bug: CCCOM currently doesn't honor CFLAGS, only CCFLAGS env.Replace( VERSION=VERSION , SRCDIR=SRCDIR , BINDIR=BINDIR + , ICONDIR=ICONDIR , CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root , CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CCFLAGS='-Wall ' # -fdiagnostics-show-option @@ -74,7 +77,7 @@ def setupBasicEnvironment(): appendVal(env,'ARCHFLAGS', 'CCFLAGS') # for both C and C++ appendVal(env,'OPTIMIZE', 'CCFLAGS', val=' -O3') appendVal(env,'DEBUG', 'CCFLAGS', val=' -ggdb') - + prepareOptionsHelp(opts,env) opts.Save(OPTIONSCACHEFILE, env) return env @@ -127,7 +130,7 @@ def defineCmdlineOptions(): ,PathOption('SRCTAR', 'Create source tarball prior to compiling', '..', PathOption.PathAccept) ,PathOption('DOCTAR', 'Create tarball with dev documentaionl', '..', PathOption.PathAccept) ) - + return opts @@ -161,38 +164,42 @@ def configurePlatform(env): setup platform specific options. Abort build in case of failure. """ - conf = Configure(env) - # run all configuration checks in the current env + conf = env.Configure() + # run all configuration checks in the given env + + # Perform checks for prerequisites -------------------------------------------- + if not conf.TryAction('pkg-config --version > $TARGET')[0]: + print 'We need pkg-config for including library configurations, exiting.' + Exit(1) - # Checks for prerequisites ------------ if not conf.CheckLibWithHeader('m', 'math.h','C'): print 'Did not find math.h / libm, exiting.' Exit(1) - + if not conf.CheckLibWithHeader('dl', 'dlfcn.h', 'C'): print 'Functions for runtime dynamic loading not available, exiting.' Exit(1) - + if not conf.CheckLibWithHeader('nobugmt', 'nobug.h', 'C'): print 'Did not find NoBug [http://www.pipapo.org/pipawiki/NoBug], exiting.' Exit(1) - + if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'C'): print 'Did not find the pthread lib or pthread.h, exiting.' else: conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD') conf.env.Append(CCFLAGS = ' -pthread') - + if conf.CheckCHeader('execinfo.h'): conf.env.Append(CPPFLAGS = ' -DHAS_EXECINFO_H') - + if conf.CheckCHeader('valgrind/valgrind.h'): conf.env.Append(CPPFLAGS = ' -DHAS_VALGRIND_VALGIND_H') if not conf.CheckCXXHeader('tr1/memory'): print 'We rely on the std::tr1 proposed standard extension for shared_ptr.' Exit(1) - + if not conf.CheckCXXHeader('boost/config.hpp'): print 'We need the C++ boost-lib.' Exit(1) @@ -206,8 +213,36 @@ def configurePlatform(env): if not conf.CheckLibWithHeader('boost_regex-mt','boost/regex.hpp','C++'): print 'We need the boost regular expression lib (incl. binary lib for linking).' Exit(1) - - + +# if not conf.CheckLibWithHeader('gavl', ['gavlconfig.h', 'gavl/gavl.h'], 'C'): + + if not conf.CheckPkgConfig('gavl', 1.0): + print 'Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html], exiting.' + Exit(1) + else: + conf.env.mergeConf('gavl') + + if not conf.CheckPkgConfig('gtkmm-2.4', 2.8): + print 'Unable to configure GTK--, exiting.' + Exit(1) + + if not conf.CheckPkgConfig('cairomm-1.0', 0.6): + print 'Unable to configure Cairo--, exiting.' + Exit(1) + + if not conf.CheckPkgConfig('gdl-1.0', '0.6.1'): + print 'Unable to configure the GNOME DevTool Library, exiting.' + Exit(1) + + if not conf.CheckPkgConfig('xv'): Exit(1) +# if not conf.CheckPkgConfig('xext'): Exit(1) +# if not conf.CheckPkgConfig('sm'): Exit(1) +# +# obviously not needed? + + print "** Gathered Library Info: %s" % conf.env.libInfo.keys() + + # create new env containing the finished configuration return conf.Finish() @@ -221,7 +256,7 @@ def definePackagingTargets(env, artifacts): artifacts['src.tar'] = t env.Alias('src.tar', t) env.Alias('tar', t) - + t = Tarball(env,location='$DOCTAR',suffix='-doc',dirs='admin doc wiki uml tests') artifacts['doc.tar'] = t env.Alias('doc.tar', t) @@ -240,7 +275,7 @@ def defineBuildTargets(env, artifacts): objlib = ( srcSubtree(env,'$SRCDIR/common') + srcSubtree(env,'$SRCDIR/lib') ) - plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True) + objplug = srcSubtree(env,'$SRCDIR/plugin', isShared=True) core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback) + env.StaticLibrary('$BINDIR/lumiproc.la', objproc) + env.StaticLibrary('$BINDIR/lumi.la', objlib) @@ -253,7 +288,16 @@ def defineBuildTargets(env, artifacts): env.Depends(objlib, precomp) artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core ) - artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj) + artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', objplug) + + # the Lumiera GTK GUI + envgtk = env.Clone().mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','xv','xext','sm']) + objgui = srcSubtree(envgtk,'$SRCDIR/gui') + + artifacts['lumigui'] = ( envgtk.Program('$BINDIR/lumigui', objgui + core) + + env.Install('$BINDIR', env.Glob('$ICONDIR/*.png')) + + env.Install('$BINDIR', env.Glob('$SRCDIR/gui/*.rc')) + ) # call subdir SConscript(s) for independent components SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core') @@ -269,13 +313,13 @@ def definePostBuildTargets(env, artifacts): il = env.Alias('install-lib', '$DESTDIR/lib') env.Alias('install', [ib, il]) - build = env.Alias('build', artifacts['lumiera']+artifacts['plugins']+artifacts['tools']) + build = env.Alias('build', artifacts['lumiera']+artifacts['lumigui']+artifacts['plugins']+artifacts['tools']) allbu = env.Alias('allbuild', build+artifacts['testsuite']) env.Default('build') # additional files to be cleaned when cleaning 'build' env.Clean ('build', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log' ]) env.Clean ('build', [ '$SRCDIR/pre.gch' ]) - + # Doxygen documentation # Note: at the moment we only depend on Doxyfile # obviousely, we should depend on all sourcefiles diff --git a/admin/scons/Buildhelper.py b/admin/scons/Buildhelper.py index ae3f5fb1f..02f17b2b4 100644 --- a/admin/scons/Buildhelper.py +++ b/admin/scons/Buildhelper.py @@ -90,6 +90,18 @@ def globRootdirs(roots): +def filterNodes(nlist, removeName=None): + """ filter out scons build nodes using the given criteria. + removeName: if set, remove all nodes with this srcname + """ + if removeName: + predicate = lambda n : not fnmatch.fnmatch(os.path.basename(str(n[0])), removeName) + else: + predicate = lambda n : True; + + return filter(predicate, nlist) + + def RegisterPrecompiledHeader_Builder(env): """ Registeres an Custom Builder for generating a precompiled Header. Note you should define a dependency to the PCH file @@ -111,7 +123,7 @@ def RegisterPrecompiledHeader_Builder(env): def Tarball(env,location,dirs,suffix=''): """ Custom Command: create Tarball of some subdirs - location: where to create the tar (optionally incl. filename.tar.gz) + location: where to create the tar (may optionally include filename.tar.gz) suffix: (optional) suffix to include in the tar name dirs: directories to include in the tar @@ -132,7 +144,7 @@ def Tarball(env,location,dirs,suffix=''): def createTarball(target,source,env): - """ helper, builds the tar using the python2.3 tarfil lib. + """ helper, builds the tar using the python2.3 tarfile lib. This allows us to prefix all paths, thus moving the tree into a virtual subdirectory containing the Version number, as needed by common packaging systems. diff --git a/admin/scons/LumieraEnvironment.py b/admin/scons/LumieraEnvironment.py new file mode 100644 index 000000000..82d419a65 --- /dev/null +++ b/admin/scons/LumieraEnvironment.py @@ -0,0 +1,97 @@ +# -*- python -*- +## +## LumieraEnvironment.py - custom SCons Environment +## + +# Copyright (C) Lumiera.org +# 2008, Hermann Vosseler +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +##################################################################### + + +from SCons.SConf import SConf +from SCons.Environment import Environment + +from Buildhelper import * + + + +class LumieraEnvironment(Environment): + """ Custom SCons build environment for Lumiera + This allows us to carry structured config data without + using global vars. Idea inspired by Ardour. + """ + def __init__(self,*args,**kw): + Environment.__init__ (self,*args,**kw) + self.libInfo = {} + + def Configure (self, *args, **kw): + kw['env'] = self + return apply(LumieraConfigContext, args, kw) + + def mergeConf (self,other): + """ extract the library/compiler flags from other Environment. + Optionally accepts a list or just sting(s) representing keys + in our own libInfo Dictionary + """ + if isinstance(other, list): + for elm in other: + self.mergeConf(elm) + elif isinstance(other, str): + if other in self.libInfo: + self.mergeConf(self.libInfo[other]) + else: + self.Append (LIBS = other.get ('LIBS',[])) + self.Append (LIBPATH = other.get ('LIBPATH', [])) + self.Append (CPPPATH = other.get('CPPPATH', [])) + self.Append (LINKFLAGS = other.get('LINKFLAGS', [])) + + return self + + + def addLibInfo (self, libID, minVersion=0): + """ use pkg-config to create an Environment describing the lib. + Don't add this defs to the current Environment, rather store + them in the libInfo Dictionary. + """ + minVersion = str(minVersion) + if 0 != os.system('pkg-config --print-errors --exists "%s >= %s"' % (libID,minVersion)): + print "Problems configuring the Library %s (>= %s)" % (libID,minVersion) + return False + + self.libInfo[libID] = libInfo = LumieraEnvironment() + libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID ) + return libInfo + + def Glob (self, pattern): + """ temporary workaround; newer versions of SCons provide this as a global function + """ + pattern = self.subst(pattern) + return glob.glob(pattern) + + +class LumieraConfigContext(SConf): + """ Extends the SCons Configure context with some convenience methods + """ + def __init__(self, *args,**kw): + SConf.__init__(self,*args,**kw) + + def CheckPkgConfig (self, libID, minVersion=0): + print "Checking for library configuration: %s " % libID + # self.Message(self,"Checking for library configuration: %s " % libID) + return self.env.addLibInfo (libID, minVersion) + + diff --git a/src/gui/lumiera_ui.rc b/src/gui/lumiera_ui.rc new file mode 100644 index 000000000..428b7bed4 --- /dev/null +++ b/src/gui/lumiera_ui.rc @@ -0,0 +1,157 @@ +# +# This is the GTK style file for Lumiera +# +# + +#---------- Styles for Standard Widgets ----------# + +style "medium_text" +{ + font_name = "sans 10" +} + +style "medium_bold_entry" = "medium_text" +{ + fg[NORMAL] = { 0.70, 0.70, 0.70 } + fg[ACTIVE] = { 0.70, 0.70, 0.70 } + + bg[NORMAL] = { 0.35, 0.35, 0.40 } + + base[NORMAL] = { 0, 0, 0 } + base[ACTIVE] = { 0, 0, 0 } + base[SELECTED] = { 0, 0, 0 } +} + +style "default_base" = "medium_text" +{ + GtkWidget::cursor_color = {1.0, 1.0, 1.0 } + GtkButton::default_border = { 0, 0, 0, 0 } + GtkButton::default_outside_border = { 0, 0, 0, 0 } + GtkTreeView::vertical-padding = 0 + GtkTreeView::horizontal-padding = 0 + GtkTreeView::even-row-color = { 0, 0, 0 } + GtkTreeView::odd-row-color = { 0, 0, 0 } + + fg[NORMAL] = { 0.80, 0.80, 0.80 } + fg[ACTIVE] = { 0.80, 0.80, 0.80 } + fg[PRELIGHT] = { 1.0, 1.0, 1.0 } + fg[INSENSITIVE] = { 0.80, 0.80, 0.80 } + fg[SELECTED] = { 0.80, 0.80, 0.80 } + + bg[NORMAL] = { 0.35, 0.35, 0.40 } + bg[ACTIVE] = { 0.35, 0.35, 0.40 } + bg[PRELIGHT] = "#565690" + bg[INSENSITIVE] = { 0.10, 0.10, 0.10 } + bg[SELECTED] = { 0, 0.40, 0.60 } + + text[NORMAL] = { 0.80, 0.80, 0.80 } + text[ACTIVE] = { 0.80, 0.80, 0.80 } + text[PRELIGHT] = { 0.80, 0.80, 0.80 } + text[INSENSITIVE] = { 0.80, 0.80, 0.80} + text[SELECTED] = { 1.0, 1.0, 1.0 } + + base[ACTIVE] = "#272a2f" + base[NORMAL] = "#1a1e20" + base[PRELIGHT] = { 0.20, 0.20, 0.20 } + base[INSENSITIVE] = "#4c5159" + base[SELECTED] = { 0.25, 0.25, 0.25 } + + engine "clearlooks" + { + menubarstyle = 2 # 0 = flat, 1 = sunken, 2 = flat gradient +# menuitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button) +# listviewitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient) +# progressbarstyle = 1 # 0 = candy bar, 1 = fancy candy bar, 2 = flat + } +} + +style "default_buttons_menus" +{ + font_name = "sans 10" + fg[ACTIVE] = { 1.0, 1.0, 1.0 } + + bg[NORMAL] = { 0.30, 0.30, 0.35 } + bg[ACTIVE] = "#565690" + bg[PRELIGHT] = { 0.15, 0.15, 0.20 } + bg[INSENSITIVE] = { 0.15, 0.15, 0.20 } + bg[SELECTED] = { 0.15, 0.15, 0.20 } +} + +style "lumiera_adjusters" = "default_buttons_menus" +{ + fg[NORMAL] = { 0.80, 0.80, 0.80 } + fg[ACTIVE] = { 0.80, 0.80, 0.80 } + fg[PRELIGHT] = { 1.0, 1.0, 1.0 } + fg[INSENSITIVE] = { 0.80, 0.80, 0.80 } + fg[SELECTED] = { 0.80, 0.80, 0.80 } + + bg[NORMAL] = { 0.35, 0.35, 0.40 } + bg[ACTIVE] = { 0.35, 0.35, 0.40 } + bg[PRELIGHT] = "#565690" + bg[INSENSITIVE] = { 0.10, 0.10, 0.10 } + bg[SELECTED] = { 0, 0.40, 0.60 } +} + +style "lumiera_progressbars" = "default_buttons_menus" +{ + bg[NORMAL] = { 0, 0, 0 } + bg[PRELIGHT] = { 0.00, 0.36, 0.40 } +} + +style "lumiera_button" = "default_buttons_menus" +{ + xthickness = 1 + ythickness = 1 +} + +style "tearoff_arrow" = "medium_bold_entry" +{ + fg[NORMAL] = { 0.80, 0.80, 0.80 } + fg[PRELIGHT] = { 0.80, 0.80, 0.80 } + bg[NORMAL] = { 0.80, 0.80, 0.80 } + bg[PRELIGHT] = { 0.80, 0.80, 0.80 } +} + +class "GtkWidget" style:highest "default_base" +class "GtkScrollbar" style:highest "lumiera_adjusters" +class "GtkLabel" style:highest "default_buttons_menus" +class "GtkButton" style:highest "lumiera_button" +class "GtkArrow" style:highest "tearoff_arrow" +class "GtkProgressBar" style:highest "lumiera_progressbars" + +#---------- Styles for Lumiera Widgets ----------# + +style "timeline_body" +{ + gtkmm__CustomObject_TimelineBody::background = "#7E838B" +} + +style "timeline_ruler" = "default_base" +{ + font_name = "sans 8" + gtkmm__CustomObject_TimelineRuler::height = 18 + gtkmm__CustomObject_TimelineRuler::major_tick_height = 18 + gtkmm__CustomObject_TimelineRuler::minor_long_tick_height = 6 + gtkmm__CustomObject_TimelineRuler::minor_short_tick_height = 3 + gtkmm__CustomObject_TimelineRuler::annotation_horz_margin = 3 + gtkmm__CustomObject_TimelineRuler::annotation_vert_margin = 0 + gtkmm__CustomObject_TimelineRuler::min_division_width = 100 + gtkmm__CustomObject_TimelineRuler::mouse_chevron_size = 5 +} + +style "timeline_header_base" = "default_base" +{ +# fg[NORMAL] = { 0.77, 0.77, 0.72 } +# bg[NORMAL] = { 0.18, 0.19, 0.22 } +# bg[ACTIVE] = { 0.20, 0.20, 0.20 } +# bg[PRELIGHT] = { 0.20, 0.20, 0.20 } +# bg[INSENSITIVE] = { 0.20, 0.20, 0.20 } +# bg[SELECTED] = { 0.20, 0.20, 0.20 } +} + +class "gtkmm__CustomObject_TimelineBody" style:highest "timeline_body" +class "gtkmm__CustomObject_TimelineRuler" style:highest "timeline_ruler" + +widget "*TimelineHeaderBaseUnselected" style:highest "timeline_header_base" + + From 2dab8cfe6e3117c5141cd3b174037968027878df Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 19:40:11 +0200 Subject: [PATCH 05/80] WIP adapt the nodeoperation to this (possible) solution --- src/proc/engine/nodeoperation.hpp | 200 +++++++++++++++++++-------- src/proc/engine/nodewiringconfig.hpp | 61 ++++---- src/proc/engine/procnode.hpp | 6 +- 3 files changed, 180 insertions(+), 87 deletions(-) diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp index 8f3711dc8..2cd5eb09d 100644 --- a/src/proc/engine/nodeoperation.hpp +++ b/src/proc/engine/nodeoperation.hpp @@ -63,16 +63,6 @@ namespace engine { - /** - * (abstract) base class of all concrete StateAdapter types. - * Defines the skeleton for the node operation/calculation - */ - class InvocationStateBase - : public State - { - - }; - /** * Adapter to shield the ProcNode from the actual buffer management, * allowing the processing function within ProcNode to use logical @@ -80,15 +70,28 @@ namespace engine { * call, using setup/wiring data preconfigured by the builder. * Its job is to provide the actual implementation of the Cache * push / fetch and recursive downcall to render the source frames. + * + * \par assembling the implementation + * This is the abstract base class of all concrete StateAdapter types. + * Each ProcNode#pull() call creates such a StateAdapter on the stack, + * with a concrete type according to the WiringDescriptor of the node + * to pull. The concrete type is assembled by a chain of policy templates + * on top of InvocationStateBase. For each of the possible configuratons + * we define such a chain (see bottom of this header). The WiringFactory + * defined in nodewiring.cpp actually drives the instantiation of all + * those possible combinations */ - class StateAdapter + class InvocationStateBase : public State { - State& parent_; - State& current_; WiringDescriptor const& wiring_; protected: + State& parent_; + State& current_; + + uint requiredOutputNr; + StateAdapter (State& callingProcess, WiringDescriptor const&) : parent_ (callingProcess), current_(callingProcess.getCurrentImplementation()) @@ -99,22 +102,17 @@ namespace engine { virtual State& getCurrentImplementation () { return current_; } - /** contains the details of Cache query and recursive calls - * to the predecessor node(s), eventually followed by the - * ProcNode::process() callback - */ - BuffHandle retrieve (uint requiredOutputNr) - { - return retrieveResult (requiredOutputNr); - } }; template struct QueryCache : NEXT { - BuffHandle step () // brauche: current state + BuffHandle + step () { - BuffHandle fetched = current_.fetch (genFrameID (requiredOutputNr)); + BuffHandle fetched = this->current_.fetch ( + this->genFrameID ( + this->requiredOutputNr)); if (fetched) return fetched; else @@ -126,12 +124,14 @@ namespace engine { template struct PullInput : NEXT { - BuffHandle step () + BuffHandle + step () { this->createBuffTable(); ASSERT (this->buffTab); ASSERT (0 < this->buffTabSize()); + ASSERT (this->nrO == this->nrI ); ASSERT (this->nrO+this->nrI <= this->buffTabSize()); ASSERT (this->buffTab->inHandles = &this->buffTab->handles[this->nrO]); BuffHandle *inH = this->buffTab->inHandles; @@ -147,10 +147,40 @@ namespace engine { } }; + template - struct AllocOutputFromCache + struct ReadSource : NEXT { - BuffHandle step () + BuffHandle + step () + { + this->createBuffTable(); + + ASSERT (this->buffTab); + ASSERT (0 < this->buffTabSize()); + ASSERT (this->nrO+this->nrI <= this->buffTabSize()); + ASSERT (this->buffTab->inHandles = &this->buffTab->handles[this->nrO]); + BuffHandle *inH = this->buffTab->inHandles; + BuffHandle *outH = this->buffTab->handles; + BuffHandle::PBuff *inBuff = this->buffTab->inBuffs; + BuffHandle::PBuff *outBuff = this->buffTab->buffers; + + for (uint i = 0; i < this->nrI; ++i ) + { + inBuff[i] = outBuff[i] = + *(inH[i] = outH[i] = this->getSource(i)); // TODO: how to access source nodes??? + // now Input #i is ready... + } + return NEXT::step(); + } + }; + + + template + struct AllocOutput + { + BuffHandle + step () { ASSERT (this->buffTab); ASSERT (this->nrO < this->buffTabSize()); @@ -160,17 +190,45 @@ namespace engine { for (uint i = 0; i < this->nrO; ++i ) { outBuff[i] = - *(outH[i] = this->allocateBuffer(i)); + *(outH[i] = allocateBuffer (i)); // now Output buffer for channel #i is available... } return NEXT::step(); } + + private: + BuffHandle const& + allocateBuffer (uint outCh) + { + BUFFSRC::getBufferProvider(this).allocateBuffer( + this->getBufferDescriptor(outCh)); + } }; + + enum OutBuffProvider { PARENT, CACHE }; + + template + struct OutBuffSource ; + + template<> + struct OutBuffSource + { + State& getBufferProvider (InvocationStateBase& thisState) { return thisState.parent_; } + }; + + template<> + struct OutBuffSource + { + State& getBufferProvider (InvocationStateBase& thisState) { return thisState.current_; } + }; + + template struct ProcessData { - BuffHandle step () + BuffHandle + step () { ASSERT (this->buffTab); ASSERT (this->nrO+this->nrI <= this->buffTabSize()); @@ -186,7 +244,8 @@ namespace engine { template struct FeedCache { - BuffHandle step () + BuffHandle + step () { // declare all Outputs as finished this->current_.isCalculated(this->buffTab->handles, @@ -199,7 +258,8 @@ namespace engine { template struct ReleaseBuffers { - BuffHandle step () + BuffHandle + step () { // all buffers besides the required Output no longer needed this->current_.releaseBuffers(this->buffTab->handles, @@ -238,53 +298,79 @@ namespace engine { /* === declare the possible Assembly of these elementary steps === */ template - struct Strategy - { - BuffHandle step () { NOTREACHED; } - }; + struct Strategy ; + - template<> - struct Strategy< Config > + template + struct SelectBuffProvider; + + template<> struct SelectBuffProvider : OutBuffSource { }; + template<> struct SelectBuffProvider : OutBuffSource{ }; + template<> struct SelectBuffProvider : OutBuffSource { }; + template<> struct SelectBuffProvider<> : OutBuffSource{ }; + + + using lumiera::typelist::Config; + + template + struct Strategy< Config > : QueryCache < PullInput< - AllocOutputFromCache< + AllocOutput, ProcessData< FeedCache< ReleaseBuffers< InvocationStateBase > > > > > > { }; - template<> + template struct Strategy< Config > : PullInput< - AllocOutputFromParent< + AllocOutput, ProcessData< ReleaseBuffers< InvocationStateBase > > > > { }; + template<> + struct Strategy< Config<> > + : ReadSource< + ReleaseBuffers< + InvocationStateBase > > + { }; - // At Application startup: build table of all possible operation configs - namespace { + template<> + struct Strategy< Config > : Strategy< Config<> > { }; - bool - determine_if_case_is_possible (Bits& caseFlags) - { - ////////////////////////////////////////////////TODO: Henne oder Ei? - } - - void - build_table_of_possible_configs () - { - registerPossibleCases (&determine_if_case_is_possible); - } - - - using namespace lumiera; - LifecycleHook schedule_ (ON_BASIC_INIT, &build_table_of_possible_configs); + template<> + struct Strategy< Config > + : ReadSource< + AllocOutput, + ProcessData< // wiring_.processFunction is supposed to do just buffer copying here + ReleaseBuffers< + InvocationStateBase > > > > + { }; - } + template + class StateAdapter + : Strategy + { + + protected: + + /** contains the details of Cache query and recursive calls + * to the predecessor node(s), eventually followed by the + * ProcNode::process() callback + */ + BuffHandle retrieve (uint outNr) + { + this->requiredOutputNr = outNr; + return Strategy::step (); + } + + }; + } // namespace engine #endif diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index 4ee451072..aba017fde 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -27,6 +27,7 @@ //#include +#include #include #include #include @@ -59,11 +60,11 @@ namespace lumiera { { typedef NullType Next; }; - template class _P_> + template class _P_> struct Filter,_P_> - : CondNode<_P_, TY, TYPES> + : CondNode<_P_::value, TY, TYPES> { - typedef CondNode<_P_, TY, TYPES> Next; + typedef CondNode<_P_::value, TY, TYPES> Next; }; @@ -131,7 +132,10 @@ namespace lumiera { struct CombineFlags : Combine { }; - + + + using std::max; + template struct Flag { }; template<> struct Flag<0> : NullType { }; @@ -162,7 +166,7 @@ namespace lumiera { }; template - struct DefineConfigFlags; + struct DefineConfigByFlags; template< char f1=0 , char f2=0 @@ -170,7 +174,7 @@ namespace lumiera { , char f4=0 , char f5=0 > - struct DefineConfigFlags< FlagTuple > + struct DefineConfigByFlags< FlagTuple > : Config { }; @@ -218,15 +222,15 @@ namespace lumiera { , TAIL > > { - typedef Node, FLAGS> CurrConfig; - enum{ BITS = max(FlagInfo::BITS, FlagInfo::BITS) + typedef Node, FLAGS> ThisConfig; + enum{ BITS = max (FlagInfo::BITS, FlagInfo::BITS) }; template static FUNC::Ret accept (FUNC& functor) { - functor.template visit(FlagInfo::CODE); + functor.template visit(FlagInfo::CODE); return FlagInfo::accept (functor); } }; @@ -251,16 +255,18 @@ namespace engine { ///////TODO using lumiera::typelist::Config; using lumiera::typelist::FlagInfo; + using lumiera::typelist::DefineConfigByFlags; ///////TODO enum Cases { - CACHING, + CACHING = 1, PROCESS, INPLACE, - NUM_Cases + NOT_SET = 0, + NUM_Cases = INPLACE }; typedef std::bitset Bits; @@ -293,14 +299,14 @@ namespace engine { /** * Helper for fabricating ProcNode Wiring configurations. - * This object builds a table of factories, one for each - * possible node configuration. Provided with the desired - * configuration encoded as bits, the related factory can - * be invoked, thus producing a product object for the - * given configuration. + * This object builds a table of factories, holding one factory + * for each possible node configuration. Provided with the desired + * configuration encoded as bits, the related factory can be invoked, + * thus producing a product object for the given configuration. + * * \par implementation notes * The actual factory class is templated, so it will be defined - * at the use site of ConfigSelecgtor. Moreover, this factory + * at the use site of ConfigSelector. Moreover, this factory * usually expects an ctor argument, which will be fed through * when creating the ConfigSelector instance. This is one of * the reasons why we go through all these complicated factory @@ -310,18 +316,19 @@ namespace engine { * factories, which in turn happens each time we use a new * bulk allocation memory block -- typically for each separate * segment of the Timeline and processing node graph. - * The selection of the possible flag configurations, for which - * Factory instances are created in the table, is governed by - * the type parameter of the ConfigSelector ctor. This type - * parameter needs to be a Typelist of Typelists, each - * representing a flag configuration. The intention is to - * use template metaprogramming to extract all currently defined - * configurations for StateProxy objects to drive this selection. + * + * NOw the selection of the possible flag configurations, for which + * Factory instances are created in the table, is governed by the + * type parameter of the ConfigSelector ctor. This type parameter + * needs to be a Typelist of Typelists, each representing a flag + * configuration. The intention is to to drive this selection by + * the use of template metaprogramming for extracting all + * currently defined StateProxy object configurations. */ template class Factory> class ConfigSelector { - typedef typename Factory::Ret Ret; + typedef typename Factory::Ret Ret; typedef typename Factory::Param Param; struct FacFunctor @@ -342,7 +349,7 @@ namespace engine { typedef boost::scoped_ptr PFunc; typedef std::map ConfigTable; - ConfigTable possibleConfig_; + ConfigTable possibleConfig_; ///< Table of factories /** Helper: a visitor usable with FlagInfo */ struct FactoryTableBuilder @@ -363,7 +370,7 @@ namespace engine { void visit (ulong code) { - typedef typename DefineConfigFlags Config; + typedef typename DefineConfigByFlags Config; factories_[code].reset (new FactoryHolder > (ctor_param_)); } diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp index b41405434..4a3249dc9 100644 --- a/src/proc/engine/procnode.hpp +++ b/src/proc/engine/procnode.hpp @@ -76,7 +76,7 @@ namespace engine { * holding the actual buffer pointers and issuing the recrusive pull() calls * @see NodeWiring#callDown default implementation */ - virtual BufferID callDown (State& currentProcess, BufferID requiredOutputNr) const =0; + virtual BuffHandle callDown (State& currentProcess, uint requiredOutputNr) const =0; friend class ProcNode; @@ -118,8 +118,8 @@ namespace engine { * this node delivers more than one output channel) * @return ID of the result buffer (accessible via currentProcess) */ - BufferID - pull (State& currentProcess, BufferID requiredOutputNr=0) const + BuffHandle + pull (State& currentProcess, uint requiredOutputNr=0) const { return this->wiringConfig_.callDown (currentProcess, requiredOutputNr); } From cb5d1fd03beec4010527c18680ee5827abfbd13d Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 14 Jul 2008 03:34:18 +0200 Subject: [PATCH 06/80] WIP further refactored the nodeoperation --- doc/devel/uml/class132741.html | 2 +- doc/devel/uml/class142469.html | 5 +- doc/devel/uml/class142725.html | 4 + doc/devel/uml/class143365.html | 10 +- doc/devel/uml/class143493.html | 9 +- doc/devel/uml/class143621.html | 7 +- doc/devel/uml/class143749.html | 10 +- doc/devel/uml/class143877.html | 7 +- doc/devel/uml/class144005.html | 6 +- doc/devel/uml/class144261.html | 25 +++ doc/devel/uml/class144389.html | 24 +++ doc/devel/uml/class144517.html | 25 +++ doc/devel/uml/class144645.html | 23 ++ doc/devel/uml/classes.html | 14 +- doc/devel/uml/classes_list.html | 14 +- doc/devel/uml/fig131973.png | Bin 24696 -> 24292 bytes doc/devel/uml/fig132357.png | Bin 18575 -> 25627 bytes doc/devel/uml/index.html | 16 +- doc/devel/uml/index_60.html | 6 +- doc/devel/uml/index_65.html | 6 +- doc/devel/uml/index_66.html | 3 +- doc/devel/uml/index_67.html | 43 ++-- doc/devel/uml/index_69.html | 4 +- doc/devel/uml/index_70.html | 1 + doc/devel/uml/index_72.html | 2 +- doc/devel/uml/index_73.html | 7 +- doc/devel/uml/index_77.html | 2 +- doc/devel/uml/index_79.html | 1 + doc/devel/uml/index_80.html | 3 +- doc/devel/uml/index_81.html | 1 + doc/devel/uml/index_82.html | 3 +- doc/devel/uml/index_83.html | 5 +- doc/devel/uml/index_84.html | 4 +- doc/devel/uml/index_86.html | 10 +- doc/devel/uml/index_87.html | 2 - doc/devel/uml/public_operations.html | 6 +- src/common/util.hpp | 4 + src/proc/engine/nodeoperation.hpp | 142 +++++++------ src/proc/engine/nodewiringconfig.hpp | 54 +++-- src/proc/state.hpp | 4 +- uml/lumiera/128389 | 301 ++++++++++++++++++++++----- uml/lumiera/128901 | 2 +- uml/lumiera/129285 | 2 +- uml/lumiera/131973.diagram | 24 ++- uml/lumiera/132357.diagram | 201 +++++++++++++----- uml/lumiera/5.session | 22 +- uml/lumiera/lumiera.prj | 2 +- wiki/renderengine.html | 78 +++---- 48 files changed, 794 insertions(+), 352 deletions(-) create mode 100644 doc/devel/uml/class144261.html create mode 100644 doc/devel/uml/class144389.html create mode 100644 doc/devel/uml/class144517.html create mode 100644 doc/devel/uml/class144645.html diff --git a/doc/devel/uml/class132741.html b/doc/devel/uml/class132741.html index a9dd11ca8..89bb5e220 100644 --- a/doc/devel/uml/class132741.html +++ b/doc/devel/uml/class132741.html @@ -16,7 +16,7 @@ -

Declaration :

  • C++ : class State
  • Java : public interface State

Directly inherited by : InvocationStateBase StateAdapter StateProxy

+

Declaration :

  • C++ : class State
  • Java : public interface State

Directly inherited by : StateAdapter StateProxy

Artifact : stateproxy, Component(s) : Builder

Relation currFrame (<unidirectional association>)

Declaration :

  • Uml : # currFrame : Frame
  • C++ : protected: Frame * currFrame
diff --git a/doc/devel/uml/class142469.html b/doc/devel/uml/class142469.html index 31b631174..58c82f008 100644 --- a/doc/devel/uml/class142469.html +++ b/doc/devel/uml/class142469.html @@ -16,9 +16,8 @@ -

Declaration :

  • C++ : template<class WIRING, class POLICY> class StateProxy : public State, public InPlace
- -
Relation wiring (<unidirectional association>)

Declaration :

+

Declaration :

  • C++ : class StateProxy : public State
+

All public operations : allocateBuffer , fetch , isCalculated , releaseBuffer

diff --git a/doc/devel/uml/class142725.html b/doc/devel/uml/class142725.html index 13bdadf5b..93345b68f 100644 --- a/doc/devel/uml/class142725.html +++ b/doc/devel/uml/class142725.html @@ -17,5 +17,9 @@

Declaration :

  • C++ : class WiringDescriptor

Directly inherited by : NodeWiring

+
+ +
Operation callDown

Declaration :

  • Uml : + callDown(inout : State, in requiredOutput : uint) : , exceptions : BuffHandle
  • C++ : public: virtual callDown () throw (BuffHandle)
+

All public operations : callDown

diff --git a/doc/devel/uml/class143365.html b/doc/devel/uml/class143365.html index 8f96f6b27..c4e3718c3 100644 --- a/doc/devel/uml/class143365.html +++ b/doc/devel/uml/class143365.html @@ -16,7 +16,13 @@ -

Declaration :

-
+

Declaration :

+ +
Relation <association>

Declaration :

+
Relation <association>

Declaration :

+
Relation <association>

Declaration :

+
Relation <unidirectional association>

Declaration :

+
Operation callDown

Declaration :

  • Uml : + callDown() :
  • C++ : public: callDown ()
+

All public operations : callDown , callDown

diff --git a/doc/devel/uml/class143493.html b/doc/devel/uml/class143493.html index 63ef30fb2..37a6496d9 100644 --- a/doc/devel/uml/class143493.html +++ b/doc/devel/uml/class143493.html @@ -4,21 +4,18 @@ -Class InvocationStateBase +Class OperationBase -
Class InvocationStateBase
+
Class OperationBase

-

Declaration :

  • C++ : class InvocationStateBase : public State

Directly inherited by : Caching

-
-
-

All public operations : allocateBuffer , fetch , isCalculated , releaseBuffer

+

Declaration :

  • C++ : class OperationBase

Directly inherited by : FeedCache ProcessData ReadSource

diff --git a/doc/devel/uml/class143621.html b/doc/devel/uml/class143621.html index 39379446c..649d441e7 100644 --- a/doc/devel/uml/class143621.html +++ b/doc/devel/uml/class143621.html @@ -4,21 +4,20 @@ -Class Caching +Class QueryCache -
Class Caching
+
Class QueryCache

-

Declaration :

Directly inherited by : Process

+

Declaration :

Directly inherited by : Strategy

-

All public operations : allocateBuffer , fetch , isCalculated , releaseBuffer

diff --git a/doc/devel/uml/class143749.html b/doc/devel/uml/class143749.html index 2d3726110..426d12aaa 100644 --- a/doc/devel/uml/class143749.html +++ b/doc/devel/uml/class143749.html @@ -4,21 +4,21 @@ -Class Process +Class PullInput -
Class Process
+
Class PullInput

-

Declaration :

  • C++ : class Process : public Caching

Directly inherited by : InPlace

+

Declaration :

Directly inherited by : QueryCache Strategy

-
-

All public operations : allocateBuffer , fetch , isCalculated , releaseBuffer

+ +
Relation <association>

Declaration :

diff --git a/doc/devel/uml/class143877.html b/doc/devel/uml/class143877.html index b3164a70a..bad34df65 100644 --- a/doc/devel/uml/class143877.html +++ b/doc/devel/uml/class143877.html @@ -4,21 +4,20 @@ -Class InPlace +Class ReadSource -
Class InPlace
+
Class ReadSource

-

Declaration :

  • C++ : class InPlace : public Process

Directly inherited by : StateProxy

+

Declaration :

Directly inherited by : Strategy

-

All public operations : allocateBuffer , fetch , isCalculated , releaseBuffer

diff --git a/doc/devel/uml/class144005.html b/doc/devel/uml/class144005.html index 9fd2629bc..bc2bf60f2 100644 --- a/doc/devel/uml/class144005.html +++ b/doc/devel/uml/class144005.html @@ -4,19 +4,19 @@ -Class WiringTable +Class BuffTable -
Class WiringTable
+
Class BuffTable

-

Declaration :

  • C++ : template<int SIZ> class WiringTable
+

Declaration :

  • C++ : template<int SIZ> class BuffTable
Relation <directional aggregation by value>

Declaration :

Relation <unidirectional association>

Declaration :

diff --git a/doc/devel/uml/class144261.html b/doc/devel/uml/class144261.html new file mode 100644 index 000000000..d9c258fab --- /dev/null +++ b/doc/devel/uml/class144261.html @@ -0,0 +1,25 @@ + + + + + + +Class Invocation + + + + + +
Class Invocation
+

+ + + + +

Declaration :

  • C++ : class Invocation
+ +
Relation <unidirectional association>

Declaration :

+
Relation <unidirectional association>

Declaration :

+
Relation <unidirectional association>

Declaration :

+ + diff --git a/doc/devel/uml/class144389.html b/doc/devel/uml/class144389.html new file mode 100644 index 000000000..fb3f25daf --- /dev/null +++ b/doc/devel/uml/class144389.html @@ -0,0 +1,24 @@ + + + + + + +Class ProcessData + + + + + +
Class ProcessData
+

+ + + + +

Declaration :

Directly inherited by : PullInput

+
+ +
Relation <association>

Declaration :

+ + diff --git a/doc/devel/uml/class144517.html b/doc/devel/uml/class144517.html new file mode 100644 index 000000000..8eace63da --- /dev/null +++ b/doc/devel/uml/class144517.html @@ -0,0 +1,25 @@ + + + + + + +Class Strategy + + + + + +
Class Strategy
+

+ + + + +

Declaration :

+ +
Relation <association>

Declaration :

+
Relation <association>

Declaration :

+
Relation <association>

Declaration :

+ + diff --git a/doc/devel/uml/class144645.html b/doc/devel/uml/class144645.html new file mode 100644 index 000000000..c5cc7c0cb --- /dev/null +++ b/doc/devel/uml/class144645.html @@ -0,0 +1,23 @@ + + + + + + +Class FeedCache + + + + + +
Class FeedCache
+

+ + + + +

Declaration :

Directly inherited by : ProcessData

+
+
+ + diff --git a/doc/devel/uml/classes.html b/doc/devel/uml/classes.html index 7992c89cf..319577971 100644 --- a/doc/devel/uml/classes.html +++ b/doc/devel/uml/classes.html @@ -27,11 +27,11 @@ AutoAutomation data for some parameter (i.e. a time varying function) BackendCache BuffHandle +BuffTable Buildableinterface BuilderFacadeboundaryProvides unified access to the builder functionality. While individual components of the builder subsystem may be called if necessary or suitable, it is usually better to do all extern invocations via the high level methods of this Facade BuilderToolinterfaceUsed according to the visitor pattern: each Tool contains the concrete implementation for one task to be done to the various MObject classes BuildInstruct(Interface) building instructions to be executed by the Builder on the render node network under construction. -Caching Caller Categorytree like classification of Assets Clipbookkeeping (asset) view of a media clip. @@ -60,6 +60,7 @@ ExplicitPlacementinterface External Factorya template for generating functor-like Factory objects, used to encapsulate object creation and providing access via smart-pointers only. +FeedCache File FileHandle FileHandleCache @@ -74,10 +75,9 @@ FrameDescriptorinterfaceA FrameDescriptor implements the higher level interfaces for frames. Further refinements are made by subclassing and policy classes FrameReference GLBuf -InPlace InterpolatorProvides the implementation for getting the acutal value of a time varying or automated effect/plugin parameter Invalid -InvocationStateBase +Invocation Label Link LocatingPinAn element with value semantics, which actually implements the placement of some MObject by positioning it in some way. @@ -94,6 +94,7 @@ MutexI provided a reworked Mutex class in my Cinelerra2 repository NodeCreatorToolThis Tool implementation plays the central role in the buld process: given a MObject from Session, it is able to attach ProcNodes to the render engine under construction such as to reflect the properties of the MObject in the actual render. NodeWiring +OperationBase ParameterDescriptor and access object for a plugin parameter. Parameters may be provided with values from the session, and this values may be automated. ParamProviderinterfaceA facility to get the actual value of a plugin/effect parameter PathManagerWhile building a render engine, this Strategy class decides on the actual render strategy in accordance to the current controller settings (system state) @@ -105,13 +106,16 @@ Previewalternative version of the media data, probably with lower resolution Prockey abstraction: data processing asset ProcDispatcher -Process +ProcessData Processor ProcNodeinterfaceKey abstraction of the Render Engine: A Data processing Node ProcPattspecial type of structural Asset representing information how to build some part of the render engine's processing nodes network. ProjectorSpecial video processing node used to scale and translate image data. +PullInput +QueryCache QueryHandlerinterface QueryHandlerImpl +ReadSource RelativeLocation RelTypeenumthe possible kinds of RelativePlacements RenderEngine @@ -132,6 +136,7 @@ StateAdapter StateProxyimplementation std::exceptionauxiliary +Strategy Structkey abstraction: structural asset ThreadWe can basically reuse the Thread class design from Cinelerra2, Thread becomes a baseclass for all Threads Timedenotes a temporal position (time point), based on timeline start.

investigate posix.4 realtime timers, wrap these here @@ -147,7 +152,6 @@ VFrame Visitable WiringDescriptor -WiringTable Wish WriteBuffer WriteBufferPool diff --git a/doc/devel/uml/classes_list.html b/doc/devel/uml/classes_list.html index f89fb300a..8e8c2d9a6 100644 --- a/doc/devel/uml/classes_list.html +++ b/doc/devel/uml/classes_list.html @@ -28,11 +28,11 @@ Auto
BackendCache
BuffHandle
+BuffTable
Buildable
BuilderFacade
BuilderTool
BuildInstruct
-Caching
Caller
Category
Clip
@@ -61,6 +61,7 @@ ExplicitPlacement
External
Factory
+FeedCache
File
FileHandle
FileHandleCache
@@ -75,10 +76,9 @@ FrameDescriptor
FrameReference
GLBuf
-InPlace
Interpolator
Invalid
-InvocationStateBase
+Invocation
Label
Link
LocatingPin
@@ -95,6 +95,7 @@ Mutex
NodeCreatorTool
NodeWiring
+OperationBase
Parameter
ParamProvider
PathManager
@@ -106,13 +107,16 @@ Preview
Proc
ProcDispatcher
-Process
+ProcessData
Processor
ProcNode
ProcPatt
Projector
+PullInput
+QueryCache
QueryHandler
QueryHandlerImpl
+ReadSource
RelativeLocation
RelType
RenderEngine
@@ -133,6 +137,7 @@ StateAdapter
StateProxy
std::exception
+Strategy
Struct
Thread
Time
@@ -148,7 +153,6 @@ VFrame
Visitable
WiringDescriptor
-WiringTable
Wish
WriteBuffer
WriteBufferPool
diff --git a/doc/devel/uml/fig131973.png b/doc/devel/uml/fig131973.png index 78f068e2d42da80cc06b30cb0e7cca9977571b43..d16d88131e90ff3c19b82c42067cdb5ef8e708d7 100644 GIT binary patch literal 24292 zcmce;1z1&GyEZzNkOo1zr9|nJmJ*hfbV*2ecPc58E|g9|QUvL4L_oT`ySw2G-uK)8 z{=RSTeXjqU|6Ioly_PFjbIviwGw$b(8S+|Q3KNY44T2y{n6!iv1l@Ckp!>ln_rWuW zgRN;0LLmPCv1Gp_?=)e$T4&Jo7b`;Q^_RKQf0AY?vy*4P6XQCX{7Txr9L^uzPclt$ z?}IIr#JS&?jwdFK@z?hl_VtCt`}z6h1ipI* zb(|ow6Yum>1(*ek`r~{hN5&NU;6lVzFfiqAz*{jlBIxxijPl|rp1Bi?d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SLpl}~dOAPlzy^#Nd99m< zk}tUag5UV(Cs;Sgs{!@X8O(1P4;1CEH`f51+GwpS{Fy$*Ij+9TkmPBOg?D-R1h@l% z;vsQNkUd8J!&uh2zONCm?g+9%I=Wm9jWf7(>Vz+s#MyH(yX{b7){`TmAs1OZcMz0HSL zM#k;s%b4I`6<(fIwBx<`W*Fa%xn$p7oPa0HK~X7oZ%)GP;&)k45c!;86pS?@MNSwG z1_x6kNlf~hphN_sB9O9zi713Wn^UIrUTk}_q@fVq*#;9HbS`Fn*Pr|MY|@V&ATEv- z=7L*yOgCLjf=pPQllsDI1|f7EMnW(ZF|7HpTi7lokhoxDNO)ml0ttHjkQ$5}o-3$PCfUqt-IU{peA6P&@cz}kS8FjBYFRH_s>K=^hp!U2U zHYZ#l^jzw*&kOk3^MEr|%Kz=wHW^R9cP(o8V+y#}h_UF3-#m3b#l%Ri#2R{S+7c-O zZ}`S>`hVTK=3n>4asDez;w&Kdum1@$Cqcw#pH%;m90|ezRpy^l<6wZ?KDtFsR_;hA zQ#{cte{yW;Ta0j&z WQDI1MrAYxO0m0u$i
Artifact Lumiera

Depends on common

Depends on gui

Depends on proc

Depends on backend

the main executable to be built

-

executable associated with : mobject, source, frame, placement, sessionimpl, builderfacade, controllerfacade, processor, pluginadapter, effect, buildertool, segmentationtool, aframe, assembler, trafo, explicitplacement, auto, glrender, link, parameter, renderengine, allocation, vframe, toolfactory, arender, renderstate, label, glbuf, procnode, stateproxy, hub, buildable, abstractmo, nodecreatertool, projector, interpolator, edl, fixture, glpipe, vrender, exitnode, pathmanager, track, paramprovider, mask, main, conmanager, clip, meta, fixedlocation, relativelocation

+

executable associated with : exitnode, pathmanager, track, paramprovider, mask, main, conmanager, clip, meta, fixedlocation, relativelocation, mobject, source, frame, placement, sessionimpl, builderfacade, controllerfacade, processor, pluginadapter, effect, buildertool, segmentationtool, aframe, assembler, trafo, explicitplacement, auto, glrender, link, parameter, renderengine, allocation, vframe, toolfactory, arender, renderstate, label, glbuf, procnode, stateproxy, hub, buildable, abstractmo, nodecreatertool, projector, interpolator, edl, fixture, glpipe, vrender

Artifact main

Artifact source

@@ -902,12 +902,16 @@ reuse exiting Engine

Selection :

    Transformation
    -
    -
    Class Caching
    -
    Class Process
    -
    Class InPlace
    -
    +
    +
    +
    Class PullInput
    +
    +
    +
    Class FeedCache
    +
    Class Strategy
    +
    Class BuffTable
    +

    diff --git a/doc/devel/uml/index_60.html b/doc/devel/uml/index_60.html index 8712d7074..a873c25b0 100644 --- a/doc/devel/uml/index_60.html +++ b/doc/devel/uml/index_60.html @@ -17,8 +17,8 @@ - + @@ -28,10 +28,10 @@ - - + + diff --git a/doc/devel/uml/index_65.html b/doc/devel/uml/index_65.html index ab57596c5..33d5ebd2f 100644 --- a/doc/devel/uml/index_65.html +++ b/doc/devel/uml/index_65.html @@ -55,12 +55,12 @@ - + - - + + diff --git a/doc/devel/uml/index_66.html b/doc/devel/uml/index_66.html index db64b33db..3a6ba7379 100644 --- a/doc/devel/uml/index_66.html +++ b/doc/devel/uml/index_66.html @@ -24,6 +24,7 @@ + @@ -36,8 +37,8 @@ - + diff --git a/doc/devel/uml/index_67.html b/doc/devel/uml/index_67.html index 1612ca9ea..8432e5cc6 100644 --- a/doc/devel/uml/index_67.html +++ b/doc/devel/uml/index_67.html @@ -19,7 +19,8 @@ - + + @@ -29,34 +30,34 @@ - - - - - - - + + + + + - - - + + + + + + + - - - - - - - - - - + + + + + + + + diff --git a/doc/devel/uml/index_69.html b/doc/devel/uml/index_69.html index 1f6fd3f19..a7245b34b 100644 --- a/doc/devel/uml/index_69.html +++ b/doc/devel/uml/index_69.html @@ -18,14 +18,14 @@
    NameKindDescription
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    <flow>transition
    Assetsclass view
    ATTACHattributeattach subject to anchor (e.g. an effect to a clip)
    au1class instance
    aud_aclass instance
    aud_Aclass instance
    aud_aclass instance
    audioclass instance
    audio1class instance
    audio1class instance
    audio1class instance
    audio1class instance
    audio1class instance
    autoartifactMedia Object holding automation data
    AutoclassAutomation data for some parameter (i.e. a time varying function)
    Automation Entitiesclass diagram
    BackendCacheclass
    BackendLayerpackage
    BuffHandleclass
    BuffTableclass
    buildoperation
    build flowactivity diagram
    build necessary?decision activity node
    buildableartifactmarker interface denoting any MObject able to be treated by Tools
    buildEngineoperationMain Operation of the Builder: create a render engine for a given part of the timeline
    Buildercomponent
    builderpackagesourcecode package

    The Builder creating the Render Engine,
    located within the MObject Subsystem
    Builderpackage
    builderpackagesourcecode package

    The Builder creating the Render Engine,
    located within the MObject Subsystem
    Builder Entitiesclass diagram
    Builder Workingsclass view
    BuilderFacadeclassProvides unified access to the builder functionality. While individual components of the builder subsystem may be called if necessary or suitable, it is usually better to do all extern invocations via the high level methods of this Facade
    NameKindDescription
    Cachecomponent
    Cachecomponent view
    Cachingclass
    callDownoperation
    callDownoperation
    Callerclass
    categoryrelationprimary tree like classification of the asset
    Categoryclasstree like classification of Assets
    chainrelationChain of additional Placements further constraining the position of this MObject
    checked_inrelationchecked_in objects are subject of cache aging and must be not in use
    checked_outrelationthis list keeps all mappings which are in use, and thus prevents them from Cache aging
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    class instanceclass instance
    clearoperationclear current session contents
    without resetting overall session config.
    Afterwards, the session will contain only one
    empty EDL, while all Assets are retained.
    client codecomponent
    Clipclassbookkeeping (asset) view of a media clip.
    - + - + diff --git a/doc/devel/uml/index_70.html b/doc/devel/uml/index_70.html index 5e1189dd5..56bc1daaf 100644 --- a/doc/devel/uml/index_70.html +++ b/doc/devel/uml/index_70.html @@ -18,6 +18,7 @@
    NameKindDescription
    edlartifactthe (high level) Edit Decision List within the current Session
    EDLclass
    EDLcomponent
    EDLclass
    EDL Example1object diagramA simple example showing how the actual objects are placed in the Fixture (=definitive playlist). It shows a Video and Audio clip placed on two tracks
    EDL Example2object diagramMore complex example showing the Object graph in the EDL and how it is linked into the Fixture to yield the actual locations. In this example, an HUE Effect is applied on a part of the Clip
    edlsrelation
    EffectclassEffect or media processing component
    effectartifactEffect or media processing component
    effectartifactEDL representation of a pluggable and automatable effect.
    effectartifactEffect or media processing component
    Effectclass
    elementsrelationrelevant MObjects comprising this segment. TODO: actually necessary??
    enableoperationchange the enabled status of this asset. Note the corresponding #isActive predicate may depend on the enablement status of parent assets as well
    + diff --git a/doc/devel/uml/index_72.html b/doc/devel/uml/index_72.html index 3547e6f3e..7e5b73a00 100644 --- a/doc/devel/uml/index_72.html +++ b/doc/devel/uml/index_72.html @@ -23,8 +23,8 @@ - +
    NameKindDescription
    Factoryclassa template for generating functor-like Factory objects, used to encapsulate object creation and providing access via smart-pointers only.
    FeedCacheclass
    fetchoperation
    Fileclass
    filerelation
    Hierarchyclass diagramLumiera Exception hierarchy
    howtoProcoperation@return descriptor how to build a render pipeline corresponding to this media
    hubartifactspecial ProcNode used to build data distributing connections
    HUEclass instance
    HUEclass instance
    HUEclass instance
    diff --git a/doc/devel/uml/index_73.html b/doc/devel/uml/index_73.html index 9a0a77429..e127cf07e 100644 --- a/doc/devel/uml/index_73.html +++ b/doc/devel/uml/index_73.html @@ -20,10 +20,9 @@ idattributeAsset primary key. In Memory Databaseclass diagram inFixtureactivity action pin -InPlaceclass -inputclass instance -inputclass instance inputclass instance +inputclass instance +inputclass instance instanceoperation instructionsrelation Interfaceclass view @@ -32,7 +31,7 @@ interpolatorartifactdenotes a facility to get (continuously interpolated) parameter values InterpolatorclassProvides the implementation for getting the acutal value of a time varying or automated effect/plugin parameter Invalidclass -InvocationStateBaseclass +Invocationclass iporelation isActiveoperationweather this asset is swithced on and consequently included in the fixture and participates in rendering isCalculatedoperation diff --git a/doc/devel/uml/index_77.html b/doc/devel/uml/index_77.html index 1428ef6eb..e6d8e8031 100644 --- a/doc/devel/uml/index_77.html +++ b/doc/devel/uml/index_77.html @@ -33,8 +33,8 @@ MediaFactoryclassspecialized Asset Factory for configuring (new) media asset instances based on existing media files on disk; can create placeholder assets as well merge activity nodemerge activity node Metaclasskey abstraction: metadata and organisational asset -metaartifactabstract base class of all MObjects representing meta data or processing instructions metaartifactkey abstraction: metadata and organisational asset +metaartifactabstract base class of all MObjects representing meta data or processing instructions Metaclass mobjectartifactKey Abstraction: A Media Object in the Session mobjectpackagesourcecode package

    MObject Subsystem
    including the Session (EDL), Builder and Processing Controller diff --git a/doc/devel/uml/index_79.html b/doc/devel/uml/index_79.html index d1fdc83c0..e17eadde8 100644 --- a/doc/devel/uml/index_79.html +++ b/doc/devel/uml/index_79.html @@ -18,6 +18,7 @@ + diff --git a/doc/devel/uml/index_80.html b/doc/devel/uml/index_80.html index a3268b59b..368babe6a 100644 --- a/doc/devel/uml/index_80.html +++ b/doc/devel/uml/index_80.html @@ -53,8 +53,8 @@ - + @@ -67,6 +67,7 @@ +
    NameKindDescription
    offsetattributeOffset the actual position by this (time) value relative to the anchor point. TODO: Representation?
    OperationBaseclass
    orgattributeorigin or authorship id. Can be a project abbreviation, a package id or just the authors nickname or UID. This allows for the compnent name to be more generic (e.g. "blur"). Default for all assets provided by the core Lumiera codebase is "lumi".
    ouputclass instance
    ouputclass instance
    Proc-Asset Relationsclass diagram
    proc-componentscomponent diagram
    ProcDispatcherclass
    Processclass
    processoperation
    ProcessDataclass
    ProcessingLayerpackage
    Processorclass
    processorartifacta single render pipeline for one segment of the timeline
    projectorartifactvideo ProcNode for scaling and translating image data
    providerrelation
    pulloperation
    PullInputclass
    diff --git a/doc/devel/uml/index_81.html b/doc/devel/uml/index_81.html index 5a521bd2f..6367201fd 100644 --- a/doc/devel/uml/index_81.html +++ b/doc/devel/uml/index_81.html @@ -20,6 +20,7 @@ queryclass view Query System overviewcomponent view query useuse case view +QueryCacheclass QueryHandlerclass QueryHandlerImplclass diff --git a/doc/devel/uml/index_82.html b/doc/devel/uml/index_82.html index b5b305e10..9b107d854 100644 --- a/doc/devel/uml/index_82.html +++ b/doc/devel/uml/index_82.html @@ -17,14 +17,15 @@ + - + diff --git a/doc/devel/uml/index_83.html b/doc/devel/uml/index_83.html index 5dd747140..4ea8bf79b 100644 --- a/doc/devel/uml/index_83.html +++ b/doc/devel/uml/index_83.html @@ -32,8 +32,8 @@ - + @@ -47,8 +47,8 @@ - + @@ -64,6 +64,7 @@ + diff --git a/doc/devel/uml/index_84.html b/doc/devel/uml/index_84.html index b0541e88b..96532f18f 100644 --- a/doc/devel/uml/index_84.html +++ b/doc/devel/uml/index_84.html @@ -42,13 +42,13 @@ - + - +
    NameKindDescription
    ReadSourceclass
    refPointclass instance
    regoperationregisters an asset object in the internal DB, providing its unique key
    registryrelation@internal Table or DB holding all registered asset instances.
    relativelocationartifactPlacement implemnetaion providing various ways of attaching a MObject to another one
    RelativeLocationclass
    releaseBufferoperation
    relTypeattributethe kind of relation denoted by this Placement
    RelTypeclassthe possible kinds of RelativePlacements
    relTypeattributethe kind of relation denoted by this Placement
    removeoperationremove the given asset <i>together with all its dependants</i> from the internal DB
    Render Entitiesclass diagram
    Render Mechanicsclass diagram
    Service Componentsclass view
    Sessioncomponent
    sessionartifactInterface: the session edited by the user
    sessionpackagesourcecode package

    Everything concerning the EDL and Session, within the MObject Subsystem
    Sessionclass view
    sessionpackagesourcecode package

    Everything concerning the EDL and Session, within the MObject Subsystem
    SessionclassPrimary Interface for all editing tasks.
    The session contains defaults, all the assets being edited, and a set of EDL with the individual MObjects to be manipulated and rendered.
    Session structureclass diagram
    sessionimplartifactholds the complete session data to be edited by the user
    SimpleClipclassElementary clip consisting of only one media stream
    SmartPointerclass
    SmartPointersclass view
    sourcerelationmedia source of this clip
    sourcerelationthe media source this clip referes to
    sourcerelationmedia source of this clip
    SourceclassSource Node: represents a media source to pull data from.
    sourceartifactRepresentation of a Media source
    Source Overviewdeployment diagram
    StateProxyclass
    stateproxyartifactKey Interface representing a render process and encapsulating state
    std::exceptionclass
    Strategyclass
    Structclasskey abstraction: structural asset
    structartifactkey abstraction: structural asset
    Struct-Asset Relationsclass diagram
    trafoartifacttransforming processing Node
    treatoperation
    treatoperationThis operation is to be overloaded for the specific MObject subclasses to be treated.
    treatoperation
    treatoperation
    treatoperation
    treatoperation
    treatoperation
    treatoperation
    treatoperation
    treatoperation
    treatoperation
    TypeHandlerclass
    TypeHandler<Pipe>class
    diff --git a/doc/devel/uml/index_86.html b/doc/devel/uml/index_86.html index cda6a585e..3538c8202 100644 --- a/doc/devel/uml/index_86.html +++ b/doc/devel/uml/index_86.html @@ -22,18 +22,18 @@ vframeartifacta buffer and render process holding a Video frame vid1class instance vid_Aclass instance -vid_aclass instance +vid_aclass instance vid_Aclass instance vid_Aclass instance -vid_aclass instance -videoclass instance -videoclass instance +vid_aclass instance videoclass instance +videoclass instance videoclass instance +videoclass instance video1class instance -video1class instance video1class instance video1class instance +video1class instance video1class instance video1class instance Visitableclass diff --git a/doc/devel/uml/index_87.html b/doc/devel/uml/index_87.html index 7e2b7e31f..616839a54 100644 --- a/doc/devel/uml/index_87.html +++ b/doc/devel/uml/index_87.html @@ -20,9 +20,7 @@ whatoperation whatoperationthe base class of all exceptions thrown by the standard library when to queryuse case diagram -wiringrelation WiringDescriptorclass -WiringTableclass wiringTemplaterelation wishartifactLocatingPin representing a low-priority directive by the user,
    to be fulfilled only if possible (and after satisfying the
    more important LocatingPins) Wishclass diff --git a/doc/devel/uml/public_operations.html b/doc/devel/uml/public_operations.html index c252030f0..07fb079d7 100644 --- a/doc/devel/uml/public_operations.html +++ b/doc/devel/uml/public_operations.html @@ -23,6 +23,8 @@ buildAssembler buildEngineBuilderFacadeMain Operation of the Builder: create a render engine for a given part of the timeline buildProcessorPathManager +callDownNodeWiring +callDownWiringDescriptor chainPlacementcreate and add another Placement for this media object, thus increasingly constraining the (possible) position of this object. clearSessManagerclear current session contents
    without resetting overall session config.
    Afterwards, the session will contain only one
    empty EDL, while all Assets are retained.
    configureToolFactory @@ -67,12 +69,12 @@ saveSessManagercreate a complete, serialized representation
    of the current session config and contents.
    @todo how to serialize, prameters, return value? treatApplicable treatBuilderToolThis operation is to be overloaded for the specific MObject subclasses to be treated. -treatNodeCreatorTool treatNodeCreatorTool treatNodeCreatorTool +treatNodeCreatorTool treatNodeCreatorTool -treatSegmentationTool treatSegmentationTool +treatSegmentationTool treatSegmentationTool useFileFileProviderAnnounces that the application intends to use this file with mode (READ|WRITE|READWRITE) useTemporaryStorageFileProviderProvides a pool for interminate frames diff --git a/src/common/util.hpp b/src/common/util.hpp index 7f8704554..c71ba3b6a 100644 --- a/src/common/util.hpp +++ b/src/common/util.hpp @@ -237,4 +237,8 @@ namespace util * and we probably will enforce this design rule in future. */ #define INSTANCEOF(CLASS, EXPR) (dynamic_cast (EXPR)) +/** the inevitalbe MAX macro, sometimes still necessary in template code */ +#define MAX(A,B) (A < B) ? (B) : (A) + + #endif /*UTIL_HPP_*/ diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp index 2cd5eb09d..c8740def0 100644 --- a/src/proc/engine/nodeoperation.hpp +++ b/src/proc/engine/nodeoperation.hpp @@ -81,34 +81,86 @@ namespace engine { * defined in nodewiring.cpp actually drives the instantiation of all * those possible combinations */ - class InvocationStateBase + class StateAdapter : public State { - WiringDescriptor const& wiring_; - protected: State& parent_; State& current_; uint requiredOutputNr; - StateAdapter (State& callingProcess, WiringDescriptor const&) + StateAdapter (State& callingProcess) : parent_ (callingProcess), current_(callingProcess.getCurrentImplementation()) { } - friend class NodeWiring; // both are sharing implementation details... - - virtual State& getCurrentImplementation () { return current_; } }; + + struct BuffTable + { + BuffHandle *const outHandle; + BuffHandle *const inHandle; + BuffHandle::PBuff *const outBuff; + BuffHandle::PBuff *const inBuff; + }; + + + struct Invocation + { + WiringDescriptor const& wiring; + BuffTable& buffTab; + const uint outNr; + + protected: + Invocation (WiringDescriptor const& w, BuffTable& b, uint o) + : wiring(w), + buffTab(b), + outNr(o) + { } + }; + + + template + class InvocationImpl + : private StateAdapter, + private BuffTableStorage, + public Invocation + { + + protected: + InvocationImpl (State& callingProcess, WiringDescriptor const& w, const uint outCh) + : StateAdapter(callingProcess), + BuffTableStorage(w), + Invocation(w, static_cast(*this), outCh) + { } + + /** contains the details of Cache query and recursive calls + * to the predecessor node(s), eventually followed by the + * ProcNode::process() callback + */ + template + BuffHandle retrieve () + { + return Strategy::step (*this); + } + }; + + + + + class OperationBase + { + + }; template struct QueryCache : NEXT { BuffHandle - step () + step (Invocation& ivo) { BuffHandle fetched = this->current_.fetch ( this->genFrameID ( @@ -116,7 +168,7 @@ namespace engine { if (fetched) return fetched; else - return NEXT::step(); + return NEXT::step (ivo); } }; @@ -125,7 +177,7 @@ namespace engine { struct PullInput : NEXT { BuffHandle - step () + step (Invocation& ivo) { this->createBuffTable(); @@ -143,7 +195,7 @@ namespace engine { *(inH[i] = this->pullPredecessor(i)); // invoke predecessor // now Input #i is ready... } - return NEXT::step(); + return NEXT::step (ivo); } }; @@ -152,7 +204,7 @@ namespace engine { struct ReadSource : NEXT { BuffHandle - step () + step (Invocation& ivo) { this->createBuffTable(); @@ -171,7 +223,7 @@ namespace engine { *(inH[i] = outH[i] = this->getSource(i)); // TODO: how to access source nodes??? // now Input #i is ready... } - return NEXT::step(); + return NEXT::step (ivo); } }; @@ -180,7 +232,7 @@ namespace engine { struct AllocOutput { BuffHandle - step () + step (Invocation& ivo) { ASSERT (this->buffTab); ASSERT (this->nrO < this->buffTabSize()); @@ -193,7 +245,7 @@ namespace engine { *(outH[i] = allocateBuffer (i)); // now Output buffer for channel #i is available... } - return NEXT::step(); + return NEXT::step (ivo); } private: @@ -228,7 +280,7 @@ namespace engine { struct ProcessData { BuffHandle - step () + step (Invocation& ivo) { ASSERT (this->buffTab); ASSERT (this->nrO+this->nrI <= this->buffTabSize()); @@ -237,7 +289,7 @@ namespace engine { // Invoke our own process() function, providing the buffer array this->wiring_.processFunction (this->buffTab->buffers); - return NEXT::step(); + return NEXT::step (ivo); } }; @@ -245,13 +297,13 @@ namespace engine { struct FeedCache { BuffHandle - step () + step (Invocation& ivo) { // declare all Outputs as finished this->current_.isCalculated(this->buffTab->handles, this->nrO); - return NEXT::step(); + return NEXT::step (ivo); } }; @@ -259,7 +311,7 @@ namespace engine { struct ReleaseBuffers { BuffHandle - step () + step (Invocation& ivo) { // all buffers besides the required Output no longer needed this->current_.releaseBuffers(this->buffTab->handles, @@ -270,28 +322,6 @@ namespace engine { } }; - template - struct NoProcess - { - BuffHandle calculateResult(BuffHandle* calculated) - { - uint nrO = this->getNrO(); - for (uint i = 0; iretrieveInput(i); ///TODO: Null pointer when no caching!!!!! - this->outBuff[i] = current_.getBuffer(calculated[i]); - // now Buffer containing Output channel #i is available... - } - - this->feedCache(); - for (uint i=0; i < nrO; ++i) - if (i!=requiredOutputNr) - current_.releaseBuffer(i); - - return calculated[requiredOutputNr]; - }; - - }; @@ -314,13 +344,13 @@ namespace engine { template struct Strategy< Config > - : QueryCache < + : QueryCache< PullInput< AllocOutput, ProcessData< FeedCache< ReleaseBuffers< - InvocationStateBase > > > > > > + OperationBase > > > > > > { }; template @@ -329,14 +359,14 @@ namespace engine { AllocOutput, ProcessData< ReleaseBuffers< - InvocationStateBase > > > > + OperationBase > > > > { }; template<> struct Strategy< Config<> > : ReadSource< ReleaseBuffers< - InvocationStateBase > > + OperationBase > > { }; template<> @@ -348,28 +378,10 @@ namespace engine { AllocOutput, ProcessData< // wiring_.processFunction is supposed to do just buffer copying here ReleaseBuffers< - InvocationStateBase > > > > + OperationBase > > > > { }; - template - class StateAdapter - : Strategy - { - - protected: - - /** contains the details of Cache query and recursive calls - * to the predecessor node(s), eventually followed by the - * ProcNode::process() callback - */ - BuffHandle retrieve (uint outNr) - { - this->requiredOutputNr = outNr; - return Strategy::step (); - } - - }; } // namespace engine diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index aba017fde..1fc221bf6 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -25,6 +25,7 @@ #define ENGINE_NODEWIRINGCONFIG_H +#include "common/util.hpp" //#include #include @@ -121,11 +122,11 @@ namespace lumiera { { }; template class _PERM_> struct Combine,_PERM_> - : Distribute<_PERM_, Combine > + : Distribute<_PERM_, Combine > { }; template - struct FlagOnOff : Types::List + struct FlagOnOff : Types::List { }; template @@ -168,11 +169,11 @@ namespace lumiera { template struct DefineConfigByFlags; - template< char f1=0 - , char f2=0 - , char f3=0 - , char f4=0 - , char f5=0 + template< char f1 + , char f2 + , char f3 + , char f4 + , char f5 > struct DefineConfigByFlags< FlagTuple > : Config @@ -199,7 +200,7 @@ namespace lumiera { template struct FlagInfo, FLAGS> > { - enum{ BITS = max(ff, FlagInfo::BITS) + enum{ BITS = MAX(ff, FlagInfo::BITS) , CODE = (1<::CODE }; }; @@ -211,7 +212,7 @@ namespace lumiera { }; template - static FUNC::Ret + static typename FUNC::Ret accept (FUNC& functor) { return functor.done(); @@ -223,11 +224,11 @@ namespace lumiera { > > { typedef Node, FLAGS> ThisConfig; - enum{ BITS = max (FlagInfo::BITS, FlagInfo::BITS) + enum{ BITS = MAX (FlagInfo::BITS, FlagInfo::BITS) }; template - static FUNC::Ret + static typename FUNC::Ret accept (FUNC& functor) { functor.template visit(FlagInfo::CODE); @@ -271,14 +272,6 @@ namespace engine { typedef std::bitset Bits; - //////////////////////////////////TODO: noch nötig?? - template - Bits - getCaseRepresentation (CONF config) - { - return Bits (FlagInfo::CODE); - } - /** @@ -325,24 +318,25 @@ namespace engine { * the use of template metaprogramming for extracting all * currently defined StateProxy object configurations. */ - template class Factory> + template< template class Factory + , class PAR ///< ctor parameter of the Factories + , class RET ///< common base class of the Factory's products + > class ConfigSelector { - typedef typename Factory::Ret Ret; - typedef typename Factory::Param Param; struct FacFunctor { virtual ~FacFunctor() {} - virtual Ret invoke() =0; + virtual RET invoke() =0; }; template struct FactoryHolder : FacFunctor { FAC factory_; - FactroyHolder(Param p) : factory_(p) {} + FactoryHolder(PAR p) : factory_(p) {} - virtual Ret invoke () { return factory_(); } + virtual RET invoke () { return factory_(); } }; @@ -354,10 +348,10 @@ namespace engine { /** Helper: a visitor usable with FlagInfo */ struct FactoryTableBuilder { - Param ctor_param_; + PAR ctor_param_; ConfigTable& factories_; - FactoryTableBuilder (ConfigTable& tab, Param p) + FactoryTableBuilder (ConfigTable& tab, PAR p) : ctor_param_(p), factories_(tab) { } @@ -370,7 +364,7 @@ namespace engine { void visit (ulong code) { - typedef typename DefineConfigByFlags Config; + typedef DefineConfigByFlags Config; factories_[code].reset (new FactoryHolder > (ctor_param_)); } @@ -379,7 +373,7 @@ namespace engine { public: template - ConfigSelector(Param factory_ctor_param) + ConfigSelector(PAR factory_ctor_param) { FactoryTableBuilder buildTable(this->possibleConfig_, factory_ctor_param ); @@ -388,7 +382,7 @@ namespace engine { FlagInfo::accept (buildTable); } - Ret + RET operator() (Bits configFlags) ///< invoke the factory corresponding to the given config { return possibleConfig_[configFlags]->invoke(); diff --git a/src/proc/state.hpp b/src/proc/state.hpp index 7828398ed..2f047ee7a 100644 --- a/src/proc/state.hpp +++ b/src/proc/state.hpp @@ -34,7 +34,7 @@ namespace engine { - class StateAdapter; + class InvocationStateBase; struct BuffHandle { @@ -72,7 +72,7 @@ namespace engine { */ virtual State& getCurrentImplementation () =0; - friend class engine::StateAdapter; + friend class engine::InvocationStateBase; public: diff --git a/uml/lumiera/128389 b/uml/lumiera/128389 index 2a8c1a7c0..05bf51f89 100644 --- a/uml/lumiera/128389 +++ b/uml/lumiera/128389 @@ -1,6 +1,6 @@ format 40 "RenderEngine" // ProcessingLayer::RenderEngine - revision 16 + revision 17 modified_by 5 "hiv" // class settings //class diagram settings @@ -517,11 +517,6 @@ ${inlines} class 142469 "StateProxy" visibility package stereotype "implementation" - nformals 2 - formal name "WIRING" type "class" explicit_default_value "" - explicit_extends "" - formal name "POLICY" type "class" explicit_default_value "" - explicit_extends "" cpp_decl "${comment}${template}class ${name}${inherit} { ${members} }; @@ -539,22 +534,6 @@ ${inlines} b multiplicity "" parent class_ref 132741 // State end - classrelation 153221 // - relation 149765 ---|> - a public - cpp default "${type}" - classrelation_ref 153221 // - b multiplicity "" parent class_ref 143877 // InPlace - end - - classrelation 154117 // wiring () - relation 150661 ---> - a role_name "wiring" multiplicity "1" const_relation protected - cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; -" - classrelation_ref 154117 // wiring () - b multiplicity "" parent class_ref 144005 // WiringTable - end end class 142597 "StateAdapter" @@ -621,12 +600,30 @@ ${inlines} idl_decl "" explicit_switch_type "" + operation 136453 "callDown" + cpp_virtual public explicit_return_type "" + nparams 2 + param inout name "" type class_ref 132741 // State + param in name "requiredOutput" explicit_type "uint" + nexceptions 1 + exception class_ref 144133 // BuffHandle + cpp_decl " ${comment}${friend}${static}${inline}${virtual}${type} ${name} ${(}${)}${const}${volatile} ${throw}${abstract};" + cpp_def "${comment}${inline}${type} +${class}::${name} ${(}${)}${const}${volatile} ${throw}${staticnl} +{ + ${body} +} + +" + + + end end class 143365 "NodeWiring" visibility package nformals 1 - formal name "STATE" type "class" explicit_default_value "" + formal name "CONF" type "class" explicit_default_value "" explicit_extends "" cpp_decl "${comment}${template}class ${name}${inherit} { @@ -648,13 +645,74 @@ ${inlines} classrelation 153093 // relation 149637 -_-> a default - cpp default "Generated" + cpp default "#include in header" classrelation_ref 153093 // b multiplicity "" parent class_ref 142597 // StateAdapter end + + classrelation 156165 // + relation 152581 ---- + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156165 // + b role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156293 // + end + + classrelation 156421 // + relation 152709 ---- + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156421 // + b role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156549 // + end + + classrelation 156677 // + relation 152837 ---- + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156677 // + b role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156805 // + end + + classrelation 156933 // + relation 152965 ---> + stereotype "creates" + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156933 // + b multiplicity "" parent class_ref 144261 // Invocation + end + + operation 136581 "callDown" + public explicit_return_type "" + nparams 0 + cpp_decl " ${comment}${friend}${static}${inline}${virtual}${type} ${name} ${(}${)}${const}${volatile} ${throw}${abstract};" + cpp_def "${comment}${inline}${type} +${class}::${name} ${(}${)}${const}${volatile} ${throw}${staticnl} +{ + ${body} +} + +" + + + end end - class 143493 "InvocationStateBase" + class 143493 "OperationBase" visibility package cpp_decl "${comment}${template}class ${name}${inherit} { @@ -665,16 +723,9 @@ ${inlines} idl_decl "" explicit_switch_type "" - classrelation 153733 // - relation 150277 ---|> - a public - cpp default "${type}" - classrelation_ref 153733 // - b multiplicity "" parent class_ref 132741 // State - end end - class 143621 "Caching" + class 143621 "QueryCache" visibility package cpp_decl "${comment}${template}class ${name}${inherit} { @@ -685,16 +736,16 @@ ${inlines} idl_decl "" explicit_switch_type "" - classrelation 153605 // - relation 150149 ---|> + classrelation 157189 // + relation 153221 ---|> a public cpp default "${type}" - classrelation_ref 153605 // - b multiplicity "" parent class_ref 143493 // InvocationStateBase + classrelation_ref 157189 // + b multiplicity "" parent class_ref 143749 // PullInput end end - class 143749 "Process" + class 143749 "PullInput" visibility package cpp_decl "${comment}${template}class ${name}${inherit} { @@ -705,16 +756,28 @@ ${inlines} idl_decl "" explicit_switch_type "" - classrelation 153477 // - relation 150021 ---|> + classrelation 157317 // + relation 153349 ---|> a public cpp default "${type}" - classrelation_ref 153477 // - b multiplicity "" parent class_ref 143621 // Caching + classrelation_ref 157317 // + b multiplicity "" parent class_ref 144389 // ProcessData + end + + classrelation 158085 // + relation 154117 ---- + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 158085 // + b role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 158213 // end end - class 143877 "InPlace" + class 143877 "ReadSource" visibility package cpp_decl "${comment}${template}class ${name}${inherit} { @@ -725,16 +788,119 @@ ${inlines} idl_decl "" explicit_switch_type "" - classrelation 153349 // - relation 149893 ---|> + classrelation 157701 // + relation 153733 ---|> a public cpp default "${type}" - classrelation_ref 153349 // - b multiplicity "" parent class_ref 143749 // Process + classrelation_ref 157701 // + b multiplicity "" parent class_ref 143493 // OperationBase end end - class 144005 "WiringTable" + class 144389 "ProcessData" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 157445 // + relation 153477 ---|> + a public + cpp default "${type}" + classrelation_ref 157445 // + b multiplicity "" parent class_ref 144645 // FeedCache + end + + classrelation 157829 // + relation 153861 ---|> + a public + cpp default "${type}" + classrelation_ref 157829 // + b multiplicity "" parent class_ref 143493 // OperationBase + end + + classrelation 158213 // + relation_ref 154117 // + end + end + + class 144645 "FeedCache" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 157573 // + relation 153605 ---|> + a public + cpp default "${type}" + classrelation_ref 157573 // + b multiplicity "" parent class_ref 143493 // OperationBase + end + end + + class 144517 "Strategy" + visibility package + nformals 1 + formal name "CONF" type "class" explicit_default_value "" + explicit_extends "" + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 154757 // + relation 151301 ---|> + a public + cpp default "${type}" + classrelation_ref 154757 // + b multiplicity "" parent class_ref 143877 // ReadSource + end + + classrelation 156293 // + relation_ref 152581 // + end + + classrelation 156549 // + relation_ref 152709 // + end + + classrelation 156805 // + relation_ref 152837 // + end + + classrelation 157061 // + relation 153093 ---|> + a public + cpp default "${type}" + classrelation_ref 157061 // + b multiplicity "" parent class_ref 143621 // QueryCache + end + + classrelation 157957 // + relation 153989 ---|> + a public + cpp default "${type}" + classrelation_ref 157957 // + b multiplicity "" parent class_ref 143749 // PullInput + end + end + + class 144005 "BuffTable" visibility package nformals 1 formal name "SIZ" type "int" explicit_default_value "" @@ -780,5 +946,44 @@ ${inlines} explicit_switch_type "" end + + class 144261 "Invocation" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 155781 // + relation 152197 ---> + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 155781 // + b multiplicity "" parent class_ref 142597 // StateAdapter + end + + classrelation 155909 // + relation 152325 ---> + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 155909 // + b multiplicity "" parent class_ref 142725 // WiringDescriptor + end + + classrelation 156037 // + relation 152453 ---> + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 156037 // + b multiplicity "" parent class_ref 144005 // BuffTable + end + end end end diff --git a/uml/lumiera/128901 b/uml/lumiera/128901 index 455fee7d7..9a2bf5b90 100644 --- a/uml/lumiera/128901 +++ b/uml/lumiera/128901 @@ -1,6 +1,6 @@ format 40 "Builder" // ProcessingLayer::MObject::Builder - revision 16 + revision 17 modified_by 5 "hiv" // class settings //class diagram settings diff --git a/uml/lumiera/129285 b/uml/lumiera/129285 index 246c9e4d6..1441c4bdf 100644 --- a/uml/lumiera/129285 +++ b/uml/lumiera/129285 @@ -1,6 +1,6 @@ format 40 "ProcessingLayer" // ProcessingLayer - revision 21 + revision 22 modified_by 5 "hiv" // class settings //class diagram settings diff --git a/uml/lumiera/131973.diagram b/uml/lumiera/131973.diagram index 4b7003a43..dda416518 100644 --- a/uml/lumiera/131973.diagram +++ b/uml/lumiera/131973.diagram @@ -14,7 +14,7 @@ classcanvas 129669 class_ref 133253 // Frame end classcanvas 131845 class_ref 142469 // StateProxy draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 126 211 2000 + xyz 126 220 2000 end classcanvas 131973 class_ref 142597 // StateAdapter draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default @@ -22,11 +22,13 @@ classcanvas 131973 class_ref 142597 // StateAdapter end classcanvas 132357 class_ref 142725 // WiringDescriptor draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 229 497 2000 + hidden_operations + operation_ref 136453 // callDown + xyz 229 498 2000 end classcanvas 135045 class_ref 143365 // NodeWiring draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 241 568 2000 + xyz 241 561 2000 end textcanvas 135685 "determines concrete Type" xyzwh 100 594 2004 130 18 @@ -37,15 +39,15 @@ relationcanvas 129797 relation_ref 134533 // no_multiplicity_a multiplicity_b_pos 173 109 3000 relationcanvas 132101 relation_ref 148869 // geometry VHV unfixed - from ref 131973 z 1999 to point 78 181 - line 134021 z 1999 to point 118 181 + from ref 131973 z 1999 to point 78 186 + line 134021 z 1999 to point 118 186 line 134149 z 1999 to ref 128517 no_role_a no_role_b no_multiplicity_a no_multiplicity_b relationcanvas 132229 relation_ref 148997 // geometry VHV - from ref 131845 z 1999 to point 178 181 - line 134277 z 1999 to point 118 181 + from ref 131845 z 1999 to point 178 186 + line 134277 z 1999 to point 118 186 line 134405 z 1999 to ref 128517 no_role_a no_role_b no_multiplicity_a no_multiplicity_b @@ -53,13 +55,13 @@ relationcanvas 132485 relation_ref 149125 // geometry HV from ref 128005 z 1999 stereotype "<>" xyz 205 454 3000 to point 277 452 line 133381 z 1999 to ref 132357 - role_a_pos 289 472 3000 no_role_b - multiplicity_a_pos 265 472 3000 no_multiplicity_b + role_a_pos 289 473 3000 no_role_b + multiplicity_a_pos 265 473 3000 no_multiplicity_b relationcanvas 133509 relation_ref 149253 // from ref 131973 z 1999 to point 178 312 line 133637 z 1999 to ref 131845 - role_a_pos 190 302 3000 no_role_b - multiplicity_a_pos 164 302 3000 no_multiplicity_b + role_a_pos 190 293 3000 no_role_b + multiplicity_a_pos 164 293 3000 no_multiplicity_b relationcanvas 134533 relation_ref 149381 // from ref 131973 z 3004 to ref 129669 no_role_a no_role_b diff --git a/uml/lumiera/132357.diagram b/uml/lumiera/132357.diagram index a097c7137..5a7ffa76a 100644 --- a/uml/lumiera/132357.diagram +++ b/uml/lumiera/132357.diagram @@ -1,81 +1,172 @@ format 40 -classcanvas 128005 class_ref 132741 // State +classcanvas 128133 class_ref 143493 // OperationBase draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 78 10 2000 + xyz 232 13 2000 end -classcanvas 128133 class_ref 143493 // InvocationStateBase +classcanvas 128261 class_ref 143621 // QueryCache draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 203 104 2000 + xyz 186 252 2000 end -classcanvas 128261 class_ref 143621 // Caching +classcanvas 128517 class_ref 143877 // ReadSource draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 235 157 2000 + xyz 297 165 2000 end -classcanvas 128389 class_ref 143749 // Process +classcanvas 130309 class_ref 144005 // BuffTable draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 236 212 2000 - end -classcanvas 128517 class_ref 143877 // InPlace - draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 238 268 2000 - end -classcanvas 128645 class_ref 142469 // StateProxy - draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 209 332 2004 - end -classcanvas 130309 class_ref 144005 // WiringTable - draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 101 298 2000 + xyz 100 508 2000 end classcanvas 130437 class_ref 142725 // WiringDescriptor draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 36 213 2005 + xyz 82 319 2005 end classcanvas 130565 class_ref 144133 // BuffHandle draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 36 379 2000 + xyz 169 563 2000 end textcanvas 131461 "const" - xyzwh 109 257 2010 29 18 -relationcanvas 128901 relation_ref 149765 // - from ref 128645 z 1999 to ref 128517 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b -relationcanvas 129029 relation_ref 149893 // - from ref 128517 z 1999 to ref 128389 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b -relationcanvas 129157 relation_ref 150021 // - from ref 128389 z 1999 to ref 128261 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b -relationcanvas 129285 relation_ref 150149 // - from ref 128261 z 1999 to ref 128133 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b -relationcanvas 129413 relation_ref 150277 // - from ref 128133 z 1999 to point 260 69 - line 129925 z 1999 to point 190 69 - line 130181 z 1999 to point 161 176 - line 130053 z 1999 to point 118 176 - line 129797 z 1999 to ref 128005 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b + xyzwh 101 388 2010 29 18 +classcanvas 131717 class_ref 144261 // Invocation + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + color lightorange + xyz 31 439 2000 + end +classcanvas 131845 class_ref 143365 // NodeWiring + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 222 423 2005 + end +classcanvas 131973 class_ref 142597 // StateAdapter + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 25 230 2005 + end +classcanvas 132357 class_ref 144389 // ProcessData + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 186 140 2015 + end +classcanvas 132997 class_ref 144517 // Strategy + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 199 319 3010 + end +classcanvas 133253 class_ref 144517 // Strategy + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 301 301 2005 + end +classcanvas 134021 class_ref 144645 // FeedCache + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 190 80 2010 + end +classcanvas 134533 class_ref 144389 // ProcessData + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 238 125 2004 + end +classcanvas 134661 class_ref 144517 // Strategy + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 250 309 3005 + end +textcanvas 137477 "as configured" + xyzwh 308 376 3010 68 18 +classcanvas 137733 class_ref 143749 // PullInput + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 194 198 2010 + end +classcanvas 137861 class_ref 143749 // PullInput + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 247 184 2005 + end +textcanvas 139781 "Policy Classes" + xyzwh 163 50 2005 81 21 relationcanvas 130693 relation_ref 150405 // geometry VHr - from ref 130309 z 1999 stereotype "<>" xyz 43 309 3000 to point 70 326 + from ref 130309 z 1999 stereotype "<>" xyz 177 517 3000 to point 203 536 line 130821 z 1999 to ref 130565 no_role_a no_role_b - multiplicity_a_pos 45 354 3000 no_multiplicity_b + multiplicity_a_pos 211 537 3000 no_multiplicity_b relationcanvas 130949 relation_ref 150533 // from ref 130309 z 1999 to ref 130437 no_role_a no_role_b no_multiplicity_a no_multiplicity_b -relationcanvas 131077 relation_ref 150661 // - geometry VHr - from ref 128645 z 1999 to point 136 371 - line 131333 z 1999 to ref 130309 - role_a_pos 148 367 3000 no_role_b - multiplicity_a_pos 122 359 3000 no_multiplicity_b +relationcanvas 132229 relation_ref 149509 // + from ref 131845 z 2004 to point 219 401 + line 137605 z 2004 to point 162 401 + line 137221 z 2004 to ref 130437 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 133381 relation_ref 151301 // + from ref 133253 z 1999 to point 333 274 + line 137349 z 1999 to ref 128517 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 135685 relation_ref 152197 // + from ref 131717 z 1999 to ref 131973 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 135813 relation_ref 152325 // + from ref 131717 z 1999 to ref 130437 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 135941 relation_ref 152453 // + geometry VH + from ref 131717 z 1999 to point 63 536 + line 137093 z 1999 to ref 130309 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 136069 relation_ref 152581 // + from ref 131845 z 2004 to ref 132997 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 136197 relation_ref 152709 // + from ref 131845 z 2004 to ref 134661 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 136325 relation_ref 152837 // + from ref 131845 z 2004 to ref 133253 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 136453 relation_ref 152965 // + from ref 131845 z 1999 stereotype "<>" xyz 145 441 3000 to ref 131717 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 137989 relation_ref 153093 // + from ref 132997 z 1999 to point 222 316 + line 139653 z 1999 to ref 128261 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 138117 relation_ref 153221 // + from ref 128261 z 1999 to ref 137733 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 138245 relation_ref 153349 // + from ref 137733 z 2009 to ref 132357 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 138373 relation_ref 153477 // + from ref 132357 z 2009 to ref 134021 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 138501 relation_ref 153605 // + geometry VHV unfixed + from ref 134021 z 1999 to point 223 68 + line 138885 z 1999 to point 275 68 + line 139013 z 1999 to ref 128133 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 138629 relation_ref 153733 // + geometry VHV unfixed + from ref 128517 z 1999 to point 333 68 + line 139141 z 1999 to point 275 68 + line 139269 z 1999 to ref 128133 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 138757 relation_ref 153861 // + from ref 134533 z 1999 to ref 128133 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 139397 relation_ref 153989 // + from ref 134661 z 2004 to ref 137861 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 139525 relation_ref 154117 // + from ref 137861 z 2003 to ref 134533 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b end diff --git a/uml/lumiera/5.session b/uml/lumiera/5.session index 1a789da17..e24c87ad6 100644 --- a/uml/lumiera/5.session +++ b/uml/lumiera/5.session @@ -1,22 +1,32 @@ -window_sizes 1140 830 270 860 680 71 +window_sizes 1302 1004 270 1022 854 71 diagrams classdiagram_ref 131973 // Render Mechanics - 428 623 100 4 2 0 + 407 690 100 4 2 0 collaborationdiagram_ref 132229 // Render Process - 817 644 100 4 0 0 + 825 684 100 4 0 0 active classdiagram_ref 132357 // StateAdapter composition - 418 520 100 4 0 0 + 414 658 100 4 0 0 end show_stereotypes selected -package_ref 129 // lumiera + package_ref 129 // lumiera open class_ref 132741 // State -package_ref 129029 // Controller + package_ref 129029 // Controller class_ref 131717 // ProcNode class_ref 142469 // StateProxy class_ref 142597 // StateAdapter + class_ref 142725 // WiringDescriptor + class_ref 143365 // NodeWiring + class_ref 143621 // QueryCache + class_ref 143749 // PullInput + class_ref 143877 // ReadSource + class_ref 144389 // ProcessData + class_ref 144645 // FeedCache + class_ref 144517 // Strategy + class_ref 144005 // BuffTable + class_ref 144261 // Invocation usecaseview_ref 128005 // Renderengine Use class_ref 140677 // QueryHandler class_ref 140805 // TypeHandler diff --git a/uml/lumiera/lumiera.prj b/uml/lumiera/lumiera.prj index 2238424c2..a533da6cc 100644 --- a/uml/lumiera/lumiera.prj +++ b/uml/lumiera/lumiera.prj @@ -1,6 +1,6 @@ format 40 "lumiera" - revision 47 + revision 48 modified_by 5 "hiv" cpp_root_dir "../../src/" diff --git a/wiki/renderengine.html b/wiki/renderengine.html index 6384ef114..51956bb30 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -900,12 +900,12 @@ at the lowest level within the builder there is the step of building a //connect &rarr;see also: BuilderPrimitives for the elementary working situations corresponding to each of these [[builder moulds|BuilderMould]] -
    +
    Background: #fefefd
     Foreground: #000
     PrimaryPale: #8fb
    -PrimaryLight: #50d2ae
    -PrimaryMid: #1b9989
    +PrimaryLight: #4dc9a7
    +PrimaryMid: #16877a
     PrimaryDark: #0f3f56
     SecondaryPale: #ffc
     SecondaryLight: #fe8
    @@ -3043,7 +3043,7 @@ At first sight the link between asset and clip-MO is a simple logical relation b
     [img[Entities comprising the Render Engine|uml/fig128389.png]]
     
    -
    +
    Below are some notes regarding details of the actual implementation of the render process and processing node operation. In the description of the [[render node operation protocol|NodeOperationProtocol]] and the [[mechanics of the render process|RenderMechanics]], these details were left out deliberately.
     
     !Layered structure of State
    @@ -3059,18 +3059,19 @@ Some data processors simply require to work on multiple channels simultanously,
     [>img[uml/fig132357.png]]
     Every node is actually decomposed into three parts
     * an interface container of a ProcNode subclass
    -* an {{{const}}} WiringDescriptor, which is actually parametrized to a subtype encoding details of the intended operation
    -* an StateAdapter object created on the stack for each {{{pull()}}} call and configured specifically for the intended operation
    -Thus, the outer container can be changed polymorphically to support the different kinds of nodes (large-scale view). The actual wiring of the nodes is contained in the WiringDescriptor, including the {{{process()}}} function pointer. Additionally, this WiringDescriptor knows the actual type of the StateAdapter to create, and this actual type has been chosen by the builder such as to select details of the desired operation of this mode, for example caching / no caching or maybe ~OpenGL rendering or the special case of a node pulling directly from a source reader. Most of this configuration is done by selecting the right template specialisation within the builder; thus in the critical path most of the calls can be inlined
    +* an {{{const}}} WiringDescriptor, which is actually parametrized to a subtype encoding details of how to carry out the intended operation
    +* the Invocation state created on the stack for each {{{pull()}}} call. It is comprised of references to an StateAdapter object  and the current overall process state, the WiringDescriptor, and finally a table of suitable buffer handles
    +Thus, the outer container can be changed polymorphically to support the different kinds of nodes (large-scale view). The actual wiring of the nodes is contained in the WiringDescriptor, including the {{{process()}}} function pointer. Additionally, this WiringDescriptor knows the actual type of the operation Strategy, and this actual type has been chosen by the builder such as to select details of the desired operation of this node, for example caching / no caching or maybe ~OpenGL rendering or the special case of a node pulling directly from a source reader. Most of this configuration is done by selecting the right template specialisation within the builder; thus in the critical path most of the calls can be inlined
     
    -!!!! composing the actual StateAdapter
    -As shown in the class diagram to the right, the actual implementation is assembled by chaining together the various policy classes governing parts of the node operation, like Caching, in-Place calculation capability, etc. (&rarr; see [[here|StateAdapter]] for details). The rationale is that we can allocate at runtime a StateProxy object directly on the stack with the necessary buffer table size and an precisely tailored and mostly inlined implementation of the call sequence for "calculating the predecessor nodes". We //do employ//&nbsp; some virtual calls for the buffer management in order to avoid coupling the policy classes to the actual number of in/out buffers. (As of 6/2008, this is mainly a precaution to be able to control the number of generated template instances. If we ever get in the region of several hundred individual specialisations, we'd need to separate out the allocation of the "wiring table" into a hand-made stack-like buffer allocated from the heap.)
    +!!!! composing the actual operation Strategy
    +As shown in the class diagram to the right, the actual implementation is assembled by chaining together the various policy classes governing parts of the node operation, like Caching, in-Place calculation capability, etc. (&rarr; see [[here|WiringDescriptor]] for details). The rationale is that the variable part of the Invocation data is allocated at runtime directly on the stack, while a precisely tailored call sequence for "calculating the predecessor nodes" can be defined out of a bunch of simple building blocks. This helps avoiding "spaghetti code", which would be especially dangerous because of the large number of different execution paths to get right. Additionally, a nice side effect of this implementation technique is that a good deal of the implementation is eligible to inlining.
    +We //do employ//&nbsp; some virtual calls for the buffer management in order to avoid coupling the policy classes to the actual number of in/out buffers. (As of 6/2008, this is mainly a precaution to be able to control the number of generated template instances. If we ever get in the region of several hundred individual specialisations, we'd need to separate out the allocation of the "buffer table" into a hand-made stack-like buffer allocated from the heap.)
     
     !Rules for buffer allocation and freeing
     * only output buffers are allocated. It is //never necessary//&nbsp; to allocate input buffers!
     * buffers are to be allocated as late as possible, typically just before invoking {{{process()}}}
    -* buffers are allways allocated by calling to the preceeding StateAdapter in the callstack ("parent stae"), because of the possibility to write to cache.
    -* {{{pull()}}} returns the buffer-ID of the single output requested by this call. Using this ID, the caller may retrieve the actual buffer holding the result from the "current state" StaeProxy.
    +* buffers are allways allocated by calling to the preceeding StateAdapter in the callstack ("parent stae"), because of the possibility of writing the result to cache.
    +* {{{pull()}}} returns a handle for the single output requested by this call. Using this ID, the caller may retrieve the actual buffer holding the result from the "current state" StaeProxy.
     * any other buffers filled with results in the course of the same {{{process()}}} call can be released immediately before returning from the {{{pull()}}}
     * similar, and input buffers are to be released immediately after the {{{process()}}} call, but before returing from this {{{pull()}}}
     * buffers are allways released by calling to the "current state" (which is a StateProxy), providing the buffer-ID to be released
    @@ -3246,32 +3247,8 @@ if (oldText.indexOf("SplashScreen")==-1)
     }
     //}}}
    -
    -
    A small (in terms of storage) and specifically configured StateProxy object which is created on the stack for each individual {{{pull()}}} call. The actual type of this object is composed out of several building blocks (policy classes) and placed by the builder as a template parameter on the WiringDescriptor of the individual ProcNode. This happens in the WiringFactory in file {{{nodewiring.cpp}}}, which consequently contains all the possible combinations (pre)generated at compile time.
    -
    -!building blocks
    -* ''Caching'': whether the result frames of this processing step will be communicated to the Cache and thus could be fetched from there instead of actually calculating them.
    -* ''Process'': whether this node does any calculations on it's own or just pulls from a source
    -* ''Inplace'': whether this node is capable of processing the result "in-place", thereby overwriting the input buffer
    -* ''Multiout'': whether this node produces multiple output channels/frames in one processing step
    -
    -!!implementation
    -!!!!Caching
    -When a node participates in ''caching'', a result frame may be pulled immediately from cache instead of calculating it. Moreover, //any output buffer//&nbsp; of this node will be allocated //within the cache.// Consequently, caching interferes with the ability of the next node to calculate "in-Place". In the other case, when ''not using the cache'', the {{{pull()}}} call immediately starts out with calling down to the predecessor nodes, and the allocation of output buffer(s) is always delegated to the parent state (i.e. the StateProxy pulling results from this node). 
    -
    -Generally, buffer allocation requests from predecessor nodes (while being pulled by this node) will either be satisfied by using the "current state", or treated as if they were our own output buffers when this node is in-Place capable.
    -
    -!!!!Multiple Outputs
    -Some simplifications are possible in the default case of a node producing just ''one single output'' stream. Otherwise, we'd have to allocate multiple output buffers, and then, after processing, select the one needed as a result and deallocate the superfluous further buffers.
    -
    -!!!!in-Place capability
    -If a node is capable of calculating the result by ''modifying it's input'' buffer(s), an important performance optimization is possible, because in a chain of in-place capable nodes, we don't need any buffer allocations. But, on the other hand, this optimization may collide with the caching, because a frame retrieved from cache must not be modified.
    -Without this optimization, in the base case each processing needs an input and an output. Exceptionally, we could think of special nodes which //require// to process in-place, in which case we'd need to provide a copy of the input buffer to work on under certain circumstances. 
    -
    -!!!!Processing
    -If ''not processing'' we don't have any input buffers, instead we get our output buffers from an external source.
    -Otherwise, in the default case of actually ''processing'' out output, we have to organize input buffers, allocate output buffers, call the {{{process()}}} function of the WiringDescriptor and finally release the input buffers.
    -
    +
    +
    A small (in terms of storage) and specifically configured StateProxy object which is created on the stack for each individual {{{pull()}}} call. It is part of the invocation state of such a call and participates in the buffer management. Thus, in a calldown sequence of {{{pull()}}} calls we get a corresponding sequence of "parent" states. At each level, the &rarr; WiringDescriptor of the respective node defines a Strategy how the call is passed on.
    An Object representing a //Render Process// and containing associated state information.
    @@ -4648,6 +4625,33 @@ In case it's not already clear: we don't have "the" Render Engine, rat
     The &raquo;current setup&laquo; of the objects in the EDL is sort of a global state. Same holds true for the Controller, as the Engine can be at playback, it can run a background render or scrub single frames. But the whole complicated subsystem of the Builder and one given Render Engine configuration can be made ''stateless''. As a benefit of this we can run this subsystems multi-threaded without the need of any precautions (locking, synchronizing). Because all state information is just passed in as function parameters and lives in local variables on the stack, or is contained in the StateProxy which represents the given render //process// and is passed down as function parameter as well. (note: I use the term "stateless" in the usual, slightly relaxed manner; of course there are some configuration values contained in instance variables of the objects carrying out the calculations, but this values are considered to be constant over the course of the object usage).
     
    +
    +
    Each [[processing node|ProcNode]] contains a stateless ({{{const}}}) descriptor detailing the inputs, outputs and predecessors. Moreover, this descriptor contains the configuration of the call sequence yielding the &raquo;data pulled from predecessor(s)&laquo;. The actual type of this object is composed out of several building blocks (policy classes) and placed by the builder as a template parameter on the WiringDescriptor of the individual ProcNode. This happens in the WiringFactory in file {{{nodewiring.cpp}}}, which consequently contains all the possible combinations (pre)generated at compile time.
    +
    +!building blocks
    +* ''Caching'': whether the result frames of this processing step will be communicated to the Cache and thus could be fetched from there instead of actually calculating them.
    +* ''Process'': whether this node does any calculations on it's own or just pulls from a source
    +* ''Inplace'': whether this node is capable of processing the result "in-place", thereby overwriting the input buffer
    +* ''Multiout'': whether this node produces multiple output channels/frames in one processing step
    +
    +!!implementation
    +!!!!Caching
    +When a node participates in ''caching'', a result frame may be pulled immediately from cache instead of calculating it. Moreover, //any output buffer//&nbsp; of this node will be allocated //within the cache.// Consequently, caching interferes with the ability of the next node to calculate "in-Place". In the other case, when ''not using the cache'', the {{{pull()}}} call immediately starts out with calling down to the predecessor nodes, and the allocation of output buffer(s) is always delegated to the parent state (i.e. the StateProxy pulling results from this node). 
    +
    +Generally, buffer allocation requests from predecessor nodes (while being pulled by this node) will either be satisfied by using the "current state", or treated as if they were our own output buffers when this node is in-Place capable.
    +
    +!!!!Multiple Outputs
    +Some simplifications are possible in the default case of a node producing just ''one single output'' stream. Otherwise, we'd have to allocate multiple output buffers, and then, after processing, select the one needed as a result and deallocate the superfluous further buffers.
    +
    +!!!!in-Place capability
    +If a node is capable of calculating the result by ''modifying it's input'' buffer(s), an important performance optimization is possible, because in a chain of in-place capable nodes, we don't need any buffer allocations. But, on the other hand, this optimization may collide with the caching, because a frame retrieved from cache must not be modified.
    +Without this optimization, in the base case each processing needs an input and an output. Exceptionally, we could think of special nodes which //require// to process in-place, in which case we'd need to provide it with a copy of the input buffer to work on. 
    +
    +!!!!Processing
    +If ''not processing'' we don't have any input buffers, instead we get our output buffers from an external source.
    +Otherwise, in the default case of actually ''processing'' out output, we have to organize input buffers, allocate output buffers, call the {{{process()}}} function of the WiringDescriptor and finally release the input buffers.
    +
    +
    The purpose of automation is to vary a parameter of some data processing instance in the course of time while rendering. Thus, automation encompasses all the variability within the render network //which is not a structural change.//
     
    
    From 63d5684c12883242c68b65178ef2e8156ffe96ae Mon Sep 17 00:00:00 2001
    From: Ichthyostega 
    Date: Wed, 16 Jul 2008 05:09:04 +0200
    Subject: [PATCH 07/80] WIP continued with refactoring the Invocation
    
    ---
     src/common/frameid.hpp            |  56 +++++++++++++++
     src/proc/engine/buffhandle.cpp    |  32 +++++++++
     src/proc/engine/buffhandle.hpp    | 111 ++++++++++++++++++++++++++++++
     src/proc/engine/nodeoperation.hpp |  73 +++++++++++++-------
     src/proc/engine/nodewiring.hpp    |   7 ++
     src/proc/engine/procnode.hpp      |   3 +
     src/proc/state.hpp                |  55 ++++++++-------
     7 files changed, 290 insertions(+), 47 deletions(-)
     create mode 100644 src/common/frameid.hpp
     create mode 100644 src/proc/engine/buffhandle.cpp
     create mode 100644 src/proc/engine/buffhandle.hpp
    
    diff --git a/src/common/frameid.hpp b/src/common/frameid.hpp
    new file mode 100644
    index 000000000..9cb95eb37
    --- /dev/null
    +++ b/src/common/frameid.hpp
    @@ -0,0 +1,56 @@
    +/*
    +  FRAMEID.hpp  -  distinct identification of a single data frame
    + 
    +  Copyright (C)         Lumiera.org
    +    2008,               Hermann Vosseler 
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +*/
    +
    +
    +#ifndef LUMIERA_FRAMEID_H
    +#define LUMIERA_FRAMEID_H
    +
    +
    +
    +namespace lumiera
    +  {
    +
    +
    +  /**
    +   * Identification tuple for addressing frames unambiguosly.
    +   * 
    +   * @todo currently (7/08) this is a dummy implementation to find out
    +   *       what interface the Proc layer needs. Probably the backend will
    +   *       later on define what is actually needed; this header should then
    +   *       be replaced by a combined C/C++ header
    +   */
    +  class FrameID : boost::totally_ordered
    +    {
    +      long dummy;
    +    public:
    +      FrameID(long dum=0) : dummy(dum) {}
    +      operator long () { return dummy; }
    +      
    +      bool operator<  (const FrameID& of)  const { return dummy <  of.dummy; }
    +      bool operator== (const FrameID& of)  const { return dummy == of.dummy; }
    +    };
    +    
    +  
    +
    +   
    +} // namespace lumiera
    +#endif
    diff --git a/src/proc/engine/buffhandle.cpp b/src/proc/engine/buffhandle.cpp
    new file mode 100644
    index 000000000..30ae603e2
    --- /dev/null
    +++ b/src/proc/engine/buffhandle.cpp
    @@ -0,0 +1,32 @@
    +/*
    +  BuffHandle  -  Buffer handling support for the render engine
    + 
    +  Copyright (C)         Lumiera.org
    +    2008,               Hermann Vosseler 
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +* *****************************************************/
    +
    +
    +#include "proc/engine/buffhandle.hpp"
    +
    +namespace engine {
    +
    +
    +  /**  */
    +
    +
    +} // namespace engine
    diff --git a/src/proc/engine/buffhandle.hpp b/src/proc/engine/buffhandle.hpp
    new file mode 100644
    index 000000000..d72ff7193
    --- /dev/null
    +++ b/src/proc/engine/buffhandle.hpp
    @@ -0,0 +1,111 @@
    +/*
    +  BUFFHANDLE.hpp  -  Buffer handling support for the render engine
    + 
    +  Copyright (C)         Lumiera.org
    +    2008,               Hermann Vosseler 
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +*/
    +
    +/** @file procnode.hpp
    + ** Interface to the processing nodes and the render nodes network.
    + **
    + ** Actually, there are three different interfaces to consider
    + ** - the ProcNode#pull is the invocation interface. It is call-style (easily callable by C)
    + ** - the builder interface, comprised by the NodeFactory and the WiringFactory. It's C++ (using templates)
    + ** - the actual processing function is supposed to be a C function; it uses a set of C functions 
    + **   for accessing the frame buffers with the data to be processed.
    + **
    + ** By using the builder interface, concrete node and wiring descriptor classes are created,
    + ** based on some templates. These concrete classes form the "glue" to tie the node network
    + ** together and contain much of the operation beahviour in a hard wired fashion.
    + **
    + ** @see nodefactory.hpp
    + ** @see operationpoint.hpp
    + */
    +
    +#ifndef ENGINE_BUFFHANDLE_H
    +#define ENGINE_BUFFHANDLE_H
    +
    +
    +//#include "proc/mobject/parameter.hpp"
    +
    +//#include 
    +
    +
    +
    +namespace engine {
    +
    +//  using std::vector;
    +  
    +  
    +  /**
    +   * Handle for a buffer for processing data, abstracting away the actual implementation.
    +   * The real buffer pointer can be retrieved by dereferencing this smart-handle class.
    +   */
    +  struct BuffHandle
    +    {
    +      typedef float Buff;
    +      typedef Buff* PBuff;//////TODO define the Buffer type(s)
    +      
    +      PBuff 
    +      operator->() const 
    +        { 
    +          return pBuffer_; 
    +        }
    +      Buff&
    +      operator* () const
    +        {
    +          ENSURE (pBuffer_);
    +          return *pBuffer_;
    +        }
    +      
    +    protected:
    +      PBuff pBuffer_; 
    +      long sourceID_;
    +    };
    +  
    +  
    +  /**
    +   * Buffer Type information.
    +   * Given a BufferDescriptor, it is possible to allocate a buffer
    +   * of suitable size and type by using State::allocateBuffer().
    +   */
    +  struct BufferDescriptor
    +    {
    +      char typeID_; ///////TODO define the Buffer type(s)
    +    };
    +  
    +  
    +    /** 
    +     * Tables of buffer handles and corresponding dereferenced buffer pointers.
    +     * Used within the invocation of a processing node to calculate data.
    +     * The tables are further differentiated into input data buffers and output
    +     * data buffers. The tables are supposed to be implemented as bare "C" arrays,
    +     * thus the array of real buffer pointers can be fed directly to any processing
    +     * function
    +     */
    +  struct BuffTable
    +    {
    +      BuffHandle        *const outHandle;
    +      BuffHandle        *const inHandle;
    +      BuffHandle::PBuff *const outBuff;
    +      BuffHandle::PBuff *const inBuff;
    +    };
    +  
    +  
    +} // namespace engine
    +#endif
    diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp
    index c8740def0..86a41e896 100644
    --- a/src/proc/engine/nodeoperation.hpp
    +++ b/src/proc/engine/nodeoperation.hpp
    @@ -52,7 +52,9 @@
     #define ENGINE_NODEOPERATION_H
     
     
    +#include "proc/state.hpp"
     #include "proc/engine/procnode.hpp"
    +#include "proc/engine/buffhandle.hpp"
     #include "proc/engine/nodewiringconfig.hpp"
     #include "lib/appconfig.hpp"
     
    @@ -88,8 +90,6 @@ namespace engine {
           State& parent_;
           State& current_;
           
    -      uint requiredOutputNr;
    -
           StateAdapter (State& callingProcess) 
             : parent_ (callingProcess),
               current_(callingProcess.getCurrentImplementation())
    @@ -97,44 +97,71 @@ namespace engine {
           
           virtual State& getCurrentImplementation () { return current_; }
           
    +      
    +    public: /* === proxying the State interface === */
    +      
    +      virtual void releaseBuffer (BuffHandle& bh)       { current_.releaseBuffer (bh); }
    +      
    +      virtual void is_calculated (BuffHandle const& bh) { current_.is_calculated (bh); }
    +      
    +      virtual BuffHandle fetch (FrameID const& fID)     { return current_.fetch (fID); }
    +      
    +      
    +      // note: allocateBuffer()  is choosen specifically based on the actual node wiring
    +      
         };
       
    -  struct BuffTable
    -    {
    -      BuffHandle        *const outHandle;
    -      BuffHandle        *const inHandle;
    -      BuffHandle::PBuff *const outBuff;
    -      BuffHandle::PBuff *const inBuff;
    -    };
    -  
    +    
       
       struct Invocation
    +    : StateAdapter
         {
           WiringDescriptor const& wiring;
           BuffTable& buffTab;
           const uint outNr;
           
         protected:
    -      Invocation (WiringDescriptor const& w, BuffTable& b, uint o)
    -        : wiring(w),
    +      Invocation (State& callingProcess, WiringDescriptor const& w, BuffTable& b, uint o)
    +        : StateAdapter(callingProcess),
    +          wiring(w),
               buffTab(b),
               outNr(o)
             { }
         };
    -  
    -  
    +
       template
    +  class BuffTableStorage
    +    : public BuffTable
    +    {
    +      BuffHandle hTab_[SZ];
    +      BuffHandle::PBuff pTab_[SZ];
    +      
    +    protected:
    +      BuffTableStorage (WiringDescriptor const& wd)
    +        {
    +          const uint nrI = wd.getNrI();
    +          const uint nrO = wd.getNrO();
    +          REQUIRE (nrI+nrO <= SZ);
    +          
    +          this->outHandle = &hTab_[0];
    +          this->inHandle  = &hTab_[nrO];
    +          this->outBuff   = &pTab_[0];
    +          this->inBuff    = &pTab_[nrO];
    +        }
    +    };
    +  
    +  
    +  
    +  template /////////////////TODO: rather template on the BufferProvider
       class InvocationImpl
    -    : private StateAdapter,
    -      private BuffTableStorage,
    +    : private BuffTableStorage,
           public Invocation
         {
     
         protected:
           InvocationImpl (State& callingProcess, WiringDescriptor const& w, const uint outCh)
    -        : StateAdapter(callingProcess),
    -          BuffTableStorage(w),
    -          Invocation(w, static_cast(*this), outCh)
    +        : BuffTableStorage(w),
    +          Invocation(callingProcess, w, static_cast(*this), outCh)
             { }
           
           /** contains the details of Cache query and recursive calls
    @@ -266,13 +293,13 @@ namespace engine {
       template<>
       struct OutBuffSource
         {
    -      State& getBufferProvider (InvocationStateBase& thisState) { return thisState.parent_; }
    +      static State& getBufferProvider (Invocation& thisState) { return thisState.parent_; }
         };
       
       template<>
       struct OutBuffSource
         {
    -      State& getBufferProvider (InvocationStateBase& thisState) { return thisState.current_; }
    +      static State& getBufferProvider (Invocation& thisState) { return thisState.current_; }
         };
       
       
    @@ -331,7 +358,7 @@ namespace engine {
       struct Strategy ;
     
       
    -  template
    +  template
       struct SelectBuffProvider;
       
       template<> struct SelectBuffProvider         : OutBuffSource { };
    @@ -354,7 +381,7 @@ namespace engine {
         { };
       
       template
    -  struct Strategy< Config >
    +  struct Strategy< Config >
         : PullInput<
            AllocOutput,
             ProcessData<
    diff --git a/src/proc/engine/nodewiring.hpp b/src/proc/engine/nodewiring.hpp
    index 0f6cc9500..d17b95396 100644
    --- a/src/proc/engine/nodewiring.hpp
    +++ b/src/proc/engine/nodewiring.hpp
    @@ -49,9 +49,16 @@ namespace engine {
       class NodeWiring
         : public WiringDescriptor
         {
    +      const uint siz_;
    +      const uint nrO_; 
           
           friend class WiringFactory;
           
    +    public:
    +      virtual uint getNrI()  const { return siz_ - nrO_; }
    +      virtual uint getNrO()  const { return nrO_; }
    +
    +      
         protected:
           virtual BuffHandle
           callDown (State& currentProcess, uint requiredOutputNr)  const 
    diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp
    index 4a3249dc9..2d5af1a3a 100644
    --- a/src/proc/engine/procnode.hpp
    +++ b/src/proc/engine/procnode.hpp
    @@ -70,6 +70,9 @@ namespace engine {
         public:
           virtual ~WiringDescriptor() {}
           
    +      virtual uint getNrI()  const =0;           ///////////TODO: indeed need a virtual function??
    +      virtual uint getNrO()  const =0;
    +      
         protected:
           /** the wiring-dependent part of the node operation.
            *  Includes the creation of a one-way state object on the stack
    diff --git a/src/proc/state.hpp b/src/proc/state.hpp
    index 2f047ee7a..cc8bf69d9 100644
    --- a/src/proc/state.hpp
    +++ b/src/proc/state.hpp
    @@ -28,35 +28,17 @@
     #include "pre.hpp"
     
     #include "proc/lumiera.hpp"
    +#include "common/frameid.hpp"
    +#include "proc/engine/buffhandle.hpp"
     
     #include 
     
     
     namespace engine { 
       
    -  class InvocationStateBase;
    -  
    -  struct BuffHandle
    -    {
    -      typedef float Buff;
    -      typedef Buff* PBuff;//////TODO define the Buffer type(s)
    -      
    -      PBuff 
    -      operator->() const 
    -        { 
    -          return pBuffer_; 
    -        }
    -      Buff&
    -      operator* () const
    -        {
    -          ENSURE (pBuffer_);
    -          return *pBuffer_;
    -        }
    -      
    -    protected:
    -      PBuff pBuffer_; 
    -      long sourceID_;
    -    };
    +  using lumiera::FrameID;
    +
    +  class StateAdapter;
       
       
       class State
    @@ -72,9 +54,34 @@ namespace engine {
            */ 
           virtual State& getCurrentImplementation () =0;
           
    -      friend class engine::InvocationStateBase;
    +      friend class engine::StateAdapter;
           
         public:
    +      /** allocate a new writable buffer with type and size according to
    +       *  the BufferDescriptor. The actual provider of this buffer depends
    +       *  on the State implementation; it could be a temporary, located in
    +       *  the cache, used for feeding calculated frames over a network, etc.
    +       *  @return a BuffHandle encapsulating the information necessary to get
    +       *          at the actual buffer adress and for releasing the buffer.
    +       */
    +      virtual BuffHandle allocateBuffer (BufferDescriptor const&)  =0;
    +      
    +      /** resign control of the buffer denoted by the handle */
    +      virtual void releaseBuffer (BuffHandle&)  =0;
    +      
    +      /** declare the data contained in the Buffer to be ready.
    +       *  The caller is required to restrain itself from modifying the data
    +       *  afterwards, as this buffer now can be used (readonly) by other
    +       *  calculation processes in parallel.
    +       */
    +      virtual void is_calculated (BuffHandle const&)  =0;
    +      
    +      /** try to fetch an existing buffer containing the denoted frame from
    +       *  a cache or similar backing system (e.g. peer over the network).
    +       *  @return either a handle to a readonly buffer, or a null handle
    +       *  @note the client is resposible for not modifying the provided data
    +       */
    +      virtual BuffHandle fetch (FrameID const&)  =0;
           
         };
       
    
    From 48780bef74f3a857cc9483f535fcd9c711bb9187 Mon Sep 17 00:00:00 2001
    From: Ichthyostega 
    Date: Thu, 17 Jul 2008 16:17:43 +0200
    Subject: [PATCH 08/80] WIP draft the handling of buffer pointer tables
    
    ---
     src/proc/engine/buffhandle.hpp    |  50 +++------
     src/proc/engine/bufftable.hpp     | 162 ++++++++++++++++++++++++++++++
     src/proc/engine/nodeoperation.hpp |  21 +---
     src/proc/state.hpp                |   4 +
     4 files changed, 181 insertions(+), 56 deletions(-)
     create mode 100644 src/proc/engine/bufftable.hpp
    
    diff --git a/src/proc/engine/buffhandle.hpp b/src/proc/engine/buffhandle.hpp
    index d72ff7193..60ca7758d 100644
    --- a/src/proc/engine/buffhandle.hpp
    +++ b/src/proc/engine/buffhandle.hpp
    @@ -20,36 +20,30 @@
      
     */
     
    -/** @file procnode.hpp
    - ** Interface to the processing nodes and the render nodes network.
    +/** @file buffhandle.hpp
    + ** Various bits needed to support the buffer management within the render nodes.
    + ** When pulling data from predecessor nodes and calculating new data, each render node
    + ** needs several input and output buffers. These may be allocated and provided by several
    + ** different "buffer providers" (for example the frame cache). For accessing those buffers,
    + ** the node needs to keep a table of buffer pointers, and for releasing the buffers later
    + ** on, we need some handles. The usage pattern of those buffer pointer tables is stack-like,
    + ** thus it makes sense to utilize a single large buffer pointer array per pull() calldown
    + ** sequence and dynamically claim small chunks for each node.
      **
    - ** Actually, there are three different interfaces to consider
    - ** - the ProcNode#pull is the invocation interface. It is call-style (easily callable by C)
    - ** - the builder interface, comprised by the NodeFactory and the WiringFactory. It's C++ (using templates)
    - ** - the actual processing function is supposed to be a C function; it uses a set of C functions 
    - **   for accessing the frame buffers with the data to be processed.
    - **
    - ** By using the builder interface, concrete node and wiring descriptor classes are created,
    - ** based on some templates. These concrete classes form the "glue" to tie the node network
    - ** together and contain much of the operation beahviour in a hard wired fashion.
    - **
    - ** @see nodefactory.hpp
    - ** @see operationpoint.hpp
    + ** @see nodeoperation.hpp
    + ** @see bufftable.hpp       storage for the buffer table
    + ** @see engine::Invocation
      */
     
     #ifndef ENGINE_BUFFHANDLE_H
     #define ENGINE_BUFFHANDLE_H
     
     
    -//#include "proc/mobject/parameter.hpp"
    -
    -//#include 
    -
    +#include "common/error.hpp"
     
     
     namespace engine {
    -
    -//  using std::vector;
    +  
       
       
       /**
    @@ -90,22 +84,6 @@ namespace engine {
         };
       
       
    -    /** 
    -     * Tables of buffer handles and corresponding dereferenced buffer pointers.
    -     * Used within the invocation of a processing node to calculate data.
    -     * The tables are further differentiated into input data buffers and output
    -     * data buffers. The tables are supposed to be implemented as bare "C" arrays,
    -     * thus the array of real buffer pointers can be fed directly to any processing
    -     * function
    -     */
    -  struct BuffTable
    -    {
    -      BuffHandle        *const outHandle;
    -      BuffHandle        *const inHandle;
    -      BuffHandle::PBuff *const outBuff;
    -      BuffHandle::PBuff *const inBuff;
    -    };
    -  
       
     } // namespace engine
     #endif
    diff --git a/src/proc/engine/bufftable.hpp b/src/proc/engine/bufftable.hpp
    new file mode 100644
    index 000000000..21ada3c88
    --- /dev/null
    +++ b/src/proc/engine/bufftable.hpp
    @@ -0,0 +1,162 @@
    +/*
    +  BUFFTABLE.hpp  -  Table of buffer pointers to be used by the render nodes
    + 
    +  Copyright (C)         Lumiera.org
    +    2008,               Hermann Vosseler 
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +*/
    +
    +
    +#ifndef ENGINE_BUFFHTABLE_H
    +#define ENGINE_BUFFHTABLE_H
    +
    +
    +#include "common/error.hpp"
    +#include "proc/engine/buffhandle.hpp"
    +
    +#include 
    +#include 
    +#include 
    +
    +
    +
    +namespace engine {
    +  
    +  using std::pair;
    +  using std::vector;
    +  
    +  
    +    /** 
    +     * Tables of buffer handles and corresponding dereferenced buffer pointers.
    +     * Used within the invocation of a processing node to calculate data.
    +     * The tables are further differentiated into input data buffers and output
    +     * data buffers. The tables are supposed to be implemented as bare "C" arrays,
    +     * thus the array of real buffer pointers can be fed directly to the
    +     * processing function of the respective node.
    +     */
    +  struct BuffTable
    +    {
    +      typedef BuffHandle        * PHa;
    +      typedef BuffHandle::PBuff * PBu;
    +      typedef pair Chunk;
    +      
    +      PHa outHandle;
    +      PHa inHandle;
    +      PBu outBuff;
    +      PBu inBuff;
    +    };
    +  
    +  
    +  class BuffTableStorage;
    +  class WiringDescriptor;
    +  
    +  /** 
    +   * to be allocated on the stack while evaluating a ProcNode#pull() call.
    +   * The "current" State (StateProxy) maintains a BuffTableStorage (=pool),
    +   * which can be used to crate such chunks. The claiming and releasing of
    +   * slots in the BuffTableStorage is automatically tied to BuffTableChunk
    +   * object's lifecycle.
    +   */
    +  class BuffTableChunk
    +    : public BuffTable,
    +      boost::noncopyable
    +    {
    +      const uint siz_;
    +      BuffTable::Chunk tab_;
    +      BuffTableStorage& sto_;
    +      
    +    public:
    +      BuffTableChunk (WiringDescriptor const& wd, BuffTableStorage& storage)
    +        : siz_(wd.getNrI() + wd.getNrO()),
    +          tab_(storage.claim (siz_)),
    +          sto_(storage)
    +        {
    +          const uint nrO(wd.getNrO());
    +          
    +          // Setup the public visible table locations
    +          this->outHandle = &tab_.first[ 0 ];
    +          this->inHandle  = &tab_.first[nrO];
    +          this->outBuff   = &tab_.second[ 0 ];
    +          this->inBuff    = &tab_.second[nrO];
    +        }
    +      
    +      ~BuffTableChunk ()
    +        {
    +          sto_.release (siz_);
    +          ASSERT ( sto_.level_check (tab_),
    +                  "buffer management logic broken.");
    +        }
    +    };
    +  
    +  
    +  
    +  class BuffTableStorage
    +    {
    +      vector        hTab_;
    +      vector pTab_;
    +      size_t level_;
    +      
    +    public:
    +      BuffTableStorage (const size_t maxSiz)
    +        : hTab_(maxSiz),
    +          pTab_(maxSiz),
    +          level_(0)
    +        { }
    +      
    +      ~BuffTableStorage() { ASSERT (0==level_, "buffer management logic broken."); }
    +      
    +    protected:
    +      
    +      friend class BuffTableChunk;
    +      
    +      /** allocate the given number of slots
    +       *  starting at current level to be used
    +       *  by the newly created BuffTableChunk
    +       */
    +      BuffTable::Chunk
    +      claim (uint slots)
    +        {
    +          ASSERT (pTab_.size() == hTab_.size());
    +          REQUIRE (level_+slots <= hTab_.size());
    +          
    +          size_t prev_level (level_);
    +          level_ += slots;
    +          return std::make_pair (&hTab_[prev_level],
    +                                 &pTab_[prev_level]);
    +        }
    +      
    +      void
    +      release (uint slots)
    +        {
    +          ASSERT (slots <= level_);
    +          REQUIRE (level_ <= hTab_.size());
    +          REQUIRE (level_ <= pTab_.size());
    +          
    +          level_ -= slots;
    +        }
    +      
    +      bool
    +      level_check (BuffTable::Chunk& prev_level)
    +        {
    +          return prev_level.first  == &hTab_[level_]
    +              && prev_level.second == &pTab_[level_];
    +        }
    +    };
    +  
    +  
    +} // namespace engine
    +#endif
    diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp
    index 86a41e896..f99dedbcb 100644
    --- a/src/proc/engine/nodeoperation.hpp
    +++ b/src/proc/engine/nodeoperation.hpp
    @@ -55,6 +55,7 @@
     #include "proc/state.hpp"
     #include "proc/engine/procnode.hpp"
     #include "proc/engine/buffhandle.hpp"
    +#include "proc/engine/bufftable.hpp"
     #include "proc/engine/nodewiringconfig.hpp"
     #include "lib/appconfig.hpp"
     
    @@ -129,26 +130,6 @@ namespace engine {
             { }
         };
     
    -  template
    -  class BuffTableStorage
    -    : public BuffTable
    -    {
    -      BuffHandle hTab_[SZ];
    -      BuffHandle::PBuff pTab_[SZ];
    -      
    -    protected:
    -      BuffTableStorage (WiringDescriptor const& wd)
    -        {
    -          const uint nrI = wd.getNrI();
    -          const uint nrO = wd.getNrO();
    -          REQUIRE (nrI+nrO <= SZ);
    -          
    -          this->outHandle = &hTab_[0];
    -          this->inHandle  = &hTab_[nrO];
    -          this->outBuff   = &pTab_[0];
    -          this->inBuff    = &pTab_[nrO];
    -        }
    -    };
       
       
       
    diff --git a/src/proc/state.hpp b/src/proc/state.hpp
    index cc8bf69d9..84732029d 100644
    --- a/src/proc/state.hpp
    +++ b/src/proc/state.hpp
    @@ -30,6 +30,7 @@
     #include "proc/lumiera.hpp"
     #include "common/frameid.hpp"
     #include "proc/engine/buffhandle.hpp"
    +#include "proc/engine/bufftable.hpp"
     
     #include 
     
    @@ -83,6 +84,9 @@ namespace engine {
            */
           virtual BuffHandle fetch (FrameID const&)  =0;
           
    +      /** necessary for creating a local BuffTableChunk */
    +      virtual BuffTableStorage& getBuffTableStorage()  =0; 
    +      
         };
       
     } // namespace engine
    
    From e3d6026d0bd6fc0d844481dcf6b4a50c49e81c23 Mon Sep 17 00:00:00 2001
    From: Joel Holdsworth 
    Date: Thu, 17 Jul 2008 19:35:49 +0100
    Subject: [PATCH 09/80] Retired VideoTrack - all tracks are the same
    
    ---
     src/gui/Makefile.am                      |  2 -
     src/gui/widgets/timeline-widget.hpp      |  5 +-
     src/gui/widgets/timeline/track.cpp       | 37 +++++++++------
     src/gui/widgets/timeline/track.hpp       |  7 +--
     src/gui/widgets/timeline/video-track.cpp | 60 ------------------------
     src/gui/widgets/timeline/video-track.hpp | 58 -----------------------
     6 files changed, 28 insertions(+), 141 deletions(-)
     delete mode 100644 src/gui/widgets/timeline/video-track.cpp
     delete mode 100644 src/gui/widgets/timeline/video-track.hpp
    
    diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
    index b1560e485..14cdc33c2 100644
    --- a/src/gui/Makefile.am
    +++ b/src/gui/Makefile.am
    @@ -58,8 +58,6 @@ lumigui_SOURCES =                                               \
         $(lumigui_srcdir)/widgets/timeline/header-container.hpp     \
         $(lumigui_srcdir)/widgets/timeline/track.cpp                \
         $(lumigui_srcdir)/widgets/timeline/track.hpp                \
    -    $(lumigui_srcdir)/widgets/timeline/video-track.cpp          \
    -    $(lumigui_srcdir)/widgets/timeline/video-track.hpp          \
         $(lumigui_srcdir)/widgets/timeline/timeline-body.cpp        \
         $(lumigui_srcdir)/widgets/timeline/timeline-body.hpp        \
         $(lumigui_srcdir)/widgets/timeline/timeline-ruler.cpp       \
    diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp
    index 669060038..c179a4d59 100644
    --- a/src/gui/widgets/timeline-widget.hpp
    +++ b/src/gui/widgets/timeline-widget.hpp
    @@ -31,7 +31,6 @@
     #include "timeline/timeline-body.hpp"
     #include "timeline/timeline-ruler.hpp"
     #include "timeline/track.hpp"
    -#include "timeline/video-track.hpp"
     
     namespace lumiera {
     namespace gui {
    @@ -119,8 +118,8 @@ protected:
     
       int totalHeight;
     
    -  timeline::VideoTrack video1;
    -  timeline::VideoTrack video2;
    +  timeline::Track video1;
    +  timeline::Track video2;
       std::vector tracks;
     
       timeline::HeaderContainer *headerContainer;
    diff --git a/src/gui/widgets/timeline/track.cpp b/src/gui/widgets/timeline/track.cpp
    index 3ae90ff41..a19541476 100644
    --- a/src/gui/widgets/timeline/track.cpp
    +++ b/src/gui/widgets/timeline/track.cpp
    @@ -27,28 +27,35 @@ namespace gui {
     namespace widgets {
     namespace timeline {
     
    -Track::Track()
    -  {
    -    
    -  }
    +Track::Track() :
    +  headerWidget("HeaderTest")
    +{
    +  
    +}
    +
    +Gtk::Widget&
    +Track::get_header_widget()
    +{
    +  return headerWidget;
    +}
     
     Glib::ustring
     Track::get_title()
    -  {
    -    return "Hello";
    -  }
    -  
    -/*int
    +{
    +  return "Hello";
    +}
    +
    +int
     Track::get_height()
    -  {
    -    return get_header_widget().get_allocation().get_height();
    -  }*/
    +{
    +  return 100;
    +}
     
     void
     Track::draw_track(Cairo::RefPtr cairo)
    -  {
    -    
    -  }
    +{
    +  
    +}
     
     }   // namespace timeline
     }   // namespace widgets
    diff --git a/src/gui/widgets/timeline/track.hpp b/src/gui/widgets/timeline/track.hpp
    index 7c338d7bb..168aab390 100644
    --- a/src/gui/widgets/timeline/track.hpp
    +++ b/src/gui/widgets/timeline/track.hpp
    @@ -40,13 +40,14 @@ class Track
     
         Glib::ustring get_title();
     
    -    virtual Gtk::Widget& get_header_widget() = 0;
    +    Gtk::Widget& get_header_widget();
     
    -    virtual int get_height() = 0;
    +    int get_height();
     
    -    virtual void draw_track(Cairo::RefPtr cairo);
    +    void draw_track(Cairo::RefPtr cairo);
     
       protected:
    +    Gtk::Label headerWidget;
       };
     
     
    diff --git a/src/gui/widgets/timeline/video-track.cpp b/src/gui/widgets/timeline/video-track.cpp
    deleted file mode 100644
    index 4242f0e3f..000000000
    --- a/src/gui/widgets/timeline/video-track.cpp
    +++ /dev/null
    @@ -1,60 +0,0 @@
    -/*
    -  video-track.cpp  -  Implementation of the timeline video track object
    - 
    -  Copyright (C)         Lumiera.org
    -    2008,               Joel Holdsworth 
    - 
    -  This program is free software; you can redistribute it and/or
    -  modify it under the terms of the GNU General Public License as
    -  published by the Free Software Foundation; either version 2 of the
    -  License, or (at your option) any later version.
    - 
    -  This program is distributed in the hope that it will be useful,
    -  but WITHOUT ANY WARRANTY; without even the implied warranty of
    -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -  GNU General Public License for more details.
    - 
    -  You should have received a copy of the GNU General Public License
    -  along with this program; if not, write to the Free Software
    -  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    - 
    -* *****************************************************/
    -
    -#include "video-track.hpp"
    -
    -using namespace Gtk;
    -
    -namespace lumiera {
    -namespace gui {
    -namespace widgets {
    -namespace timeline {
    -
    -VideoTrack::VideoTrack() :
    -  headerWidget("HeaderTest")
    -  {
    -
    -  }
    -
    -Gtk::Widget&
    -VideoTrack::get_header_widget()
    -  {
    -    return headerWidget;
    -  }
    -
    -int
    -VideoTrack::get_height()
    -  {
    -    return 100;
    -  }
    -
    -void
    -VideoTrack::draw_track(Cairo::RefPtr cairo)
    -  {
    -    
    -  }
    -
    -}   // namespace timeline
    -}   // namespace widgets
    -}   // namespace gui
    -}   // namespace lumiera
    -
    diff --git a/src/gui/widgets/timeline/video-track.hpp b/src/gui/widgets/timeline/video-track.hpp
    deleted file mode 100644
    index d72b4b1c9..000000000
    --- a/src/gui/widgets/timeline/video-track.hpp
    +++ /dev/null
    @@ -1,58 +0,0 @@
    -/*
    -  video-track.hpp  -  Declaration of the timeline video track object
    - 
    -  Copyright (C)         Lumiera.org
    -    2008,               Joel Holdsworth 
    - 
    -  This program is free software; you can redistribute it and/or
    -  modify it under the terms of the GNU General Public License as
    -  published by the Free Software Foundation; either version 2 of the
    -  License, or (at your option) any later version.
    - 
    -  This program is distributed in the hope that it will be useful,
    -  but WITHOUT ANY WARRANTY; without even the implied warranty of
    -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -  GNU General Public License for more details.
    - 
    -  You should have received a copy of the GNU General Public License
    -  along with this program; if not, write to the Free Software
    -  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    - 
    -*/
    -/** @file video-track.hpp
    - ** This file contains the definition of video track object
    - */
    -
    -#ifndef VIDEO_TRACK_HPP
    -#define VIDEO_TRACK_HPP
    -
    -#include "track.hpp"
    -
    -namespace lumiera {
    -namespace gui {
    -namespace widgets {
    -namespace timeline {
    -
    -class VideoTrack : public Track
    -  {
    -  public:
    -    VideoTrack();
    -
    -    virtual Gtk::Widget& get_header_widget();
    -
    -    virtual int get_height();
    -
    -    virtual void draw_track(Cairo::RefPtr cairo);
    -
    -  protected:
    -    Gtk::Label headerWidget;
    -    Gtk::Frame headerFrame;
    -  };
    -
    -}   // namespace timeline
    -}   // namespace widgets
    -}   // namespace gui
    -}   // namespace lumiera
    -
    -#endif // VIDEO_TRACK_HPP
    -
    
    From cb8ac94dcff6efa7e707c39818cd138691f67659 Mon Sep 17 00:00:00 2001
    From: Ichthyostega 
    Date: Fri, 18 Jul 2008 21:21:46 +0200
    Subject: [PATCH 10/80] WIP finally got the design straight?
    
    ---
     src/proc/engine/bufftable.hpp     |  86 +++++-----
     src/proc/engine/nodeoperation.hpp | 262 +++++++++++++++++-------------
     src/proc/state.hpp                |   3 +-
     3 files changed, 195 insertions(+), 156 deletions(-)
    
    diff --git a/src/proc/engine/bufftable.hpp b/src/proc/engine/bufftable.hpp
    index 21ada3c88..ac1329265 100644
    --- a/src/proc/engine/bufftable.hpp
    +++ b/src/proc/engine/bufftable.hpp
    @@ -27,6 +27,7 @@
     
     #include "common/error.hpp"
     #include "proc/engine/buffhandle.hpp"
    +#include "proc/engine/procnode.hpp"
     
     #include 
     #include 
    @@ -61,49 +62,6 @@ namespace engine {
         };
       
       
    -  class BuffTableStorage;
    -  class WiringDescriptor;
    -  
    -  /** 
    -   * to be allocated on the stack while evaluating a ProcNode#pull() call.
    -   * The "current" State (StateProxy) maintains a BuffTableStorage (=pool),
    -   * which can be used to crate such chunks. The claiming and releasing of
    -   * slots in the BuffTableStorage is automatically tied to BuffTableChunk
    -   * object's lifecycle.
    -   */
    -  class BuffTableChunk
    -    : public BuffTable,
    -      boost::noncopyable
    -    {
    -      const uint siz_;
    -      BuffTable::Chunk tab_;
    -      BuffTableStorage& sto_;
    -      
    -    public:
    -      BuffTableChunk (WiringDescriptor const& wd, BuffTableStorage& storage)
    -        : siz_(wd.getNrI() + wd.getNrO()),
    -          tab_(storage.claim (siz_)),
    -          sto_(storage)
    -        {
    -          const uint nrO(wd.getNrO());
    -          
    -          // Setup the public visible table locations
    -          this->outHandle = &tab_.first[ 0 ];
    -          this->inHandle  = &tab_.first[nrO];
    -          this->outBuff   = &tab_.second[ 0 ];
    -          this->inBuff    = &tab_.second[nrO];
    -        }
    -      
    -      ~BuffTableChunk ()
    -        {
    -          sto_.release (siz_);
    -          ASSERT ( sto_.level_check (tab_),
    -                  "buffer management logic broken.");
    -        }
    -    };
    -  
    -  
    -  
       class BuffTableStorage
         {
           vector        hTab_;
    @@ -158,5 +116,47 @@ namespace engine {
         };
       
       
    +  /** 
    +   * to be allocated on the stack while evaluating a ProcNode#pull() call.
    +   * The "current" State (StateProxy) maintains a BuffTableStorage (=pool),
    +   * which can be used to crate such chunks. The claiming and releasing of
    +   * slots in the BuffTableStorage is automatically tied to BuffTableChunk
    +   * object's lifecycle.
    +   */
    +  class BuffTableChunk
    +    : public BuffTable,
    +      boost::noncopyable
    +    {
    +      const uint siz_;
    +      BuffTable::Chunk tab_;
    +      BuffTableStorage& sto_;
    +      
    +    public:
    +      BuffTableChunk (WiringDescriptor const& wd, BuffTableStorage& storage)
    +        : siz_(wd.getNrI() + wd.getNrO()),
    +          tab_(storage.claim (siz_)),
    +          sto_(storage)
    +        {
    +          const uint nrO(wd.getNrO());
    +          
    +          // Setup the public visible table locations
    +          this->outHandle = &tab_.first[ 0 ];
    +          this->inHandle  = &tab_.first[nrO];
    +          this->outBuff   = &tab_.second[ 0 ];
    +          this->inBuff    = &tab_.second[nrO];
    +        }
    +      
    +      ~BuffTableChunk ()
    +        {
    +          sto_.release (siz_);
    +          ASSERT ( sto_.level_check (tab_),
    +                  "buffer management logic broken.");
    +        }
    +    };
    +  
    +  
    +  
    +  
    +  
     } // namespace engine
     #endif
    diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp
    index f99dedbcb..6c0092edd 100644
    --- a/src/proc/engine/nodeoperation.hpp
    +++ b/src/proc/engine/nodeoperation.hpp
    @@ -73,16 +73,6 @@ namespace engine {
        * call, using setup/wiring data preconfigured by the builder.
        * Its job is to provide the actual implementation of the Cache
        * push / fetch and recursive downcall to render the source frames.
    -   * 
    -   * \par assembling the implementation
    -   * This is the abstract base class of all concrete StateAdapter types.
    -   * Each ProcNode#pull() call creates such a StateAdapter on the stack,
    -   * with a concrete type according to the WiringDescriptor of the node
    -   * to pull. The concrete type is assembled by a chain of policy templates
    -   * on top of InvocationStateBase. For each of the possible configuratons
    -   * we define such a chain (see bottom of this header). The WiringFactory
    -   * defined in nodewiring.cpp actually drives the instantiation of all
    -   * those possible combinations
        */
       class StateAdapter
         : public State
    @@ -97,6 +87,8 @@ namespace engine {
             { }
           
           virtual State& getCurrentImplementation () { return current_; }
    +
    +      typedef State& (StateAdapter::*BufferProvider);
           
           
         public: /* === proxying the State interface === */
    @@ -110,10 +102,28 @@ namespace engine {
           
           // note: allocateBuffer()  is choosen specifically based on the actual node wiring
           
    +      
    +    protected: /* === API for use by the node operation pull() call === */
    +      
    +      BufferDescriptor
    +      getBufferDescriptor (uint chan)
    +        {
    +          TODO ("determine BufferDescriptor based on WiringDescriptor channel info");
    +        }
         };
       
         
    -  
    +  /**
    +   * Invocation context state.
    +   * A ref to this type is carried through the chain of NEXT::step() functions
    +   * which form the actual invocation sequence. The various operations in this sequence
    +   * access the context via the references in this struct, and also using the inherited
    +   * public State intercace. The object instance actually used as Invocation is created
    +   * on the stack and parametrized according to the necessities of the invocation
    +   * sequence actually configured. This real object instance comes in two flavours:
    +   * - a intended/partial invocation (which may be short-circuited due to Cache hit)
    +   * - a complete invocation, including storage for managing the buffer handles.
    +   */
       struct Invocation
         : StateAdapter
         {
    @@ -122,43 +132,98 @@ namespace engine {
           const uint outNr;
           
         protected:
    -      Invocation (State& callingProcess, WiringDescriptor const& w, BuffTable& b, uint o)
    +      /** creates a new invocation context state, 
    +       *  configuring it as intended/partial invocation without BuffTable */
    +      Invocation (State& callingProcess, WiringDescriptor const& w, BufferProvider buffSrc, uint o)
             : StateAdapter(callingProcess),
    -          wiring(w),
    -          buffTab(b),
    -          outNr(o)
    +          wiring(w), outNr(o),
    +          bufferProvider_(buffSrc)
             { }
    +      
    +      /** used to build a complete invocation, including a buffer table,
    +          based on an existing intended/partial invocation */
    +      Invocation (Invocation const& currInvocation, BuffTable& localBuffTab)
    +        : StateAdapter(currInvocation),
    +          wiring(currInvocation.wiring),
    +          buffTab(localBuffTab),
    +          outNr(currInvocation.outNr),
    +          bufferProvider_(currInvocation.bufferProvider_)
    +        { }
    +      
    +      /** configuration of the actual entity in charge of allocating Buffers.
    +       *  depending on the configured call sequence, this may be a parent StateAdapter,
    +       *  or the backend in case we want to fade the results into the Cache  */
    +      const BufferProvider bufferProvider_;
    +      
    +    public:
    +      BuffHandle const&
    +      allocateBuffer (uint outChannel)
    +        {
    +          return this->*bufferProvider_.allocateBuffer(
    +                   this->getBufferDescriptor(outChannel));
    +        }
         };
     
       
       
    -  
    -  template /////////////////TODO: rather template on the BufferProvider
    -  class InvocationImpl
    -    : private BuffTableStorage,
    -      public Invocation
    +  /**
    +   * The real invocation context state implementation. It is created
    +   * by the NodeWiring (WiringDescriptor) of the processing node which
    +   * is pulled by this invocation, hereby using the internal configuration
    +   * information to guide the selecton of the real call sequence 
    +   * 
    +   * \par assembling the call sequence implementation
    +   * Each ProcNode#pull() call creates such a StateAdapter subclass on the stack,
    +   * with a concrete type according to the WiringDescriptor of the node to pull.
    +   * This concrete type encodes a calculation Strategy, which is assembled
    +   * as a chain of policy templates on top of OperationBase. For each of the
    +   * possible configuratons we define such a chain (see bottom of this header).
    +   * The WiringFactory defined in nodewiring.cpp actually drives the instantiation
    +   * of all those possible combinations.
    +   */
    +  template
    +  class ActualInvocationOrder
    +    : public Invocation
         {
    -
    -    protected:
    +    public:
           InvocationImpl (State& callingProcess, WiringDescriptor const& w, const uint outCh)
    -        : BuffTableStorage(w),
    -          Invocation(callingProcess, w, static_cast(*this), outCh)
    +        : Invocation(callingProcess, w, buffPro, outCh)
             { }
           
           /** contains the details of Cache query and recursive calls
            *  to the predecessor node(s), eventually followed by the 
            *  ProcNode::process() callback
            */
    -      template
           BuffHandle retrieve ()
             {
               return Strategy::step (*this);
             }
         };
     
    +  
    +  /** 
    +   * Extends the invocation context state by a table of buffer pointers.
    +   * This extension is used whenever the call sequence goes into actually
    +   * invoking a process() function, which necessiates to build a array of
    +   * buffer pointers and to allocate buffers to hold the data to be worked on.
    +   * It is implemented as decorating an already created "partial invocation",
    +   * just adding the allocation of a Table Chunk for organizing the buffers.
    +   */
    +  class ProcessInvocation
    +    : protected BuffTableChunk,
    +      public Invocation
    +    {
    +    public:
    +      ProcessInvocation (Invocation const& currInvocation)
    +        : BuffTableChunk(currInvocation.wiring, currInvocation.getBuffTableStorage()),
    +          Invocation(currInvocation, static_cast(*this))
    +        { }
    +    };
         
         
    -    
    +  /**
    +   * Collection of functions used to build up the invocation sequence.
    +   */
       class OperationBase
         {
           
    @@ -170,9 +235,8 @@ namespace engine {
           BuffHandle
           step (Invocation& ivo)
             {
    -          BuffHandle fetched = this->current_.fetch (
    -                                 this->genFrameID (
    -                                   this->requiredOutputNr));
    +          BuffHandle fetched = ivo.fetch (
    +                                 this->genFrameID (ivo));
               if (fetched)
                 return fetched;
               else
    @@ -185,25 +249,25 @@ namespace engine {
       struct PullInput : NEXT
         {
           BuffHandle
    -      step (Invocation& ivo)
    +      step (Invocation& started_invocation)
             {
    -          this->createBuffTable();
    +          ProcessInvocation ivo (started_invocation);
               
    -          ASSERT (this->buffTab);
    -          ASSERT (0 < this->buffTabSize());
    -          ASSERT (this->nrO == this->nrI );
    -          ASSERT (this->nrO+this->nrI <= this->buffTabSize());
    -          ASSERT (this->buffTab->inHandles = &this->buffTab->handles[this->nrO]);
    -          BuffHandle           *inH = this->buffTab->inHandles;
    -          BuffHandle::PBuff *inBuff = this->buffTab->inBuffs;
    +          ASSERT (ivo.buffTab);
    +          ASSERT (0 < ivo.buffTabSize());
    +          ASSERT (ivo.nrO() == ivo.nrI() );
    +          ASSERT (ivo.nrO()+ivo.nrI() <= ivo.buffTabSize());
    +          ASSERT (ivo.buffTab->inHandles == &ivo.buffTab->handles[ivo.nrO()]);
    +          BuffHandle           *inH = ivo.buffTab->inHandles;
    +          BuffHandle::PBuff *inBuff = ivo.buffTab->inBuffs;
               
    -          for (uint i = 0; i < this->nrI; ++i )
    +          for (uint i = 0; i < ivo.nrI(); ++i )
                 {
                   inBuff[i] =
    -                *(inH[i] = this->pullPredecessor(i)); // invoke predecessor
    +                *(inH[i] = this->pullPredecessor(ivo,i)); // invoke predecessor
                   // now Input #i is ready...
                 }
    -          return NEXT::step (ivo);
    +          return NEXT::step (ivo); // note: passing down a ref to the ProcessInvocation
             }
         };
       
    @@ -212,23 +276,23 @@ namespace engine {
       struct ReadSource : NEXT
         {
           BuffHandle
    -      step (Invocation& ivo)
    +      step (Invocation& started_invocation)
             {
    -          this->createBuffTable();
    +          ProcessInvocation ivo (started_invocation);
               
    -          ASSERT (this->buffTab);
    -          ASSERT (0 < this->buffTabSize());
    -          ASSERT (this->nrO+this->nrI <= this->buffTabSize());
    -          ASSERT (this->buffTab->inHandles = &this->buffTab->handles[this->nrO]);
    -          BuffHandle           *inH  = this->buffTab->inHandles;
    -          BuffHandle           *outH = this->buffTab->handles;
    -          BuffHandle::PBuff *inBuff  = this->buffTab->inBuffs;
    -          BuffHandle::PBuff *outBuff = this->buffTab->buffers;
    +          ASSERT (ivo.buffTab);
    +          ASSERT (0 < ivo.buffTabSize());
    +          ASSERT (ivo.nrO()+ivo.nrI() <= ivo.buffTabSize());
    +          ASSERT (ivo.buffTab->inHandles == &ivo.buffTab->handles[ivo.nrO()]);
    +          BuffHandle           *inH  = ivo.buffTab->inHandles;
    +          BuffHandle           *outH = ivo.buffTab->handles;
    +          BuffHandle::PBuff *inBuff  = ivo.buffTab->inBuffs;
    +          BuffHandle::PBuff *outBuff = ivo.buffTab->buffers;
               
    -          for (uint i = 0; i < this->nrI; ++i )
    +          for (uint i = 0; i < ivo.nrI(); ++i )
                 {
                   inBuff[i] = outBuff[i] =
    -                *(inH[i] = outH[i] = this->getSource(i)); // TODO: how to access source nodes???
    +                *(inH[i] = outH[i] = this->getSource(ivo,i));
                   // now Input #i is ready...
                 }
               return NEXT::step (ivo);
    @@ -236,97 +300,71 @@ namespace engine {
         };
       
       
    -  template
    -  struct AllocOutput
    +  template
    +  struct AllocOutput : NEXT
         {
           BuffHandle 
           step (Invocation& ivo)
             {
    -          ASSERT (this->buffTab);
    -          ASSERT (this->nrO < this->buffTabSize());
    -          BuffHandle           *outH = this->buffTab->handles;
    -          BuffHandle::PBuff *outBuff = this->buffTab->buffers;
    +          ASSERT (ivo.buffTab);
    +          ASSERT (ivo.nrO() < ivo.buffTabSize());
    +          BuffHandle           *outH = ivo.buffTab->handles;
    +          BuffHandle::PBuff *outBuff = ivo.buffTab->buffers;
               
    -          for (uint i = 0; i < this->nrO; ++i )
    +          for (uint i = 0; i < ivo.nrO(); ++i )
                 {
                   outBuff[i] =
    -                 *(outH[i] = allocateBuffer (i));
    +                 *(outH[i] = ivo.allocateBuffer (i));
                   // now Output buffer for channel #i is available...
                 }
               return NEXT::step (ivo);
             }
    -      
    -    private:
    -      BuffHandle const&
    -      allocateBuffer (uint outCh)
    -        {
    -          BUFFSRC::getBufferProvider(this).allocateBuffer(
    -                          this->getBufferDescriptor(outCh));
    -        }
    -    };
    -  
    -  
    -  enum OutBuffProvider { PARENT, CACHE };
    -  
    -  template
    -  struct OutBuffSource ;
    -  
    -  template<>
    -  struct OutBuffSource
    -    {
    -      static State& getBufferProvider (Invocation& thisState) { return thisState.parent_; }
    -    };
    -  
    -  template<>
    -  struct OutBuffSource
    -    {
    -      static State& getBufferProvider (Invocation& thisState) { return thisState.current_; }
         };
       
       
       template
    -  struct ProcessData
    +  struct ProcessData : NEXT
         {
           BuffHandle 
           step (Invocation& ivo)
             {
    -          ASSERT (this->buffTab);
    -          ASSERT (this->nrO+this->nrI <= this->buffTabSize());
    -          ASSERT (this->validateBuffers());
    +          ASSERT (ivo.buffTab);
    +          ASSERT (ivo.nrO()+ivo.nrI() <= ivo.buffTabSize());
    +          ASSERT (this->validateBuffers(ivo));
               
                // Invoke our own process() function, providing the buffer array
    -          this->wiring_.processFunction (this->buffTab->buffers);
    +          ivo.wiring.processFunction (ivo.buffTab->buffers);
               
               return NEXT::step (ivo);
             }
         };
       
       template
    -  struct FeedCache
    +  struct FeedCache : NEXT
         {
           BuffHandle 
           step (Invocation& ivo)
             {
               // declare all Outputs as finished
    -          this->current_.isCalculated(this->buffTab->handles, 
    -                                      this->nrO);
    +          ivo.isCalculated(ivo.buffTab->handles, 
    +                           ivo.nrO());
               
               return NEXT::step (ivo);
             }
         };
       
       template
    -  struct ReleaseBuffers
    -    {
    +  struct ReleaseBuffers : NEXT                     /////////////////TODO: couldn't this be done automatically by BuffTab's dtor??
    +    {                                             /////////////////       this would require BuffHandle to be a smart ref....
           BuffHandle 
           step (Invocation& ivo)
             {
               // all buffers besides the required Output no longer needed
    -          this->current_.releaseBuffers(this->buffTab->handles, 
    -                                        this->buffTabSize(), 
    -                                        this->requiredOutputNr);
    +          this->releaseBuffers(ivo.buffTab->handles, 
    +                               ivo.buffTabSize(), 
    +                               ivo.outNr);
               
    -          return this->buffTab->outH[this->requiredOutputNr];
    +          return ivo.buffTab->outH[this->requiredOutputNr];
             }
         };
       
    @@ -335,9 +373,8 @@ namespace engine {
       
       /* === declare the possible Assembly of these elementary steps === */
       
    -  template
    -  struct Strategy ;
    -
    +  template
    +  struct OutBuffSource{ static const StateAdapter::BufferProvider VALUE = buffPro; };
       
       template
       struct SelectBuffProvider;
    @@ -348,23 +385,26 @@ namespace engine {
       template<> struct SelectBuffProvider<>                : OutBuffSource{ };
     
       
    +  template
    +  struct Strategy ;
    +
       using lumiera::typelist::Config;
       
    -  template
    -  struct Strategy< Config >
    +  template
    +  struct Strategy< Config >
         : QueryCache<
            PullInput<
    -        AllocOutput,
    +        AllocOutput<
              ProcessData<
               FeedCache<
                ReleaseBuffers< 
                 OperationBase > > > > > >
         { };
       
    -  template
    -  struct Strategy< Config >
    +  template
    +  struct Strategy< Config >
         : PullInput<
    -       AllocOutput,
    +       AllocOutput<
             ProcessData<
               ReleaseBuffers< 
                OperationBase > > > > 
    @@ -383,7 +423,7 @@ namespace engine {
       template<>
       struct Strategy< Config >
         : ReadSource<
    -       AllocOutput,
    +       AllocOutput<
             ProcessData<                       // wiring_.processFunction is supposed to do just buffer copying here 
              ReleaseBuffers< 
               OperationBase > > > >  
    diff --git a/src/proc/state.hpp b/src/proc/state.hpp
    index 84732029d..cd98a39b8 100644
    --- a/src/proc/state.hpp
    +++ b/src/proc/state.hpp
    @@ -30,7 +30,6 @@
     #include "proc/lumiera.hpp"
     #include "common/frameid.hpp"
     #include "proc/engine/buffhandle.hpp"
    -#include "proc/engine/bufftable.hpp"
     
     #include 
     
    @@ -40,7 +39,7 @@ namespace engine {
       using lumiera::FrameID;
     
       class StateAdapter;
    -  
    +  class BuffTableStorage;
       
       class State
         {
    
    From 4907b19cce890df60b5e6358274a23816556eda7 Mon Sep 17 00:00:00 2001
    From: Joel Holdsworth 
    Date: Sat, 19 Jul 2008 16:35:56 +0100
    Subject: [PATCH 11/80] Set the page size of the horizontal timeline scroll bar
    
    ---
     src/gui/widgets/timeline-widget.cpp | 8 ++++++++
     1 file changed, 8 insertions(+)
    
    diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp
    index 5011103ac..e1956ad93 100644
    --- a/src/gui/widgets/timeline-widget.cpp
    +++ b/src/gui/widgets/timeline-widget.cpp
    @@ -106,6 +106,9 @@ TimelineWidget::set_time_scale(int64_t time_scale)
     {
       timeScale = time_scale;
       ruler.set_time_scale(time_scale);
    +  
    +  const int view_width = body->get_allocation().get_width();
    +  horizontalAdjustment.set_page_size(timeScale * view_width);
     }
     
     void
    @@ -186,9 +189,14 @@ TimelineWidget::update_scroll()
       
       //----- Horizontal Scroll ------//
       
    +  // TEST CODE
       horizontalAdjustment.set_upper(1000 * GAVL_TIME_SCALE / 200);
       horizontalAdjustment.set_lower(-1000 * GAVL_TIME_SCALE / 200);
       
    +  // Set the page size
    +  horizontalAdjustment.set_page_size(
    +    timeScale * body_allocation.get_width());
    +  
       //----- Vertical Scroll -----//
       
       // Calculate the vertical length that can be scrolled:
    
    From 3ec69c539c642c332f12192085f6987cd398362d Mon Sep 17 00:00:00 2001
    From: Ichthyostega 
    Date: Sun, 20 Jul 2008 15:00:39 +0200
    Subject: [PATCH 12/80] WIP resolved remaining inconsistencies
    
    ---
     src/proc/engine/nodeoperation.hpp | 257 +++++++++++++++---------------
     1 file changed, 128 insertions(+), 129 deletions(-)
    
    diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp
    index 6c0092edd..c52c48618 100644
    --- a/src/proc/engine/nodeoperation.hpp
    +++ b/src/proc/engine/nodeoperation.hpp
    @@ -65,7 +65,6 @@
     namespace engine {
       
       
    -
       /**
        * Adapter to shield the ProcNode from the actual buffer management,
        * allowing the processing function within ProcNode to use logical
    @@ -87,8 +86,7 @@ namespace engine {
             { }
           
           virtual State& getCurrentImplementation () { return current_; }
    -
    -      typedef State& (StateAdapter::*BufferProvider);
    +      
           
           
         public: /* === proxying the State interface === */
    @@ -99,72 +97,84 @@ namespace engine {
           
           virtual BuffHandle fetch (FrameID const& fID)     { return current_.fetch (fID); }
           
    -      
           // note: allocateBuffer()  is choosen specifically based on the actual node wiring
           
    -      
    -    protected: /* === API for use by the node operation pull() call === */
    -      
    -      BufferDescriptor
    -      getBufferDescriptor (uint chan)
    -        {
    -          TODO ("determine BufferDescriptor based on WiringDescriptor channel info");
    -        }
         };
       
    -    
    +  
    +  
    +  
    +  
       /**
        * Invocation context state.
        * A ref to this type is carried through the chain of NEXT::step() functions
        * which form the actual invocation sequence. The various operations in this sequence
    -   * access the context via the references in this struct, and also using the inherited
    -   * public State intercace. The object instance actually used as Invocation is created
    -   * on the stack and parametrized according to the necessities of the invocation
    -   * sequence actually configured. This real object instance comes in two flavours:
    -   * - a intended/partial invocation (which may be short-circuited due to Cache hit)
    -   * - a complete invocation, including storage for managing the buffer handles.
    +   * access the context via the references in this struct, while also using the inherited
    +   * public State interface. The object instance actually used as Invocation is created
    +   * on the stack and parametrized according to the necessities of the invocation sequence
    +   * actually configured. Initially, this real instance is configured without BuffTable,
    +   * because the invocation may be short-circuited due to Cache hit. Otherwise, when
    +   * the invocation sequence actually prepares to call the process function of this
    +   * ProcNode, a buffer table chunk is allocated by the StateProxy and wired in.
        */
       struct Invocation
         : StateAdapter
         {
           WiringDescriptor const& wiring;
    -      BuffTable& buffTab;
           const uint outNr;
           
    +      BuffTable* buffTab;
    +      
         protected:
    -      /** creates a new invocation context state, 
    -       *  configuring it as intended/partial invocation without BuffTable */
    -      Invocation (State& callingProcess, WiringDescriptor const& w, BufferProvider buffSrc, uint o)
    +      /** creates a new invocation context state, without BuffTable */
    +      Invocation (State& callingProcess, WiringDescriptor const& w, uint o)
             : StateAdapter(callingProcess),
               wiring(w), outNr(o),
    -          bufferProvider_(buffSrc)
    +          buffTab(0)
             { }
           
    -      /** used to build a complete invocation, including a buffer table,
    -          based on an existing intended/partial invocation */
    -      Invocation (Invocation const& currInvocation, BuffTable& localBuffTab)
    -        : StateAdapter(currInvocation),
    -          wiring(currInvocation.wiring),
    -          buffTab(localBuffTab),
    -          outNr(currInvocation.outNr),
    -          bufferProvider_(currInvocation.bufferProvider_)
    -        { }
    +      const uint nrO()          const { return wiring.getNrO(); }
    +      const uint nrI()          const { return wiring.getNrI(); }
    +      const uint buffTabSize()  const { return nrO()+nrI(); }
           
    -      /** configuration of the actual entity in charge of allocating Buffers.
    -       *  depending on the configured call sequence, this may be a parent StateAdapter,
    -       *  or the backend in case we want to fade the results into the Cache  */
    -      const BufferProvider bufferProvider_;
    +      /** setup the link to an externally allocated buffer table */
    +      void setBuffTab (BuffTable* b) { this->buffTab = b; }
           
    -    public:
    -      BuffHandle const&
    -      allocateBuffer (uint outChannel)
    +      bool
    +      buffTab_isConsistent ()
             {
    -          return this->*bufferProvider_.allocateBuffer(
    -                   this->getBufferDescriptor(outChannel));
    +          return (buffTab)
    +              && (0 < buffTabSize())
    +              && (nrO()+nrI() <= buffTabSize())
    +              && (buffTab->inBuff   == &buffTab->outBuff[nrO()]  )
    +              && (buffTab->inHandle == &buffTab->outHandle[nrO()])
    +               ;
             }
    +      
    +      
         };
    -
    -  
    +    
    +    
    +    struct AllocBufferFromParent  ///< using the parent StateAdapter for buffer allocations
    +      : Invocation
    +      {
    +        AllocBufferFromParent (State& sta, WiringDescriptor const& w, const uint outCh) 
    +          : Invocation(sta, w, outCh) {}
    +        
    +        virtual BuffHandle
    +        allocateBuffer (BufferDescriptor const& bd) { return parent_.allocateBuffer(bd); }
    +      };
    +    
    +    struct AllocBufferFromCache   ///< using the global current State, which will delegate to Cache
    +      : Invocation
    +      {
    +        AllocBufferFromCache (State& sta, WiringDescriptor const& w, const uint outCh) 
    +          : Invocation(sta, w, outCh) {}
    +        
    +        virtual BuffHandle
    +        allocateBuffer (BufferDescriptor const& bd) { return current_.allocateBuffer(bd); }
    +      };
    +    
       
       /**
        * The real invocation context state implementation. It is created
    @@ -177,17 +187,17 @@ namespace engine {
        * with a concrete type according to the WiringDescriptor of the node to pull.
        * This concrete type encodes a calculation Strategy, which is assembled
        * as a chain of policy templates on top of OperationBase. For each of the
    -   * possible configuratons we define such a chain (see bottom of this header).
    +   * possible configuratons we define such a chain (see bottom of nodeoperation.hpp).
        * The WiringFactory defined in nodewiring.cpp actually drives the instantiation
        * of all those possible combinations.
        */
    -  template
    -  class ActualInvocationOrder
    -    : public Invocation
    +  template
    +  class ActualInvocationProcess
    +    : public BufferProvider
         {
         public:
    -      InvocationImpl (State& callingProcess, WiringDescriptor const& w, const uint outCh)
    -        : Invocation(callingProcess, w, buffPro, outCh)
    +      ActualInvocationProcess (State& callingProcess, WiringDescriptor const& w, const uint outCh)
    +        : Invocation(callingProcess, w, outCh)
             { }
           
           /** contains the details of Cache query and recursive calls
    @@ -199,28 +209,10 @@ namespace engine {
               return Strategy::step (*this);
             }
         };
    -
       
    -  /** 
    -   * Extends the invocation context state by a table of buffer pointers.
    -   * This extension is used whenever the call sequence goes into actually
    -   * invoking a process() function, which necessiates to build a array of
    -   * buffer pointers and to allocate buffers to hold the data to be worked on.
    -   * It is implemented as decorating an already created "partial invocation",
    -   * just adding the allocation of a Table Chunk for organizing the buffers.
    -   */
    -  class ProcessInvocation
    -    : protected BuffTableChunk,
    -      public Invocation
    -    {
    -    public:
    -      ProcessInvocation (Invocation const& currInvocation)
    -        : BuffTableChunk(currInvocation.wiring, currInvocation.getBuffTableStorage()),
    -          Invocation(currInvocation, static_cast(*this))
    -        { }
    -    };
    -    
    -    
    +  
    +  
    +  
       /**
        * Collection of functions used to build up the invocation sequence.
        */
    @@ -243,23 +235,32 @@ namespace engine {
                 return NEXT::step (ivo);
             }
         };
    +  
    +  
    +  template
    +  struct AllocBufferTable : NEXT
    +    {
    +      BuffHandle
    +      step (Invocation& ivo)
    +        {
    +          BuffTableChunk buffTab (ivo.wiring, ivo.getBuffTableStorage());
    +          ivo.setBuffTab(&buffTab);
    +          ASSERT (ivo.buffTab);
    +          ASSERT (ivo.buffTab_isConsistent());
               
    +          return NEXT::step (ivo);
    +        }
    +    };
    +  
       
       template
       struct PullInput : NEXT
         {
           BuffHandle
    -      step (Invocation& started_invocation)
    +      step (Invocation& ivo)
             {
    -          ProcessInvocation ivo (started_invocation);
    -          
    -          ASSERT (ivo.buffTab);
    -          ASSERT (0 < ivo.buffTabSize());
    -          ASSERT (ivo.nrO() == ivo.nrI() );
    -          ASSERT (ivo.nrO()+ivo.nrI() <= ivo.buffTabSize());
    -          ASSERT (ivo.buffTab->inHandles == &ivo.buffTab->handles[ivo.nrO()]);
    -          BuffHandle           *inH = ivo.buffTab->inHandles;
    -          BuffHandle::PBuff *inBuff = ivo.buffTab->inBuffs;
    +          BuffHandle        *   inH = ivo.buffTab->inHandle;
    +          BuffHandle::PBuff *inBuff = ivo.buffTab->inBuff;
               
               for (uint i = 0; i < ivo.nrI(); ++i )
                 {
    @@ -276,18 +277,14 @@ namespace engine {
       struct ReadSource : NEXT
         {
           BuffHandle
    -      step (Invocation& started_invocation)
    +      step (Invocation& ivo)
             {
    -          ProcessInvocation ivo (started_invocation);
    +          BuffHandle           *inH  = ivo.buffTab->inHandle;
    +          BuffHandle           *outH = ivo.buffTab->outHandle;
    +          BuffHandle::PBuff *inBuff  = ivo.buffTab->inBuff;
    +          BuffHandle::PBuff *outBuff = ivo.buffTab->outBuff;
               
    -          ASSERT (ivo.buffTab);
    -          ASSERT (0 < ivo.buffTabSize());
    -          ASSERT (ivo.nrO()+ivo.nrI() <= ivo.buffTabSize());
    -          ASSERT (ivo.buffTab->inHandles == &ivo.buffTab->handles[ivo.nrO()]);
    -          BuffHandle           *inH  = ivo.buffTab->inHandles;
    -          BuffHandle           *outH = ivo.buffTab->handles;
    -          BuffHandle::PBuff *inBuff  = ivo.buffTab->inBuffs;
    -          BuffHandle::PBuff *outBuff = ivo.buffTab->buffers;
    +          ASSERT (ivo.nrO() == ivo.nrI() );
               
               for (uint i = 0; i < ivo.nrI(); ++i )
                 {
    @@ -308,13 +305,13 @@ namespace engine {
             {
               ASSERT (ivo.buffTab);
               ASSERT (ivo.nrO() < ivo.buffTabSize());
    -          BuffHandle           *outH = ivo.buffTab->handles;
    -          BuffHandle::PBuff *outBuff = ivo.buffTab->buffers;
    +          BuffHandle           *outH = ivo.buffTab->outHandle;
    +          BuffHandle::PBuff *outBuff = ivo.buffTab->outBuff;
               
               for (uint i = 0; i < ivo.nrO(); ++i )
                 {
                   outBuff[i] =
    -                 *(outH[i] = ivo.allocateBuffer (i));
    +                 *(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType);
                   // now Output buffer for channel #i is available...
                 }
               return NEXT::step (ivo);
    @@ -329,11 +326,12 @@ namespace engine {
           step (Invocation& ivo)
             {
               ASSERT (ivo.buffTab);
    -          ASSERT (ivo.nrO()+ivo.nrI() <= ivo.buffTabSize());
    +          ASSERT (ivo.buffTab_isConsistent());
               ASSERT (this->validateBuffers(ivo));
               
    -           // Invoke our own process() function, providing the buffer array
    -          ivo.wiring.processFunction (ivo.buffTab->buffers);
    +           // Invoke our own process() function,
    +          //  providing the array of outBuffer+inBuffer ptrs
    +          ivo.wiring.processFunction (ivo.buffTab->outBuff);
               
               return NEXT::step (ivo);
             }
    @@ -346,8 +344,8 @@ namespace engine {
           step (Invocation& ivo)
             {
               // declare all Outputs as finished
    -          ivo.isCalculated(ivo.buffTab->handles, 
    -                           ivo.nrO());
    +          ivo.is_calculated(ivo.buffTab->outHandle, 
    +                            ivo.nrO());
               
               return NEXT::step (ivo);
             }
    @@ -360,29 +358,26 @@ namespace engine {
           step (Invocation& ivo)
             {
               // all buffers besides the required Output no longer needed
    -          this->releaseBuffers(ivo.buffTab->handles, 
    +          this->releaseBuffers(ivo.buffTab->outHandle, 
                                    ivo.buffTabSize(), 
                                    ivo.outNr);
               
    -          return ivo.buffTab->outH[this->requiredOutputNr];
    +          return ivo.buffTab->outHandle[ivo.outNr];
             }
         };
       
       
    -
    +  
       
       /* === declare the possible Assembly of these elementary steps === */
       
    -  template
    -  struct OutBuffSource{ static const StateAdapter::BufferProvider VALUE = buffPro; };
    -  
       template
       struct SelectBuffProvider;
       
    -  template<> struct SelectBuffProvider         : OutBuffSource { };
    -  template<> struct SelectBuffProvider : OutBuffSource{ };
    -  template<> struct SelectBuffProvider : OutBuffSource { };
    -  template<> struct SelectBuffProvider<>                : OutBuffSource{ };
    +  template<> struct SelectBuffProvider         : AllocBufferFromCache { };
    +  template<> struct SelectBuffProvider : AllocBufferFromParent{ };
    +  template<> struct SelectBuffProvider : AllocBufferFromCache { };
    +  template<> struct SelectBuffProvider<>                : AllocBufferFromParent{ };
     
       
       template
    @@ -393,28 +388,31 @@ namespace engine {
       template
       struct Strategy< Config >
         : QueryCache<
    -       PullInput<
    -        AllocOutput<
    -         ProcessData<
    -          FeedCache<
    -           ReleaseBuffers< 
    -            OperationBase > > > > > >
    +       AllocBufferTable<
    +        PullInput<
    +         AllocOutput<
    +          ProcessData<
    +           FeedCache<
    +            ReleaseBuffers< 
    +             OperationBase > > > > > > >
         { };
       
       template
       struct Strategy< Config >
    -    : PullInput<
    -       AllocOutput<
    -        ProcessData<
    +    : AllocBufferTable<
    +       PullInput<
    +        AllocOutput<
    +         ProcessData<
               ReleaseBuffers< 
    -           OperationBase > > > > 
    +           OperationBase > > > > >
         { };
       
       template<>
       struct Strategy< Config<> >
    -    : ReadSource<
    -       ReleaseBuffers< 
    -        OperationBase > >  
    +    : AllocBufferTable<
    +       ReadSource<
    +        ReleaseBuffers< 
    +         OperationBase > > >  
         { };
       
       template<>
    @@ -422,15 +420,16 @@ namespace engine {
       
       template<>
       struct Strategy< Config >
    -    : ReadSource<
    -       AllocOutput<
    -        ProcessData<                       // wiring_.processFunction is supposed to do just buffer copying here 
    -         ReleaseBuffers< 
    -          OperationBase > > > >  
    +    : AllocBufferTable<
    +       ReadSource<
    +        AllocOutput<
    +         ProcessData<                       // wiring_.processFunction is supposed to do just buffer copying here 
    +          ReleaseBuffers< 
    +           OperationBase > > > > >  
         { };
    -
       
    -    
    +  
    +  
       
     } // namespace engine
     #endif
    
    From 9a34d234aef013fe982ec355ec4e5075508b650b Mon Sep 17 00:00:00 2001
    From: Ichthyostega 
    Date: Sun, 20 Jul 2008 20:08:08 +0200
    Subject: [PATCH 13/80] WIP pass compiler, after filling in some more stubs
    
    ---
     src/proc/engine/buffhandle.hpp     |  15 ++
     src/proc/engine/nodeinvocation.hpp | 216 +++++++++++++++++++++++++++++
     src/proc/engine/nodeoperation.hpp  | 189 ++++---------------------
     src/proc/engine/nodewiring.cpp     |   3 +-
     src/proc/engine/procnode.hpp       |  13 ++
     5 files changed, 270 insertions(+), 166 deletions(-)
     create mode 100644 src/proc/engine/nodeinvocation.hpp
    
    diff --git a/src/proc/engine/buffhandle.hpp b/src/proc/engine/buffhandle.hpp
    index 60ca7758d..51ce1c135 100644
    --- a/src/proc/engine/buffhandle.hpp
    +++ b/src/proc/engine/buffhandle.hpp
    @@ -84,6 +84,21 @@ namespace engine {
         };
       
       
    +  class ProcNode;
    +  typedef ProcNode* PNode;
    +  
    +  
    +  struct ChannelDescriptor  ///////TODO collapse this with BufferDescriptor?
    +    {
    +      BufferDescriptor bufferType;
    +    };
    +  
    +  struct InChanDescriptor : ChannelDescriptor
    +    {
    +      PNode dataSrc;    ///< the ProcNode to pull this input from
    +      uint srcChannel; ///<  output channel to use on the predecessor node
    +    };
    +  
       
     } // namespace engine
     #endif
    diff --git a/src/proc/engine/nodeinvocation.hpp b/src/proc/engine/nodeinvocation.hpp
    new file mode 100644
    index 000000000..2b5c0afbb
    --- /dev/null
    +++ b/src/proc/engine/nodeinvocation.hpp
    @@ -0,0 +1,216 @@
    +/*
    +  NODEINVOCATION.hpp  -  Organize the invocation state within a single pull() call
    + 
    +  Copyright (C)         Lumiera.org
    +    2008,               Hermann Vosseler 
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +*/
    +
    +/** @file nodeinvocation.hpp
    + ** Organize the state related to the invocation of s single ProcNode::pull() call
    + ** This header defines part of the "glue" which holds together the render node network
    + ** and enables to pull a result frames from the nodes. Doing so requires some invocation
    + ** local state tobe maintained, especially a table of buffers used to carry out the
    + ** calculations. Further, getting the input buffers filled requires to issue recursive
    + ** \c pull() calls, which on the whole creates a stack-like assembly of local invocation
    + ** state.
    + ** The actual steps to be carried out for a \c pull() call are dependant on the configuration
    + ** of the node to pull. Each node has been preconfigured by the builder with a WiringDescriptor
    + ** and a concrete type of a StateAdapter. The actual sequence of steps is defined in the header
    + ** nodeoperation.hpp out of a set of basic operation steps. These steps all use the passed in
    + ** Invocation object (a sub-interface of StateAdapter) to access the various aspects of the
    + ** invocation state.
    + ** 
    + ** \par composition of the Invocation State
    + ** For each individual ProcNode#pull() call, the WiringAdapter#callDown() builds an StateAdapter
    + ** instance directly on the stack, holding the actual buffer pointers and state references. Using this
    + ** StateAdapter, the predecessor nodes are pulled. The way these operations are carried out is encoded
    + ** in the actual StateAdapter type known to the NodeWiring (WiringAdapter) instance. All of these actual
    + ** StateAdapter types are built as implementing the engine::State interface.
    + **
    + ** @see engine::ProcNode
    + ** @see engine::StateProxy
    + ** @see engine::BuffTable
    + ** @see nodewiring.hpp interface for building/wiring the nodes
    + **
    + */
    +
    +#ifndef ENGINE_NODEINVOCATION_H
    +#define ENGINE_NODEINVOCATION_H
    +
    +
    +#include "proc/state.hpp"
    +#include "proc/engine/procnode.hpp"
    +#include "proc/engine/buffhandle.hpp"
    +#include "proc/engine/bufftable.hpp"
    +
    +
    +
    +
    +namespace engine {
    +  
    +  
    +  /**
    +   * Adapter to shield the ProcNode from the actual buffer management,
    +   * allowing the processing function within ProcNode to use logical
    +   * buffer IDs. StateAdapter is created on the stack for each pull()
    +   * call, using setup/wiring data preconfigured by the builder.
    +   * Its job is to provide the actual implementation of the Cache
    +   * push / fetch and recursive downcall to render the source frames.
    +   */
    +  class StateAdapter
    +    : public State
    +    {
    +    protected:
    +      State& parent_;
    +      State& current_;
    +      
    +      StateAdapter (State& callingProcess) 
    +        : parent_ (callingProcess),
    +          current_(callingProcess.getCurrentImplementation())
    +        { }
    +      
    +      virtual State& getCurrentImplementation () { return current_; }
    +      
    +      
    +      
    +    public: /* === proxying the State interface === */
    +      
    +      virtual void releaseBuffer (BuffHandle& bh)       { current_.releaseBuffer (bh); }
    +      
    +      virtual void is_calculated (BuffHandle const& bh) { current_.is_calculated (bh); }
    +      
    +      virtual BuffHandle fetch (FrameID const& fID)     { return current_.fetch (fID); }
    +      
    +      // note: allocateBuffer()  is choosen specifically based on the actual node wiring
    +      
    +    };
    +  
    +  
    +  
    +  
    +  
    +  /**
    +   * Invocation context state.
    +   * A ref to this type is carried through the chain of NEXT::step() functions
    +   * which form the actual invocation sequence. The various operations in this sequence
    +   * access the context via the references in this struct, while also using the inherited
    +   * public State interface. The object instance actually used as Invocation is created
    +   * on the stack and parametrized according to the necessities of the invocation sequence
    +   * actually configured. Initially, this real instance is configured without BuffTable,
    +   * because the invocation may be short-circuited due to Cache hit. Otherwise, when
    +   * the invocation sequence actually prepares to call the process function of this
    +   * ProcNode, a buffer table chunk is allocated by the StateProxy and wired in.
    +   */
    +  struct Invocation
    +    : StateAdapter
    +    {
    +      WiringDescriptor const& wiring;
    +      const uint outNr;
    +      
    +      BuffTable* buffTab;
    +      
    +    protected:
    +      /** creates a new invocation context state, without BuffTable */
    +      Invocation (State& callingProcess, WiringDescriptor const& w, uint o)
    +        : StateAdapter(callingProcess),
    +          wiring(w), outNr(o),
    +          buffTab(0)
    +        { }
    +      
    +      const uint nrO()          const { return wiring.getNrO(); }
    +      const uint nrI()          const { return wiring.getNrI(); }
    +      const uint buffTabSize()  const { return nrO()+nrI(); }
    +      
    +      /** setup the link to an externally allocated buffer table */
    +      void setBuffTab (BuffTable* b) { this->buffTab = b; }
    +      
    +      bool
    +      buffTab_isConsistent ()
    +        {
    +          return (buffTab)
    +              && (0 < buffTabSize())
    +              && (nrO()+nrI() <= buffTabSize())
    +              && (buffTab->inBuff   == &buffTab->outBuff[nrO()]  )
    +              && (buffTab->inHandle == &buffTab->outHandle[nrO()])
    +               ;
    +        }
    +      
    +      
    +    };
    +    
    +    
    +    struct AllocBufferFromParent  ///< using the parent StateAdapter for buffer allocations
    +      : Invocation
    +      {
    +        AllocBufferFromParent (State& sta, WiringDescriptor const& w, const uint outCh) 
    +          : Invocation(sta, w, outCh) {}
    +        
    +        virtual BuffHandle
    +        allocateBuffer (BufferDescriptor const& bd) { return parent_.allocateBuffer(bd); }
    +      };
    +    
    +    struct AllocBufferFromCache   ///< using the global current State, which will delegate to Cache
    +      : Invocation
    +      {
    +        AllocBufferFromCache (State& sta, WiringDescriptor const& w, const uint outCh) 
    +          : Invocation(sta, w, outCh) {}
    +        
    +        virtual BuffHandle
    +        allocateBuffer (BufferDescriptor const& bd) { return current_.allocateBuffer(bd); }
    +      };
    +    
    +  
    +  /**
    +   * The real invocation context state implementation. It is created
    +   * by the NodeWiring (WiringDescriptor) of the processing node which
    +   * is pulled by this invocation, hereby using the internal configuration
    +   * information to guide the selecton of the real call sequence 
    +   * 
    +   * \par assembling the call sequence implementation
    +   * Each ProcNode#pull() call creates such a StateAdapter subclass on the stack,
    +   * with a concrete type according to the WiringDescriptor of the node to pull.
    +   * This concrete type encodes a calculation Strategy, which is assembled
    +   * as a chain of policy templates on top of OperationBase. For each of the
    +   * possible configuratons we define such a chain (see bottom of nodeoperation.hpp).
    +   * The WiringFactory defined in nodewiring.cpp actually drives the instantiation
    +   * of all those possible combinations.
    +   */
    +  template
    +  class ActualInvocationProcess
    +    : public BufferProvider
    +    {
    +    public:
    +      ActualInvocationProcess (State& callingProcess, WiringDescriptor const& w, const uint outCh)
    +        : Invocation(callingProcess, w, outCh)
    +        { }
    +      
    +      /** contains the details of Cache query and recursive calls
    +       *  to the predecessor node(s), eventually followed by the 
    +       *  ProcNode::process() callback
    +       */
    +      BuffHandle retrieve ()
    +        {
    +          return Strategy::step (*this);
    +        }
    +    };
    +  
    +  
    +  
    +  
    +} // namespace engine
    +#endif
    diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp
    index c52c48618..144050d39 100644
    --- a/src/proc/engine/nodeoperation.hpp
    +++ b/src/proc/engine/nodeoperation.hpp
    @@ -22,28 +22,33 @@
     
     /** @file nodeoperation.hpp
      ** Chunks of operation for invoking the rendernodes.
    - ** This header defines the "glue" which holds together the render node network
    + ** This header defines part of the "glue" which holds together the render node network
      ** and enables to pull a result frames from the nodes. Especially, the aspect of
    - ** buffer management is covered here. Each node has been preconfigured by the builder
    - ** with a WiringDescriptor and a concrete type of a StateAdapter. These concrete
    - ** StateAdapter objects are assembled out of the building blocks defined in this header,
    - ** depending on the desired mode of operation. Any node can be built to 
    + ** buffer management and cache query is covered here. Each node has been preconfigured by
    + ** the builder with a WiringDescriptor and a concrete type of a StateAdapter, including
    + ** a specific Configuration, because the node can be built to 
      ** - participate in the Caching or ignore the cache
      ** - actually process a result or just pull frames from a source
      ** - employ in-Place calculations or use separate in/out buffers
      ** Additionally, each node may have a given number of input/output pins, expecting to
      ** be provided with buffers holding a specific kind of data.
      ** 
    - ** \par composition of the StateAdapter
    - ** For each individual ProcNode#pull() call, the WiringAdapter#callDown() builds an StateAdapter
    - ** instance directly on the stack, holding the actual buffer pointers and state references. Using this
    + ** \par composition of the invocation Strategy
    + ** For each individual ProcNode#pull() call, the WiringAdapter#callDown() builds an Invocation state
    + ** instance directly on the stack, holding references to the actual buffer pointers and state. Using this
      ** StateAdapter, the predecessor nodes are pulled. The way these operations are carried out is encoded
    - ** in the actual StateAdapter type known to the NodeWiring (WiringAdapter) instance. All of these actual
    - ** StateAdapter types are built as implementing the engine::State interface, on top of the InvocationStateBase
    - ** and inheriting from a chain of strategy classes (single inheritance, mostly \em no virtual functions).
    + ** in the actual type of Strategy, which is defined at the bottom of this header. Each Strategy is a chain
    + ** of elementary operations invoking each other (\c NEXT::step(invocation) ). Notably, all those possible
    + ** configurations are pre-build while compiling (it's a small number below 32 configuration instance).
    + ** To be able to select the Strategy for each configuration, we need a Factory (ConfigSelector defined in
    + ** nodewiringconfig). which is actually instantiated and used in nodewiring.cpp, which is the object
    + ** file holding all those instantiations. 
      **
      ** @see engine::ProcNode
    - ** @see engine::StateProxy
    + ** @see engine::Invocation
    + ** @see engine::State
    + ** @see engine::NodeFactory
    + ** @see nodewiringconfig.hpp
      ** @see nodewiring.hpp interface for building/wiring the nodes
      **
      */
    @@ -56,8 +61,8 @@
     #include "proc/engine/procnode.hpp"
     #include "proc/engine/buffhandle.hpp"
     #include "proc/engine/bufftable.hpp"
    +#include "proc/engine/nodeinvocation.hpp"
     #include "proc/engine/nodewiringconfig.hpp"
    -#include "lib/appconfig.hpp"
     
     
     
    @@ -65,154 +70,6 @@
     namespace engine {
       
       
    -  /**
    -   * Adapter to shield the ProcNode from the actual buffer management,
    -   * allowing the processing function within ProcNode to use logical
    -   * buffer IDs. StateAdapter is created on the stack for each pull()
    -   * call, using setup/wiring data preconfigured by the builder.
    -   * Its job is to provide the actual implementation of the Cache
    -   * push / fetch and recursive downcall to render the source frames.
    -   */
    -  class StateAdapter
    -    : public State
    -    {
    -    protected:
    -      State& parent_;
    -      State& current_;
    -      
    -      StateAdapter (State& callingProcess) 
    -        : parent_ (callingProcess),
    -          current_(callingProcess.getCurrentImplementation())
    -        { }
    -      
    -      virtual State& getCurrentImplementation () { return current_; }
    -      
    -      
    -      
    -    public: /* === proxying the State interface === */
    -      
    -      virtual void releaseBuffer (BuffHandle& bh)       { current_.releaseBuffer (bh); }
    -      
    -      virtual void is_calculated (BuffHandle const& bh) { current_.is_calculated (bh); }
    -      
    -      virtual BuffHandle fetch (FrameID const& fID)     { return current_.fetch (fID); }
    -      
    -      // note: allocateBuffer()  is choosen specifically based on the actual node wiring
    -      
    -    };
    -  
    -  
    -  
    -  
    -  
    -  /**
    -   * Invocation context state.
    -   * A ref to this type is carried through the chain of NEXT::step() functions
    -   * which form the actual invocation sequence. The various operations in this sequence
    -   * access the context via the references in this struct, while also using the inherited
    -   * public State interface. The object instance actually used as Invocation is created
    -   * on the stack and parametrized according to the necessities of the invocation sequence
    -   * actually configured. Initially, this real instance is configured without BuffTable,
    -   * because the invocation may be short-circuited due to Cache hit. Otherwise, when
    -   * the invocation sequence actually prepares to call the process function of this
    -   * ProcNode, a buffer table chunk is allocated by the StateProxy and wired in.
    -   */
    -  struct Invocation
    -    : StateAdapter
    -    {
    -      WiringDescriptor const& wiring;
    -      const uint outNr;
    -      
    -      BuffTable* buffTab;
    -      
    -    protected:
    -      /** creates a new invocation context state, without BuffTable */
    -      Invocation (State& callingProcess, WiringDescriptor const& w, uint o)
    -        : StateAdapter(callingProcess),
    -          wiring(w), outNr(o),
    -          buffTab(0)
    -        { }
    -      
    -      const uint nrO()          const { return wiring.getNrO(); }
    -      const uint nrI()          const { return wiring.getNrI(); }
    -      const uint buffTabSize()  const { return nrO()+nrI(); }
    -      
    -      /** setup the link to an externally allocated buffer table */
    -      void setBuffTab (BuffTable* b) { this->buffTab = b; }
    -      
    -      bool
    -      buffTab_isConsistent ()
    -        {
    -          return (buffTab)
    -              && (0 < buffTabSize())
    -              && (nrO()+nrI() <= buffTabSize())
    -              && (buffTab->inBuff   == &buffTab->outBuff[nrO()]  )
    -              && (buffTab->inHandle == &buffTab->outHandle[nrO()])
    -               ;
    -        }
    -      
    -      
    -    };
    -    
    -    
    -    struct AllocBufferFromParent  ///< using the parent StateAdapter for buffer allocations
    -      : Invocation
    -      {
    -        AllocBufferFromParent (State& sta, WiringDescriptor const& w, const uint outCh) 
    -          : Invocation(sta, w, outCh) {}
    -        
    -        virtual BuffHandle
    -        allocateBuffer (BufferDescriptor const& bd) { return parent_.allocateBuffer(bd); }
    -      };
    -    
    -    struct AllocBufferFromCache   ///< using the global current State, which will delegate to Cache
    -      : Invocation
    -      {
    -        AllocBufferFromCache (State& sta, WiringDescriptor const& w, const uint outCh) 
    -          : Invocation(sta, w, outCh) {}
    -        
    -        virtual BuffHandle
    -        allocateBuffer (BufferDescriptor const& bd) { return current_.allocateBuffer(bd); }
    -      };
    -    
    -  
    -  /**
    -   * The real invocation context state implementation. It is created
    -   * by the NodeWiring (WiringDescriptor) of the processing node which
    -   * is pulled by this invocation, hereby using the internal configuration
    -   * information to guide the selecton of the real call sequence 
    -   * 
    -   * \par assembling the call sequence implementation
    -   * Each ProcNode#pull() call creates such a StateAdapter subclass on the stack,
    -   * with a concrete type according to the WiringDescriptor of the node to pull.
    -   * This concrete type encodes a calculation Strategy, which is assembled
    -   * as a chain of policy templates on top of OperationBase. For each of the
    -   * possible configuratons we define such a chain (see bottom of nodeoperation.hpp).
    -   * The WiringFactory defined in nodewiring.cpp actually drives the instantiation
    -   * of all those possible combinations.
    -   */
    -  template
    -  class ActualInvocationProcess
    -    : public BufferProvider
    -    {
    -    public:
    -      ActualInvocationProcess (State& callingProcess, WiringDescriptor const& w, const uint outCh)
    -        : Invocation(callingProcess, w, outCh)
    -        { }
    -      
    -      /** contains the details of Cache query and recursive calls
    -       *  to the predecessor node(s), eventually followed by the 
    -       *  ProcNode::process() callback
    -       */
    -      BuffHandle retrieve ()
    -        {
    -          return Strategy::step (*this);
    -        }
    -    };
    -  
    -  
    -  
    -  
       /**
        * Collection of functions used to build up the invocation sequence.
        */
    @@ -311,7 +168,7 @@ namespace engine {
               for (uint i = 0; i < ivo.nrO(); ++i )
                 {
                   outBuff[i] =
    -                 *(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType);
    +                 *(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType));
                   // now Output buffer for channel #i is available...
                 }
               return NEXT::step (ivo);
    @@ -343,9 +200,11 @@ namespace engine {
           BuffHandle 
           step (Invocation& ivo)
             {
    -          // declare all Outputs as finished
    -          ivo.is_calculated(ivo.buffTab->outHandle, 
    -                            ivo.nrO());
    +          for (uint i = 0; i < ivo.nrO(); ++i )
    +            {
    +              // declare all Outputs as finished
    +              ivo.is_calculated(ivo.buffTab->outHandle[i]);
    +            }
               
               return NEXT::step (ivo);
             }
    diff --git a/src/proc/engine/nodewiring.cpp b/src/proc/engine/nodewiring.cpp
    index 023253a0e..a9cafa1a8 100644
    --- a/src/proc/engine/nodewiring.cpp
    +++ b/src/proc/engine/nodewiring.cpp
    @@ -46,7 +46,8 @@ namespace engine {
       {
         UNIMPLEMENTED ("build the actual wiring descriptor based on given operation options");
         
    -    return selectConfig(cache, process, inplace).fabricate();
    +//    Bits config (FlagInfo::CODE);
    +//    return selector(config);
       }
       // BlockAlloc > > >::fabricate();
     
    diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp
    index 2d5af1a3a..74fa86254 100644
    --- a/src/proc/engine/procnode.hpp
    +++ b/src/proc/engine/procnode.hpp
    @@ -60,6 +60,12 @@ namespace engine {
       
       typedef ProcNode* PNode;
       
    +  template
    +  struct RefArray
    +    {
    +      virtual E const& operator[] (uint i)  const =0;
    +      virtual ~RefArray() {}
    +    };
       
       /**
        * Interface: Description of the input and output ports,
    @@ -73,6 +79,13 @@ namespace engine {
           virtual uint getNrI()  const =0;           ///////////TODO: indeed need a virtual function??
           virtual uint getNrO()  const =0;
           
    +      RefArray& out;
    +      RefArray&  in;
    +      
    +      typedef void (ProcFunc) (BuffHandle::PBuff, uint);
    +      
    +      ProcFunc* processFunction;
    +      
         protected:
           /** the wiring-dependent part of the node operation.
            *  Includes the creation of a one-way state object on the stack
    
    From e5d75eee9bfc3456b563f66c43ba6fb4cdc72f83 Mon Sep 17 00:00:00 2001
    From: Ichthyostega 
    Date: Mon, 21 Jul 2008 03:25:06 +0200
    Subject: [PATCH 14/80] test covering the stack-wise buffer pointer table
     allocation
    
    ---
     src/proc/engine/procnode.hpp                  |   7 +
     tests/56engine.tests                          |   5 +
     tests/SConscript                              |   8 +-
     .../components/proc/engine/bufftabletest.cpp  | 180 ++++++++++++++++++
     4 files changed, 196 insertions(+), 4 deletions(-)
     create mode 100644 tests/components/proc/engine/bufftabletest.cpp
    
    diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp
    index 74fa86254..13d6e2241 100644
    --- a/src/proc/engine/procnode.hpp
    +++ b/src/proc/engine/procnode.hpp
    @@ -87,6 +87,13 @@ namespace engine {
           ProcFunc* processFunction;
           
         protected:
    +      WiringDescriptor (RefArray& o, 
    +                        RefArray& i,
    +                        ProcFunc pFunc)
    +        : out(o), in(i),
    +          processFunction(pFunc)
    +        { }  
    +      
           /** the wiring-dependent part of the node operation.
            *  Includes the creation of a one-way state object on the stack
            *  holding the actual buffer pointers and issuing the recrusive pull() calls
    diff --git a/tests/56engine.tests b/tests/56engine.tests
    index 239fbca71..f2059ab32 100644
    --- a/tests/56engine.tests
    +++ b/tests/56engine.tests
    @@ -2,5 +2,10 @@ TESTING "Component Test Suite: Render Engine parts" ./test-components --group=en
     
     
     
    +TEST "BuffTable_test" BuffTable_test <
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +* *****************************************************/
    +
    +
    +#include "common/test/run.hpp"
    +#include "common/error.hpp"
    +
    +#include "proc/engine/procnode.hpp"
    +#include "proc/engine/bufftable.hpp"
    +
    +#include 
    +#include 
    +#include 
    +#include 
    +
    +using test::Test;
    +using std::cout;
    +using std::rand;
    +
    +
    +namespace engine {
    +  namespace test {
    +  
    +    namespace { // used internally
    +      
    +      const uint TABLE_SIZ = 100000;
    +      const uint CHUNK_MAX = 8000;
    +      const uint WIDTH_MAX = 3;
    +      
    +      
    +      /** just some crap to pass in as ctor argument... */
    +      template
    +      struct DummyArray : RefArray
    +        {
    +          E decoy;
    +          E const& operator[] (uint i)  const  { return decoy;}
    +        };
    +      DummyArray dummy1;
    +      DummyArray  dummy2;
    +      
    +      
    +      /** a "hijacked" WiringDescriptor requesting
    +       *  a random number of inputs and outputs */
    +      struct MockSizeRequest
    +        : WiringDescriptor
    +        {
    +          uint ii,oo;
    +          
    +          MockSizeRequest()
    +            : WiringDescriptor(dummy1,dummy2,0),
    +              ii(rand() % CHUNK_MAX),
    +              oo(rand() % CHUNK_MAX)
    +            { }
    +          
    +          virtual uint getNrI()  const { return ii; }
    +          virtual uint getNrO()  const { return oo; }
    +          
    +          virtual BuffHandle callDown (State&, uint) const
    +          { throw lumiera::Error("not intended to be called"); }
    +        };
    +      
    +      
    +      
    +      void*
    +      detect_start_level (BuffTableStorage& sto)
    +      {
    +        return BuffTableChunk(MockSizeRequest(), sto ).outHandle;
    +      }       // address of first available storage element
    +      
    +      
    +      inline void*
    +      first_behind (BuffTable const& thisChunk, const uint nrI)
    +      {
    +        return &thisChunk.inHandle[nrI];
    +      }
    +      
    +      
    +      inline bool
    +      not_within(void* candidate, void* lower, void* upper)
    +      {
    +        return (candidate < lower) || (upper <= candidate);
    +      }
    +      
    +      
    +      bool
    +      consistencyCheck (BuffTable const& b, WiringDescriptor const& num, void* lastLevel)
    +      {
    +        return (b.outHandle == lastLevel )  // storage is allocated continously
    +            && (b.outBuff   <= b.inBuff  )  // input slots are behind the output slots
    +            && (b.outHandle <= b.inHandle)
    +            && (b.inBuff   == &b.outBuff  [num.getNrO()])
    +            && (b.inHandle == &b.outHandle[num.getNrO()])
    +            && (not_within(b.outBuff, b.outHandle, &b.inHandle[num.getNrO()])) // storage doesn't overlap
    +            && (not_within(b.inBuff,  b.outHandle, &b.inHandle[num.getNrO()]))
    +            && (not_within(b.outHandle, b.outBuff, &b.inBuff[num.getNrO()]))
    +            && (not_within(b.inHandle,  b.outBuff, &b.inBuff[num.getNrO()]))
    +             ;
    +      }
    +    } // (End) internal defs
    +    
    +    
    +    
    +    /*******************************************************************
    +     * @test create a random pattern of recursive invocations, each
    +     *       allocating a chunk out of a global buffer table storage.
    +     *       After returning, each allocation should be cleanly
    +     *       deallocated and the internal level in the storage vector
    +     *       should have dopped to zero again.
    +     */
    +    class BuffTable_test : public Test
    +      {
    +        typedef boost::scoped_ptr PSto;
    +        
    +        PSto pStorage;
    +        ulong counter;
    +        
    +        virtual void run(Arg arg) 
    +          {
    +             counter = 0;
    +             std::srand (time (NULL));
    +             
    +             // allocate storage block to be used chunk wise
    +             pStorage.reset (new BuffTableStorage (TABLE_SIZ));
    +             
    +             invocation (0, detect_start_level(*pStorage));
    +             
    +             pStorage.reset(0);  // dtor throws assertion error if corrupted
    +             
    +             cout << "BuffTable chunks allocated: "<
    Date: Tue, 22 Jul 2008 08:19:03 +0200
    Subject: [PATCH 15/80] more testing
    
    ---
     src/common/typelist.hpp              |   6 +-
     src/proc/engine/nodewiringconfig.hpp | 214 +++++++++++----------
     src/tool/try.cpp                     | 277 +++++++--------------------
     tests/common/typelistmaniptest.cpp   | 189 ++++++++++++++++++
     4 files changed, 382 insertions(+), 304 deletions(-)
     create mode 100644 tests/common/typelistmaniptest.cpp
    
    diff --git a/src/common/typelist.hpp b/src/common/typelist.hpp
    index f358a605e..f4921791c 100644
    --- a/src/common/typelist.hpp
    +++ b/src/common/typelist.hpp
    @@ -64,11 +64,15 @@ namespace lumiera
       namespace typelist
         {
         
    -    class NullType { };
    +    class NullType 
    +      { 
    +        typedef NullType List;
    +      };
         
         template 
         struct Node
           {
    +        typedef Node List;
             typedef H Head;
             typedef T Tail;
           };
    diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp
    index 1fc221bf6..24fd44ad9 100644
    --- a/src/proc/engine/nodewiringconfig.hpp
    +++ b/src/proc/engine/nodewiringconfig.hpp
    @@ -40,132 +40,151 @@ namespace lumiera {
       namespace typelist {
       
         template
    -    struct CondNode
    -      : TAIL
    -      { 
    -        typedef TAIL Next; 
    -      };
    -    template
    -    struct CondNode
    -      : Node
    -      { 
    -        typedef Node Next; 
    -      };
    +    struct CondNode                        { typedef TAIL  Next; };
         
    -    template class _P_>
    +    template
    +    struct CondNode         { typedef Node  Next; };
    +    
    +    
    +    template< class TYPES
    +            , template class _P_
    +            >
         struct Filter;
         
         template class _P_>
    -    struct Filter
    -      : NullType
    -      {
    -        typedef NullType Next;
    -      };
    -    template class _P_>
    -    struct Filter,_P_>
    -      : CondNode<_P_::value, TY, TYPES>
    -      {
    -        typedef CondNode<_P_::value, TY, TYPES> Next;
    -      };
    +    struct Filter            { typedef NullType  List; };
    +    
    +    template< class TY, class TYPES
    +            , template class _P_
    +            >
    +    struct Filter,_P_>      { typedef typename CondNode<_P_::value
    +                                                                      , TY
    +                                                                      , typename Filter::List
    +                                                                      >::Next      
    +                                                                      List; };
    +    
         
         
         template
    -    struct Append : Types::List
    -      { };
    +    struct Append                          { typedef Node::List>  List; };
    +    
    +    template< class TY, class TYPES
    +            , class TAIL
    +            >
    +    struct Append, TAIL>    { typedef Node::List>  List; };
    +    
    +    template
    +    struct Append >   { typedef Node   List; };
    +    
    +    template
    +    struct Append, NullType>    { typedef Node   List; };
    +    
         template
    -    struct Append
    -      : Node
    -      { };
    +    struct Append            { typedef Node   List; };
    +    
         template
    -    struct Append
    -      : Node
    -      { };
    -    template
    -    struct Append >
    -      : Node
    -      { };
    -    template
    -    struct Append, NullType>
    -      : Node
    -      { };
    -    template
    -    struct Append, TAIL>
    -      : Node >
    -      { };
    +    struct Append            { typedef Node   List; };
    +    
    +    template<>
    +    struct Append       { typedef NullType             List; };
    +    
    +    
    +    
         
         template
    -    struct PrefixAll
    -      : Append
    -      { };
    +    struct PrefixAll                       { typedef typename Append::List  List; };
    +    
         template
    -    struct PrefixAll
    -      : NullType
    -      { };
    -    template
    -    struct PrefixAll >
    -      : Node< Append
    -            , PrefixAll
    +    struct PrefixAll          { typedef NullType  List; };
    +    
    +    template< class T
    +            , class TY, class TYPES
                 >
    -      { };
    +    struct PrefixAll >   { typedef Node< typename Append::List
    +                                                         , typename PrefixAll::List
    +                                                         >     List; };
    +    
    +    
    +    
         
         template
    -    struct Distribute : Append
    -      { };
    -    template
    -    struct Distribute, TAIL>
    -      : Append< PrefixAll
    -              , Distribute
    -              >
    -      { };
    -    template class _PERM_>
    -    struct Combine : Distribute<_PERM_, NullType>
    -      { };
    -    template class _PERM_>
    -    struct Combine,_PERM_>
    -      : Distribute<_PERM_, Combine >
    -      { };
    +    struct Distribute                      { typedef typename Append::List  List; };
    +    
    +    template< class TY, class TYPES
    +            , class TAIL
    +            >
    +    struct Distribute,TAIL> { typedef typename Append< typename PrefixAll::List
    +                                                                    , typename Distribute::List
    +                                                                    >::List                    
    +                                                                    List; };
    +    
    +    
    +    
    +    
    +    template< class X
    +            , template class _PERMU_>
    +    struct Combine                         { typedef typename Distribute< typename _PERMU_::List
    +                                                                        , NullType
    +                                                                        >::List  List; };
    +    
    +    template< class TY, class TYPES
    +            , template class _PERMU_>
    +    struct Combine,_PERMU_> { typedef typename Distribute< typename _PERMU_::List
    +                                                                        , typename Combine::List
    +                                                                        >::List  List; };
    +    
         
         template
    -    struct FlagOnOff : Types::List
    -      { };
    +    struct FlagOnOff
    +      { 
    +        typedef typename Types::List  List;
    +      };
         
         template
         struct CombineFlags
    -      : Combine
    -      { };
    +      { 
    +        typedef typename Combine::List  List; 
    +      };
    +    
         
         
         using std::max;
         
         
    -    template  struct Flag                { };
    -    template<>          struct Flag<0> : NullType  { };
    +    template struct Flag    { typedef Flag     ID; };
    +    template<>         struct Flag<0> { typedef NullType ID; };
    +    
    +    
         template< char f1=0
                 , char f2=0
                 , char f3=0
                 , char f4=0
                 , char f5=0
                 >
    -    struct FlagTuple 
    -      : Types< Flag
    -             , Flag
    -             , Flag
    -             , Flag
    -             , Flag
    -             >::List
    -      { };
    -      
    -    template< char f1=0
    -            , char f2=0
    -            , char f3=0
    -            , char f4=0
    -            , char f5=0
    -            >
    -    struct Config
    -      {
    -        typedef FlagTuple Flags;
    +    struct Flags        
    +      { 
    +        typedef typename Types< typename Flag::ID
    +                              , typename Flag::ID
    +                              , typename Flag::ID
    +                              , typename Flag::ID
    +                              , typename Flag::ID
    +                              >::List       
    +                              Tuple;
           };
         
    +    
    +    template< char f1=0
    +            , char f2=0
    +            , char f3=0
    +            , char f4=0
    +            , char f5=0
    +            >
    +    struct Config 
    +      { 
    +        typedef typename Flags::Tuple  Flags; 
    +      };
    +    
    +    
         template
         struct DefineConfigByFlags;
         
    @@ -175,9 +194,10 @@ namespace lumiera {
                 , char f4
                 , char f5
                 >
    -    struct DefineConfigByFlags< FlagTuple >
    -      : Config
    -      { };
    +    struct DefineConfigByFlags< typename Flags::Tuple >
    +      { 
    +        typedef Config Config; 
    +      };
         
         
         /** 
    @@ -364,7 +384,7 @@ namespace engine {
               void
               visit (ulong code)
                 {
    -              typedef DefineConfigByFlags Config;
    +              typedef typename DefineConfigByFlags::Config Config;
                   factories_[code].reset (new FactoryHolder > (ctor_param_));
                 }
               
    diff --git a/src/tool/try.cpp b/src/tool/try.cpp
    index 85a3286a0..f4c56b8c4 100644
    --- a/src/tool/try.cpp
    +++ b/src/tool/try.cpp
    @@ -10,162 +10,88 @@
     // 4/08  - comparison operators on shared_ptr
     // 4/08  - conversions on the value_type used for boost::any
     // 5/08  - how to guard a downcasting access, so it is compiled in only if the involved types are convertible
    +// 7/08  - combining partial specialisation and subclasses 
     
     
     #include 
     #include 
     #include 
    -
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -
    +#include 
     
     using std::string;
     using std::cout;
     using std::ostream;
    +using boost::format;
     
     
    -    using boost::remove_pointer;
    -    using boost::remove_reference;
    -    using boost::is_convertible;
    -    using boost::is_polymorphic;
    -    using boost::is_base_of;
    -    using boost::enable_if;
    -    
    -    template 
    -    struct can_cast : boost::false_type {};
    -
    -    template 
    -    struct can_cast          { enum { value = is_base_of::value };};
    -
    -    template 
    -    struct can_cast         { enum { value = is_base_of::value };};
    -
    -    template 
    -    struct can_cast          { enum { value = is_base_of::value };};
    -    
    -    
    -    template 
    -    struct has_RTTI
    -      {
    -        typedef typename remove_pointer<
    -                typename remove_reference::type>::type TPlain;
    +#include 
    +using boost::enable_if;
    +#include 
    +using boost::is_base_of;
    +  
    +  
    +#include "common/typelistutil.hpp"
    +using lumiera::typelist::NullType;
    +using lumiera::typelist::Node;
    +using lumiera::typelist::Types;
    +  
    +  
    +  namespace {
           
    -        enum { value = is_polymorphic::value };
    -      };
    -    
    -    template 
    -    struct use_dynamic_downcast
    -      {
    -        enum { value = can_cast::value
    -                       &&  has_RTTI::value
    -                       &&  has_RTTI::value
    -             };
    -      };
    -    
    -    template 
    -    struct use_static_downcast
    -      {
    -        enum { value = can_cast::value
    -                    && (  !has_RTTI::value
    -                       || !has_RTTI::value
    -                       )
    -             };
    -      };
    -    
    -    template 
    -    struct use_conversion
    -      {
    -        enum { value = is_convertible::value
    -                    && !( use_static_downcast::value
    -                        ||use_dynamic_downcast::value
    -                        )
    -             };
    -      };
    -    
    +      boost::format fmt ("<%2i>");
    +      
    +      /** constant-wrapper type for debugging purposes,
    +       *  usable for generating lists of distinghishable types
    +       */
    +      template
    +      struct Num
    +        {
    +          enum{ VAL=I };
    +          static string str () { return boost::str (fmt % I); }
    +          Num()
    +            {
    +              cout << Num::str();
    +            }
    +        };
    +      
    +      
    +      template
    +        < class TYPES 
    +        , class BASE = NullType
    +        >
    +      struct Zoing;
    +      
    +      
    +      template
    +      struct Zoing
    +        : BASE
    +        { 
    +        };
    +      
    +      
    +      template
    +        < class TY, typename TYPES
    +        , class BASE
    +        >
    +      struct Zoing, BASE> 
    +        :  TY,
    +           Zoing
    +        { 
    +        };
    +      
    +      
    +  }
    +  
    +  typedef Types< Num<1>
    +               , Num<2>
    +               , Num<3>
    +               >::List List1;
    +  
    +  struct B
    +    { typedef List1 Zeug; };
    +  struct D : B 
    +    {};
     
    -    template
    -    struct EmptyVal
    -      {
    -        static X create() 
    -          {
    -            cout << " NULL() " << __PRETTY_FUNCTION__ <<"\n";
    -            return X(); 
    -          }
    -      };
    -    template
    -    struct EmptyVal
    -      {
    -        static X*& create() 
    -          {
    -            cout << " NULL & " << __PRETTY_FUNCTION__ <<"\n";
    -            static X* null(0);
    -            return null; 
    -          }
    -      };
    -    
    -    
    -    template
    -    struct NullAccessor
    -      {
    -        typedef RET Ret;
    -        
    -        static RET access  (...) { return ifEmpty(); }
    -        static RET ifEmpty ()    { return EmptyVal::create(); }
    -      };
    -    
    -    template
    -    struct AccessCasted : NullAccessor
    -      {
    -        using NullAccessor::access;
    -        
    -        template
    -        static  typename enable_if< use_dynamic_downcast, TAR>::type
    -        access (ELM& elem) 
    -          { 
    -            cout << " dynamic " << __PRETTY_FUNCTION__ <<"\n";
    -            return dynamic_cast (elem); 
    -          }
    -        
    -        template
    -        static  typename enable_if< use_static_downcast, TAR>::type
    -        access (ELM& elem) 
    -          { 
    -            cout << " static " << __PRETTY_FUNCTION__ <<"\n";
    -            return static_cast (elem); 
    -          }
    -        
    -        template
    -        static  typename enable_if< use_conversion, TAR>::type
    -        access (ELM& elem) 
    -          { 
    -            cout << " convert " << __PRETTY_FUNCTION__ <<"\n";
    -            return elem; 
    -          }
    -            
    -      };
    -
    -
    -
    -
    -struct B {};
    -struct D : B {};
    -
    -struct E : D
    -  {
    -    virtual ~E() {};
    -  };
    -struct F : E {};
    -
    -
    -ostream& operator<< (ostream& s, const B& b) { return s << "B{} adr="<<&b; }
    -ostream& operator<< (ostream& s, const D& d) { return s << "D{} adr="<<&d; }
    -ostream& operator<< (ostream& s, const E& e) { return s << "E{} adr="<<&e; }
    -ostream& operator<< (ostream& s, const F& f) { return s << "F{} adr="<<&f; }
     
     int 
     main (int argc, char* argv[])
    @@ -173,71 +99,10 @@ main (int argc, char* argv[])
         
         NOBUG_INIT;
         
    -    D d;
    -    D* pD =&d;
    -    B* pB =pD;
    -    D& rD = *pD;
    -    B& rB = *pB;
    -
    -    D*& rpD = pD;
    -    B*& rpB = pB;
    -
    -    F f;
    -    E& rE = f;
    -    E* pE = &f;
    -    D* pDE = pE;
    +    typedef Zoing Boing;
         
    -    cout <<  "is_base_of = "   << is_base_of::value << "\n";
    -    cout <<  "is_base_of = " << is_base_of::value << "\n";
    -    cout <<  "is_base_of = " << is_base_of::value << "\n";
    -
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -    cout <<  "can_cast = " << can_cast::value << "\n";
    -
    -    cout <<  "has_RTTI = " << has_RTTI::value << "\n";
    -    cout <<  "has_RTTI = " << has_RTTI::value << "\n";
    -    cout <<  "has_RTTI = " << has_RTTI::value << "\n";
    +    Boing();
         
    -    
    -    cout <<  "use_dynamic_downcast = " << use_dynamic_downcast::value << "\n";
    -    cout <<  "use_static_downcast = " << use_static_downcast::value << "\n";
    -    cout <<  "use_conversion = "      << use_conversion::value << "\n";
    -
    -    cout <<  "use_static_downcast = " << use_static_downcast::value << "\n";
    -    cout <<  "use_static_downcast = " << use_static_downcast::value << "\n";
    -    cout <<  "use_dynamic_downcast = " << use_dynamic_downcast::value << "\n";
    -    
    -    
    -    cout <<  "Access(D  as D&) --->" << AccessCasted::access(d)  << "\n";
    -    cout <<  "Access(D& as D&) --->" << AccessCasted::access(rD) << "\n";
    -    cout <<  "Access(B& as D&) --->" << AccessCasted::access(rB) << "\n";
    -    cout <<  "Access(D* as D*) --->" << AccessCasted::access(pD) << "\n";
    -    cout <<  "Access(B* as D*) --->" << AccessCasted::access(pB) << "\n";
    -    cout <<  "Access(D*& as D*&) --->" << AccessCasted::access(rpD) << "\n";
    -    cout <<  "Access(B*& as D*&) --->" << AccessCasted::access(rpB) << "\n";
    -    
    -    cout <<  "Access(D  as B&) --->" << AccessCasted::access(d)  << "\n";
    -    cout <<  "Access(D& as B&) --->" << AccessCasted::access(rD) << "\n";
    -    cout <<  "Access(B& as B&) --->" << AccessCasted::access(rB) << "\n";
    -    cout <<  "Access(D* as B*) --->" << AccessCasted::access(pD) << "\n";
    -    cout <<  "Access(B* as B*) --->" << AccessCasted::access(pB) << "\n";
    -    cout <<  "Access(D*& as B*&) --->" << AccessCasted::access(rpD) << "\n";
    -    cout <<  "Access(B*& as B*&) --->" << AccessCasted::access(rpB) << "\n";
    -    
    -    cout <<  "Access(D  as E&) --->" << AccessCasted::access(d) << "\n";
    -    cout <<  "Access(E& as F&) --->" << AccessCasted::access(rE) << "\n";
    -    cout <<  "Access(D(E)* as E*) --->" << AccessCasted::access(pDE) << "\n";
    -    cout <<  "Access(D(E)* as F*) --->" << AccessCasted::access(pDE) << "\n";
    -    cout <<  "Access(E* as F*) --->" << AccessCasted::access(pE) << "\n";
    -
         cout <<  "\ngulp\n";
         
         
    diff --git a/tests/common/typelistmaniptest.cpp b/tests/common/typelistmaniptest.cpp
    new file mode 100644
    index 000000000..0ae0d08ff
    --- /dev/null
    +++ b/tests/common/typelistmaniptest.cpp
    @@ -0,0 +1,189 @@
    +/*
    +  TypeListManip(Test)  -  appending, mixing and filtering typelists
    + 
    +  Copyright (C)         Lumiera.org
    +    2008,               Hermann Vosseler 
    + 
    +  This program is free software; you can redistribute it and/or
    +  modify it under the terms of the GNU General Public License as
    +  published by the Free Software Foundation; either version 2 of the
    +  License, or (at your option) any later version.
    + 
    +  This program is distributed in the hope that it will be useful,
    +  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +  GNU General Public License for more details.
    + 
    +  You should have received a copy of the GNU General Public License
    +  along with this program; if not, write to the Free Software
    +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    + 
    +* *****************************************************/
    +
    +
    +/** @file typelistmaniptest.cpp
    + ** \par checking the correct working of basic list manipulation
    + **
    + ** The semi-automatic assembly of processing node invocation code utilizes some
    + ** metaprogramming magic built upon simple list manipulation. As template metaprogramming
    + ** is kind-of functional programming, most of this is done by recursion.
    + ** To check the correct working, this test uses some constant-wrapper types and a debugging
    + ** template which will print these constant numbers when creating an instance. This allows to
    + ** verify in the output if lists of such constant-wrapper types were manipulated as expected.
    + **
    + ** @see typelisttest.cpp
    + ** @see typelistutil.hpp
    + ** @see nodewiringconfig.hpp real world usage example
    + **
    + */
    +
    +
    +#include "common/test/run.hpp"
    +#include "common/typelistutil.hpp"
    +#include "common/util.hpp"
    +#include "proc/engine/nodewiringconfig.hpp"  ///////////TODO move to typelistutil.hpp
    +
    +#include 
    +#include 
    +
    +using ::test::Test;
    +using std::string;
    +using std::cout;
    +
    +
    +namespace lumiera {
    +  namespace typelist {
    +    namespace test {
    +      
    +      
    +      namespace { // internal definitions
    +      
    +        boost::format fmt ("<%i>");
    +        
    +        /** constant-wrapper type for debugging purposes,
    +         *  usable for generating lists of distinghishable types
    +         */
    +        template
    +        struct Num
    +          {
    +            enum{ VAL=I };
    +            static string str () { return boost::str (fmt % I); }
    +          };
    +        
    +        
    +        /** debugging template, 
    +         *  printing the "number" used for intantiation on ctor call
    +         */
    +        template
    +        struct Printer;
    +        
    +        template
    +        struct Printer, BASE>
    +          : BASE
    +          {
    +            static string print () { return string("-") + Num::str() + BASE::print(); }
    +          };
    +        template
    +        struct Printer
    +          {
    +            static string print () { return "-"; }
    +          };
    +        
    +        
    +        
    +        typedef Types< Num<1>
    +                     , Num<2>
    +                     , Num<3>
    +                     >::List List1;
    +        typedef Types< Num<5>
    +                     , Num<6>
    +                     , Num<7>
    +                     >::List List2;
    +        
    +        
    +#define DIAGNOSE(LIST) \
    +        typedef InstantiateChained >  Contents_##LIST;
    +                     
    +#define DISPLAY(NAME)  \
    +        DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n";
    +        
    +      } // (End) internal defs
    +      
    +      
    +      
    +      
    +      
    +      
    +      /*************************************************************************
    +       * @test check utilities for manipulating lists-of-types.
    +       *       
    • build an list of constant-wrapper-types and + * print them for debugging purpose.
    • + *
    + */ + class TypeListManipl_test : public Test + { + virtual void run(Arg arg) + { + check_diagnostics (); + check_append (); + } + + + void check_diagnostics () + { + // Explanation: the DISPLAY macro expands as follows.... + typedef InstantiateChained > Contents_List1; + cout << "List1" << "\t" << Contents_List1::print() << "\n"; + + // That is: we instantiate the "Printer" template for each of the types in List1, + // forming an inheritance chain. I.e. the defined Type "Contents_List1" inherits + // from each instantiation (single inheritance). + // The print() function is defined to create a string showing each. + + DISPLAY (List2); + } + + + void check_append () + { + typedef Append Append1; + DISPLAY (Append1); + + typedef Append,Num<22> > Append2; + DISPLAY (Append2); + + typedef Append,NullType> Append3; + DISPLAY (Append3); + + typedef Append > Append4; + DISPLAY (Append4); + + typedef Append Append5; + DISPLAY (Append5); + + typedef Append Append6; + DISPLAY (Append6); + + typedef Append,List2> Append7; + DISPLAY (Append7); + + typedef Append > Append8; + DISPLAY (Append8); + + typedef Append Append9; + DISPLAY (Append9); + } + + }; + + + /** Register this test class... */ + LAUNCHER (TypeListManipl_test, "unit common"); + + + + } // namespace test + + } // namespace typelist + +} // namespace lumiera From 9bad04751f48547ba210de851fed7dcc802b1a2a Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 23 Jul 2008 23:23:48 +0100 Subject: [PATCH 16/80] Fixed scroll layout loop bug. --- src/gui/widgets/timeline-widget.cpp | 10 +++++++--- src/gui/widgets/timeline/track.cpp | 4 ++-- src/gui/widgets/timeline/track.hpp | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index e1956ad93..3146824d7 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -58,7 +58,7 @@ TimelineWidget::TimelineWidget() : this, &TimelineWidget::on_scroll) ); body->signal_motion_notify_event().connect( sigc::mem_fun( this, &TimelineWidget::on_motion_in_body_notify_event) ); - + set_time_scale(GAVL_TIME_SCALE / 200); attach(*body, 1, 2, 1, 2, FILL|EXPAND, FILL|EXPAND); @@ -212,10 +212,14 @@ TimelineWidget::update_scroll() verticalAdjustment.set_upper(y_scroll_length); // Hide the scrollbar if no scrolling is possible - if(y_scroll_length == 0 && verticalScroll.is_visible()) +#if 0 + // Having this code included seems to cause a layout loop as the + // window is shrunk + if(y_scroll_length <= 0 && verticalScroll.is_visible()) verticalScroll.hide(); - else if(y_scroll_length != 0 && !verticalScroll.is_visible()) + else if(y_scroll_length > 0 && !verticalScroll.is_visible()) verticalScroll.show(); +#endif } int diff --git a/src/gui/widgets/timeline/track.cpp b/src/gui/widgets/timeline/track.cpp index a19541476..59d3c7d21 100644 --- a/src/gui/widgets/timeline/track.cpp +++ b/src/gui/widgets/timeline/track.cpp @@ -28,9 +28,9 @@ namespace widgets { namespace timeline { Track::Track() : - headerWidget("HeaderTest") + label("XHeaderTest") { - + headerWidget.pack_start(label); } Gtk::Widget& diff --git a/src/gui/widgets/timeline/track.hpp b/src/gui/widgets/timeline/track.hpp index 168aab390..3abbf036d 100644 --- a/src/gui/widgets/timeline/track.hpp +++ b/src/gui/widgets/timeline/track.hpp @@ -47,7 +47,8 @@ class Track void draw_track(Cairo::RefPtr cairo); protected: - Gtk::Label headerWidget; + Gtk::VBox headerWidget; + Gtk::Label label; }; From 06cc4c93fdccb6ba1e1cce7276f2aaf2c2a3f159 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 24 Jul 2008 06:38:21 +0200 Subject: [PATCH 17/80] test the combination generator --- src/proc/engine/nodewiringconfig.hpp | 14 +-- tests/common/typelistmaniptest.cpp | 122 +++++++++++++++++++++++++-- 2 files changed, 121 insertions(+), 15 deletions(-) diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index 24fd44ad9..a385ce2a2 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -46,9 +46,7 @@ namespace lumiera { struct CondNode { typedef Node Next; }; - template< class TYPES - , template class _P_ - > + template< class TYPES , template class _P_> struct Filter; template class _P_> @@ -57,7 +55,7 @@ namespace lumiera { template< class TY, class TYPES , template class _P_ > - struct Filter,_P_> { typedef typename CondNode<_P_::value + struct Filter,_P_> { typedef typename CondNode< _P_::value , TY , typename Filter::List >::Next @@ -92,7 +90,7 @@ namespace lumiera { template - struct PrefixAll { typedef typename Append::List List; }; + struct PrefixAll { typedef Node< typename Append::List, NullType> List; }; template struct PrefixAll { typedef NullType List; }; @@ -108,7 +106,10 @@ namespace lumiera { template - struct Distribute { typedef typename Append::List List; }; + struct Distribute { typedef typename PrefixAll::List List; }; + + template + struct Distribute,NullType> { typedef Node List; }; template< class TY, class TYPES , class TAIL @@ -148,7 +149,6 @@ namespace lumiera { - using std::max; template struct Flag { typedef Flag ID; }; diff --git a/tests/common/typelistmaniptest.cpp b/tests/common/typelistmaniptest.cpp index 0ae0d08ff..9420aa154 100644 --- a/tests/common/typelistmaniptest.cpp +++ b/tests/common/typelistmaniptest.cpp @@ -61,7 +61,7 @@ namespace lumiera { boost::format fmt ("<%i>"); /** constant-wrapper type for debugging purposes, - * usable for generating lists of distinghishable types + * usable for generating lists of distinguishable types */ template struct Num @@ -77,16 +77,44 @@ namespace lumiera { template struct Printer; + template + struct Printer + { + static string print () { return "-"; } + }; + template struct Printer, BASE> : BASE { static string print () { return string("-") + Num::str() + BASE::print(); } }; - template - struct Printer + + + typedef Printer NullP; + + /** call the debug-print for a typelist + * utilizing the Printer template */ + template + string + printSublist () + { + typedef InstantiateChained SubList; + return SubList::print(); + } + + /** Spezialisation for debug-printing of a nested sublist */ + template + struct Printer, BASE> + : BASE { - static string print () { return "-"; } + static string print () + { + //typedef InstantiateChained, Printer, NullP> SubList; + typedef Node List; + return string("\n\t+--") + printSublist()+"+" + + BASE::print(); + } }; @@ -99,10 +127,16 @@ namespace lumiera { , Num<6> , Num<7> >::List List2; + + + template struct CountDown { typedef NullType List; }; + template<> struct CountDown > { typedef Node, NullType> List; }; + template struct CountDown > { typedef Node, typename CountDown >::List> List; }; + #define DIAGNOSE(LIST) \ - typedef InstantiateChained > Contents_##LIST; + typedef InstantiateChained Contents_##LIST; #define DISPLAY(NAME) \ DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n"; @@ -116,9 +150,13 @@ namespace lumiera { /************************************************************************* * @test check utilities for manipulating lists-of-types. - *
    • build an list of constant-wrapper-types and - * print them for debugging purpose.
    • - *
    + * - build an list of constant-wrapper-types and + * print them for debugging purpose. + * - append lists, single elements and NullType + * in various combinations + * - filtering out some types from a typelist by + * using a "predicate template" (metafuction) + * - building combinations and permutations */ class TypeListManipl_test : public Test { @@ -126,6 +164,10 @@ namespace lumiera { { check_diagnostics (); check_append (); + check_filter (); + check_prefix (); + check_distribute(); + check_combine(); } @@ -174,6 +216,70 @@ namespace lumiera { DISPLAY (Append9); } + + template struct IsEven { enum {value = false }; }; + template struct IsEven > { enum {value = (0 == I % 2) }; }; + + void check_filter () + { + typedef Filter::List, IsEven > FilterEven; + DISPLAY (FilterEven); + } + + + void check_prefix () + { + typedef PrefixAll,Num<22> > Prefix1; + DISPLAY (Prefix1); + + typedef PrefixAll,List1> Prefix2; + DISPLAY (Prefix2); + + typedef PrefixAll Prefix3; + DISPLAY (Prefix3); + + typedef Types,List2::List>::List List_of_Lists; + typedef PrefixAll,List_of_Lists> Prefix4; + DISPLAY (Prefix4); + + typedef PrefixAll Prefix5; + DISPLAY (Prefix5); + + typedef PrefixAll Prefix6; + DISPLAY (Prefix6); + } + + + void check_distribute() + { + typedef Distribute, List1> Dist1; + DISPLAY (Dist1); + + typedef Types,Num<22>,Num<33> >::List Prefixes; + typedef Distribute > Dist2; + DISPLAY (Dist2); + + typedef Distribute Dist3; + DISPLAY (Dist3); + + typedef Distribute::List> Dist4; + DISPLAY (Dist4); + } + + + void check_combine() + { + typedef CountDown > Down; + DISPLAY (Down); + + typedef Combine Combi; + DISPLAY (Combi); + + typedef CombineFlags OnOff; + DISPLAY (OnOff); + } + + }; From 0dec8de6a32881cf74c89f3e0efa758466a65d74 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 28 Jul 2008 04:33:10 +0200 Subject: [PATCH 18/80] test covering ennumeration of possible configs --- src/common/typelist.hpp | 2 + src/proc/engine/nodewiringconfig.hpp | 104 +++++- src/tool/try.cpp | 80 ++-- tests/common/typelist/configflagstest.cpp | 351 ++++++++++++++++++ .../{ => typelist}/typelistmaniptest.cpp | 19 +- tests/common/{ => typelist}/typelisttest.cpp | 0 .../{ => typelist}/typelistutiltest.cpp | 0 7 files changed, 502 insertions(+), 54 deletions(-) create mode 100644 tests/common/typelist/configflagstest.cpp rename tests/common/{ => typelist}/typelistmaniptest.cpp (93%) rename tests/common/{ => typelist}/typelisttest.cpp (100%) rename tests/common/{ => typelist}/typelistutiltest.cpp (100%) diff --git a/src/common/typelist.hpp b/src/common/typelist.hpp index f4921791c..2f45ae85b 100644 --- a/src/common/typelist.hpp +++ b/src/common/typelist.hpp @@ -117,6 +117,8 @@ namespace lumiera }; + typedef Node NodeNull; + } // namespace typelist diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index a385ce2a2..74e987325 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -38,7 +38,18 @@ #include "common/typelistutil.hpp" namespace lumiera { namespace typelist { - + + template class _TRANS_> + struct Apply { typedef TY List; }; + + template< class TY, class TYPES + , template class _TRANS_ + > + struct Apply, _TRANS_ > { typedef Node< typename _TRANS_::Type + , typename Apply::List + > List; }; + + template struct CondNode { typedef TAIL Next; }; @@ -95,6 +106,9 @@ namespace lumiera { template struct PrefixAll { typedef NullType List; }; + template + struct PrefixAll { typedef Node< typename Append::List, NullType> List; }; + template< class T , class TY, class TYPES > @@ -107,9 +121,9 @@ namespace lumiera { template struct Distribute { typedef typename PrefixAll::List List; }; - - template - struct Distribute,NullType> { typedef Node List; }; + + template + struct Distribute { typedef NullType List; }; template< class TY, class TYPES , class TAIL @@ -125,8 +139,10 @@ namespace lumiera { template< class X , template class _PERMU_> struct Combine { typedef typename Distribute< typename _PERMU_::List - , NullType + , Node >::List List; }; + template< template class _PERMU_> + struct Combine { typedef Node List; }; template< class TY, class TYPES , template class _PERMU_> @@ -138,7 +154,7 @@ namespace lumiera { template struct FlagOnOff { - typedef typename Types::List List; + typedef Node > List; }; template @@ -149,6 +165,46 @@ namespace lumiera { + /////////// meta utils + + typedef char Yes_t; + struct No_t { char padding[8]; }; + + + /** semi-automatic detection if an instantiation is possible. + * Requires help by the template to be tested, which needs to define + * a typedef member \c is_defined. The embedded metafunction Test can be used + * as a predicate for filtering types which may yield a valid instantiation + * of the candidate template in question. + * \par + * A fully automated solution for this problem is impossible by theoretic reasons. + * Any non trivial use of such a \c is_defined trait would break the "One Definition Rule", + * as the state of any type can change from "partially defined" to "fully defined" over + * the course of any translation unit. Thus, even if there may be a \em solution out there, + * we can expect it to break at some point by improvements/fixes to the C++ Language. + */ + template class _CandidateTemplate_> + struct Instantiation + { + + template + class Test + { + typedef _CandidateTemplate_ Instance; + + template + static Yes_t check(typename U::is_defined *); + template + static No_t check(...); + + public: + static const bool value = (sizeof(Yes_t)==sizeof(check(0))); + }; + }; + + + + template struct Flag { typedef Flag ID; }; @@ -170,6 +226,7 @@ namespace lumiera { , typename Flag::ID >::List Tuple; + typedef Tuple List; }; @@ -181,22 +238,39 @@ namespace lumiera { > struct Config { - typedef typename Flags::Tuple Flags; + typedef typename Flags::Tuple Flags; + typedef Flags List; }; - template - struct DefineConfigByFlags; + template + struct ConfigSetFlag; - template< char f1 + template< char Fl + , char f1 , char f2 , char f3 , char f4 - , char f5 + , char IGN > - struct DefineConfigByFlags< typename Flags::Tuple > + struct ConfigSetFlag > + { + typedef Config Config; + }; + + template > + struct DefineConfigByFlags + { + typedef CONF Config; + typedef Config Type; + }; + template + struct DefineConfigByFlags< Node,FLAGS>, CONF> { - typedef Config Config; + typedef typename ConfigSetFlag< Fl + , typename DefineConfigByFlags::Config + >::Config Config; + typedef Config Type; }; @@ -244,7 +318,7 @@ namespace lumiera { > > { typedef Node, FLAGS> ThisConfig; - enum{ BITS = MAX (FlagInfo::BITS, FlagInfo::BITS) + enum{ BITS = MAX (char(FlagInfo::BITS), char(FlagInfo::BITS)) }; template @@ -259,7 +333,7 @@ namespace lumiera { - + } // namespace typelist } // namespace lumiera diff --git a/src/tool/try.cpp b/src/tool/try.cpp index f4c56b8c4..7d9d99000 100644 --- a/src/tool/try.cpp +++ b/src/tool/try.cpp @@ -28,6 +28,8 @@ using boost::format; using boost::enable_if; #include using boost::is_base_of; +#include +#include #include "common/typelistutil.hpp" @@ -55,53 +57,63 @@ using lumiera::typelist::Types; }; - template - < class TYPES - , class BASE = NullType - > - struct Zoing; - - - template - struct Zoing - : BASE - { - }; - - - template - < class TY, typename TYPES - , class BASE - > - struct Zoing, BASE> - : TY, - Zoing - { - }; - + + template class _CandidateTemplate_> + class Instantiation + { + template + struct If_possibleArgument : _CandidateTemplate_ + { + typedef void Type; + }; + + public: + + template + struct Test + : boost::false_type {}; + + template + struct Test::Type > + : boost::true_type {}; + + }; } - typedef Types< Num<1> - , Num<2> - , Num<3> - >::List List1; + struct Boing { typedef boost::true_type is_defined; }; - struct B - { typedef List1 Zeug; }; - struct D : B - {}; + template struct Zoing ; + + template<> struct Zoing<2> : Boing { enum{wau = 2}; }; + template<> struct Zoing<5> : Boing { enum{wau = 5}; }; + typedef char yes_type; + struct no_type + { + char padding[8]; + }; + template + yes_type check(typename U::is_defined *); + template + no_type check(...); + + int main (int argc, char* argv[]) { NOBUG_INIT; - typedef Zoing Boing; + typedef Zoing<2> Z2; + typedef Zoing<3> Z3; + typedef Zoing<5> Z5; + + cout << sizeof(check(0)) << " / " + << sizeof(check(0)) << " / " + << sizeof(check(0)) ; - Boing(); cout << "\ngulp\n"; diff --git a/tests/common/typelist/configflagstest.cpp b/tests/common/typelist/configflagstest.cpp new file mode 100644 index 000000000..78584f30c --- /dev/null +++ b/tests/common/typelist/configflagstest.cpp @@ -0,0 +1,351 @@ +/* + ConfigFlags(Test) - generating a configuration type defined by flags + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + +/** @file configflagstest.cpp + ** \par build a type representing a single configuration defined by a set of flags + ** + ** The semi-automatic assembly of processing node invocation code utilizes some + ** metaprogramming to generate a factory, which in turn produces node wiring objects + ** according to the configuration to be used for the corresponding ProcNode. This relies on + ** generating a distinct type based on a given set of configuration flags, + ** which is covered by this test. + ** + ** @see configflags.hpp + ** @see typelistmanip.hpp + ** @see nodewiringconfig.hpp real world usage example + ** + */ + + +#include "common/test/run.hpp" +#include "common/typelistutil.hpp" +#include "common/util.hpp" +//#include "common/typelist/typelistmanip.hpp" +#include "proc/engine/nodewiringconfig.hpp" ///////////TODO move to configflags.hpp + +#include +#include + +using ::test::Test; +using std::string; +using std::cout; +using boost::format; + + +namespace lumiera { + namespace typelist { + namespace test { + + + namespace { // internal definitions + + enum Cases + { ONE = 1 + , TWO + , THR + , FOU + , NUM_Cases = FOU + + , NOT_SET = 0 + }; + + format fmt ("-<%u>%s"); + + struct NullP + { + static string print () { return "-"; } + }; + + /** debugging template, + * printing the "number" used for intantiation on ctor call + */ + template + struct Printer; + + template + struct Printer + : BASE + { + static string print () { return str( fmt % "·" % BASE::print()); } + }; + + template + struct Printer, BASE> + : BASE + { + static string print () { return str( fmt % uint(Fl) % BASE::print()); } + }; + + + + /** call the debug-print for a typelist + * utilizing the Printer template */ + template + string + printSublist () + { + typedef InstantiateChained SubList; + return SubList::print(); + } + + /** Spezialisation for debug-printing of a nested sublist */ + template + struct Printer, BASE> + : BASE + { + static string print () + { + typedef Node List; + return string("\n\t+--") + printSublist()+"+" + + BASE::print(); + } + }; + + template + struct Printer, BASE> + : BASE + { + static string print () + { + typedef typename Config::Flags FlagList; + return string("\n\t+-Conf-[") + printSublist()+"]" + + BASE::print(); + } + }; + + +#define DIAGNOSE(LIST) \ + typedef InstantiateChained Contents_##LIST; + +#define DISPLAY(NAME) \ + DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n"; + + + + /* === Test data === */ + typedef Config<> Conf0; + typedef Config Conf1; + typedef Config Conf2; + typedef Config Conf3; + typedef Config Conf4; + + typedef Flags::Tuple Flags1; + typedef Flags::Tuple Flags2; + typedef Types SomeFlagsets; + + typedef Flags::Tuple AllFlags; + typedef CombineFlags AllFlagCombinations; + + + + /** a type which is only partially defined, for some configs. + * In ConfigFlags_test::check_filter() we use the metaprogramming machinery + * to figure out all possible configs for which \c struct Maybe is defined. + * (for this to work, the "defined" specialisations need to provide a + * typedef \c is_defined ) + */ + template struct Maybe; + + struct Indeed { typedef Yes_t is_defined; }; + template<> struct Maybe : Indeed { enum{ CODE = 1 }; }; + template<> struct Maybe : Indeed { enum{ CODE = 3 }; }; + + template + struct Maybe > + { + typedef Yes_t is_defined; + + enum{ CODE = 20 + Fl }; + }; + + + } // (End) internal defs + + + + + + + /************************************************************************** + * @test check the handling of types representing a specific configuration. + * Basically, this is a bitset like feature, but working on types + * instead of runtime values. The Goal is to detect automatically + * all possible defined specialisations of some template based on + * such configuration-tuples. This allows us to assemble the glue code + * for pulling data from processing nodes out of small building blocks + * in all possible configuraions. + */ + class ConfigFlags_test : public Test + { + virtual void run(Arg arg) + { + check_testdata (); + check_flags(); + check_instantiation (); + check_filter (); + check_FlagInfo (); + } + + + void check_testdata () + { + DISPLAY (Conf0); + DISPLAY (Conf1); + DISPLAY (Conf2); + DISPLAY (Conf3); + DISPLAY (Conf4); + + DISPLAY (AllFlags); + } + + + /** @test conversion between list-of-flags and a config-type in both directions */ + void check_flags () + { + cout << "\n==== check_flags()\n"; + + typedef Config Flags1; + typedef Flags Flags2; + DISPLAY (Flags1); + DISPLAY (Flags2); + // should denote the same type + Flags1::Flags flags1 = Flags2::Tuple(); + Flags2::Tuple flags2 = flags1; + ASSERT (1==sizeof(flags1)); // pure marker-type without content + ASSERT (1==sizeof(flags2)); + + typedef DefineConfigByFlags,NullType> >::Config SimpleConfig_defined_by_Typelist; + DISPLAY (SimpleConfig_defined_by_Typelist); + + typedef DefineConfigByFlags::Config AnotherConfig_defined_by_Typelist; + DISPLAY (AnotherConfig_defined_by_Typelist); + } + + + /** @test creates a predicate template (metafunction) returning true + * iff the template \c Maybe is defined for the configuration in question + */ + void check_instantiation () + { + #define CAN_INSTANTIATE(NAME) \ + cout << "defined " \ + << STRINGIFY(NAME) \ + << "? ---> " \ + << Instantiation::Test::value << "\n"; + + cout << "\n==== check_instantiation()\n"; + CAN_INSTANTIATE (Conf0); + CAN_INSTANTIATE (Conf1); + CAN_INSTANTIATE (Conf2); + CAN_INSTANTIATE (Conf3); + CAN_INSTANTIATE (Conf4); + + typedef Config Trash; + CAN_INSTANTIATE (Trash); + } + + + /** @test given a list of flag-tuples, we first create config-types out of them + * and then filter out those configs for which \c template Maybe is defined + */ + void check_filter () + { + cout << "\n==== check_filter()\n"; + + DISPLAY (SomeFlagsets); + + typedef Apply Configs_defined_by_Flagsets; + DISPLAY (Configs_defined_by_Flagsets); + + typedef Filter::Test> Filter_possible_Configs; + DISPLAY (Filter_possible_Configs); + + + DISPLAY (AllFlagCombinations); + typedef Apply ListAllConfigs; + DISPLAY (ListAllConfigs); + + typedef Filter::Test> Filter_all_possible_Configs; + DISPLAY (Filter_all_possible_Configs); + } + + + + struct TestVisitor + { + string result; + TestVisitor() : result ("TestVisitor application:\n") {} + + /* === visitation interface === */ + typedef string Ret; + + Ret done() {return result; } + + template + void + visit (ulong code) + { + typedef typename DefineConfigByFlags::Config Config; + result += str (format ("visit(code=%u) --> %s\n") + % code % Printer::print() ); + } + }; + + /** @test FlagInfo metafunction, which takes as argument a list-of-flags + * as well as a list-of-lists-of-flags and especially allows to + * apply a visitor object to the latter + */ + void check_FlagInfo() + { + cout << "\n==== check_FlagInfo()\n"; + + DISPLAY (Flags1); + cout << "max bit : " << FlagInfo::BITS <<"\n"; + cout << "binary code: " << FlagInfo::CODE <<"\n"; + + DISPLAY (SomeFlagsets); + cout << "max bit in [SomeFlagsets] : " << FlagInfo::BITS <<"\n"; + + TestVisitor visitor; + cout << FlagInfo::accept (visitor); + } + + + void check_Factory() + { + } + + + }; + + + /** Register this test class... */ + LAUNCHER (ConfigFlags_test, "unit common"); + + + + } // namespace test + + } // namespace typelist + +} // namespace lumiera diff --git a/tests/common/typelistmaniptest.cpp b/tests/common/typelist/typelistmaniptest.cpp similarity index 93% rename from tests/common/typelistmaniptest.cpp rename to tests/common/typelist/typelistmaniptest.cpp index 9420aa154..7b285d205 100644 --- a/tests/common/typelistmaniptest.cpp +++ b/tests/common/typelist/typelistmaniptest.cpp @@ -22,14 +22,14 @@ /** @file typelistmaniptest.cpp - ** \par checking the correct working of basic list manipulation + ** \par checking the correct working of simple list manipulation metafunctions ** ** The semi-automatic assembly of processing node invocation code utilizes some ** metaprogramming magic built upon simple list manipulation. As template metaprogramming ** is kind-of functional programming, most of this is done by recursion. ** To check the correct working, this test uses some constant-wrapper types and a debugging - ** template which will print these constant numbers when creating an instance. This allows to - ** verify in the output if lists of such constant-wrapper types were manipulated as expected. + ** template which will print these constant numbers, thus allowing to verify in the output + ** if various lists of such constant-wrapper types were manipulated as expected. ** ** @see typelisttest.cpp ** @see typelistutil.hpp @@ -72,7 +72,7 @@ namespace lumiera { /** debugging template, - * printing the "number" used for intantiation on ctor call + * printing the "number" used for intantiation */ template struct Printer; @@ -110,7 +110,6 @@ namespace lumiera { { static string print () { - //typedef InstantiateChained, Printer, NullP> SubList; typedef Node List; return string("\n\t+--") + printSublist()+"+" + BASE::print(); @@ -163,6 +162,7 @@ namespace lumiera { virtual void run(Arg arg) { check_diagnostics (); + check_apply (); check_append (); check_filter (); check_prefix (); @@ -216,6 +216,15 @@ namespace lumiera { DISPLAY (Append9); } + template struct AddConst2 { typedef X Type; }; + template struct AddConst2 > { typedef Num Type; }; + + void check_apply () + { + typedef Apply Added2; + DISPLAY (Added2); + } + template struct IsEven { enum {value = false }; }; template struct IsEven > { enum {value = (0 == I % 2) }; }; diff --git a/tests/common/typelisttest.cpp b/tests/common/typelist/typelisttest.cpp similarity index 100% rename from tests/common/typelisttest.cpp rename to tests/common/typelist/typelisttest.cpp diff --git a/tests/common/typelistutiltest.cpp b/tests/common/typelist/typelistutiltest.cpp similarity index 100% rename from tests/common/typelistutiltest.cpp rename to tests/common/typelist/typelistutiltest.cpp From ecf392968beecb370c31bc570a3127732cff9465 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 28 Jul 2008 23:45:20 +0100 Subject: [PATCH 19/80] Implemented new icon workflow --- .../{ => prerendered/16x16}/assets-panel.png | Bin .../16x16}/timeline-panel.png | Bin .../{ => prerendered/16x16}/viewer-panel.png | Bin icons/render-icons.py | 127 +++ icons/svg/arrow.svg | 732 ++++++++++++++++++ icons/svg/i-beam.svg | 690 +++++++++++++++++ src/gui/Makefile.am | 24 +- 7 files changed, 1561 insertions(+), 12 deletions(-) rename icons/{ => prerendered/16x16}/assets-panel.png (100%) rename icons/{ => prerendered/16x16}/timeline-panel.png (100%) rename icons/{ => prerendered/16x16}/viewer-panel.png (100%) create mode 100755 icons/render-icons.py create mode 100644 icons/svg/arrow.svg create mode 100644 icons/svg/i-beam.svg diff --git a/icons/assets-panel.png b/icons/prerendered/16x16/assets-panel.png similarity index 100% rename from icons/assets-panel.png rename to icons/prerendered/16x16/assets-panel.png diff --git a/icons/timeline-panel.png b/icons/prerendered/16x16/timeline-panel.png similarity index 100% rename from icons/timeline-panel.png rename to icons/prerendered/16x16/timeline-panel.png diff --git a/icons/viewer-panel.png b/icons/prerendered/16x16/viewer-panel.png similarity index 100% rename from icons/viewer-panel.png rename to icons/prerendered/16x16/viewer-panel.png diff --git a/icons/render-icons.py b/icons/render-icons.py new file mode 100755 index 000000000..4ebbd3fc4 --- /dev/null +++ b/icons/render-icons.py @@ -0,0 +1,127 @@ +#!/usr/bin/python + +# render-icons.py - Icon rendering utility script +# +# Copyright (C) Lumiera.org +# 2008, Joel Holdsworth +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +from xml.dom import minidom +import os +import shutil + +svgDir = "svg" +prerenderedDir = "prerendered" +inkscapePath = "/usr/bin/inkscape" +artworkLayerPrefix = "artwork:" + +def createDirectory( name ): + if os.path.exists(name) == False: + os.mkdir(name) + +def copyMergeDirectory( src, dst ): + listing = os.listdir(src) + for file_name in listing: + src_file_path = os.path.join(src, file_name) + dst_file_path = os.path.join(dst, file_name) + shutil.copyfile(src_file_path, dst_file_path) + +def getDocumentSize( svg_element ): + width = float(svg_element.getAttribute("width")) + height = float(svg_element.getAttribute("height")) + return [width, height] + +def findChildLayerElement( parent_element ): + for node in parent_element.childNodes: + if node.nodeType == minidom.Node.ELEMENT_NODE: + if node.tagName == "g": + if node.getAttribute("inkscape:groupmode") == "layer": + return node + return None + +def parsePlateLayer( layer ): + rectangles = [] + for node in layer.childNodes: + if node.nodeType == minidom.Node.ELEMENT_NODE: + if node.tagName == "rect": + x = float(node.getAttribute("x")) + y = float(node.getAttribute("y")) + width = float(node.getAttribute("width")) + height = float(node.getAttribute("height")) + rectangles.append([x, y, width, height]) + return rectangles + + +def parseSVG( file_path ): + print "Rendering " + file_path + svgdoc = minidom.parse(file_path) + for root_node in svgdoc.childNodes: + if root_node.nodeType == minidom.Node.ELEMENT_NODE: + if root_node.tagName == "svg": + size = getDocumentSize( root_node ) + layer = findChildLayerElement( root_node ) + if layer != None: + layer_name = layer.getAttribute("inkscape:label") + if layer_name[:len(artworkLayerPrefix)] == artworkLayerPrefix: + artwork_name = layer_name[len(artworkLayerPrefix):] + plate = findChildLayerElement( layer ) + if plate != None: + return artwork_name, size, parsePlateLayer( plate ) + return None + +def renderSVGIcons(): + listing = os.listdir(svgDir) + for file_path in listing: + [root, extension] = os.path.splitext(file_path) + if extension.lower() == ".svg": + file_path = os.path.join(svgDir, file_path) + artwork_name, doc_size, rectangles = parseSVG(file_path) + for rectangle in rectangles: + x1 = rectangle[0] + y1 = doc_size[1] - rectangle[1] - rectangle[3] + x2 = x1 + rectangle[2] + y2 = y1 + rectangle[3] + os.spawnlp(os.P_WAIT, inkscapePath, inkscapePath, + file_path, + "-z", + "-a %g:%g:%g:%g" % (x1, y1, x2, y2), + "-w %g" % (rectangle[2]), "-h %g" % (rectangle[3]), + "--export-png=%gx%g/%s.png" % (rectangle[2], rectangle[3], artwork_name)) + +def copyPrerenderedIcons(): + listing = os.listdir(prerenderedDir) + for list_item in listing: + src_dir = os.path.join(prerenderedDir, list_item) + copyMergeDirectory(src_dir, list_item) + +def main(): + + # Create the icons folders + createDirectory("48x48") + createDirectory("32x32") + createDirectory("24x24") + createDirectory("22x22") + createDirectory("16x16") + + # Render the SVG icons + renderSVGIcons() + + # Copy in prerendered icons + copyPrerenderedIcons() + +if __name__=="__main__": + main() + diff --git a/icons/svg/arrow.svg b/icons/svg/arrow.svg new file mode 100644 index 000000000..2434fad9d --- /dev/null +++ b/icons/svg/arrow.svg @@ -0,0 +1,732 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/svg/i-beam.svg b/icons/svg/i-beam.svg new file mode 100644 index 000000000..2f4e82f27 --- /dev/null +++ b/icons/svg/i-beam.svg @@ -0,0 +1,690 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 14cdc33c2..53f7c8452 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -75,19 +75,19 @@ lumigui_LDFLAGS = lumigui_LDADD = $(GTK_LUMIERA_LIBS) liblumicommon.a liblumi.a lumigui_DEPENDENCIES = \ - $(top_builddir)/lumiera_ui.rc \ - $(top_builddir)/assets-panel.png \ - $(top_builddir)/timeline-panel.png \ - $(top_builddir)/viewer-panel.png + $(top_builddir)/lumiera_ui.rc +# $(top_builddir)/assets-panel.png \ +# $(top_builddir)/timeline-panel.png \ +# $(top_builddir)/viewer-panel.png -$(top_builddir)/lumiera_ui.rc: - cp $(lumigui_srcdir)/lumiera_ui.rc $(top_builddir) +#$(top_builddir)/lumiera_ui.rc: +# cp $(lumigui_srcdir)/lumiera_ui.rc $(top_builddir) -$(top_builddir)/assets-panel.png: - cp $(top_srcdir)/icons/assets-panel.png $(top_builddir) -$(top_builddir)/timeline-panel.png: - cp $(top_srcdir)/icons/timeline-panel.png $(top_builddir) -$(top_builddir)/viewer-panel.png: - cp $(top_srcdir)/icons/viewer-panel.png $(top_builddir) +#$(top_builddir)/assets-panel.png: +# cp $(top_srcdir)/icons/assets-panel.png $(top_builddir) +#$(top_builddir)/timeline-panel.png: +# cp $(top_srcdir)/icons/timeline-panel.png $(top_builddir) +#$(top_builddir)/viewer-panel.png: +# cp $(top_srcdir)/icons/viewer-panel.png $(top_builddir) From 276ac8e0826f25bc816d84ac82770b433c17afab Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 29 Jul 2008 18:03:37 +0200 Subject: [PATCH 20/80] test building a table of factories dealing with the possible configs --- src/proc/engine/nodewiringconfig.hpp | 60 +++++++++++---------- tests/common/typelist/configflagstest.cpp | 63 +++++++++++++++++++---- 2 files changed, 88 insertions(+), 35 deletions(-) diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index 74e987325..9223f5633 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -31,7 +31,9 @@ #include #include #include +#include #include +#include /////////////////TODO: library @@ -277,16 +279,13 @@ namespace lumiera { /** * Helper for calculating values and for * invoking runtime code based on a given FlagTuple. - * Can also be used on a Typelist of several FlagTuples. + * Can also be used on a Typelist of several Configs. * The latter case is typically used to invoke an operation * while ennumerating all Flag-Configurations defined in Code. * An example would be to build (at runtime) an dispatcher table. - * Explanation: the supposed data structure is a list of lists, - * where "list" here refers to a Typelist (compile time). Each - * of the inner lists in this structure represents a single - * Flag-Configuration. For the Case covering the outer List, - * we provide a templated visitaion function, which can accept - * a functor object to be invoked on each Flag-Configuration. + * Explanation: For the Case covering a List of Configs, we provide + * a templated visitaion function, which can accept a functor object + * to be invoked on each Configuration. */ template struct FlagInfo; @@ -312,20 +311,18 @@ namespace lumiera { return functor.done(); } }; - template - struct FlagInfo, FLAGS> - , TAIL - > > + template + struct FlagInfo > { - typedef Node, FLAGS> ThisConfig; - enum{ BITS = MAX (char(FlagInfo::BITS), char(FlagInfo::BITS)) + typedef typename CONF::Flags ThisFlags; + enum{ BITS = MAX (char(FlagInfo::BITS), char(FlagInfo::BITS)) }; template static typename FUNC::Ret accept (FUNC& functor) { - functor.template visit(FlagInfo::CODE); + functor.template visit(FlagInfo::CODE); return FlagInfo::accept (functor); } }; @@ -353,6 +350,8 @@ namespace engine { using lumiera::typelist::DefineConfigByFlags; ///////TODO + using boost::lexical_cast; + using util::contains; enum Cases { @@ -404,17 +403,23 @@ namespace engine { * bulk allocation memory block -- typically for each separate * segment of the Timeline and processing node graph. * - * NOw the selection of the possible flag configurations, for which + * Now the selection of the possible flag configurations, for which * Factory instances are created in the table, is governed by the * type parameter of the ConfigSelector ctor. This type parameter * needs to be a Typelist of Typelists, each representing a flag * configuration. The intention is to to drive this selection by * the use of template metaprogramming for extracting all * currently defined StateProxy object configurations. + * @todo as the facories live only within the enclosed table (map) + * we could allocate them in-place. Unfortunately this is + * non-trivial, because the stl containers employ + * value semantics and thus do a copy even on insert. + * Thus, for now we use a shared_ptr to hold the factory + * heap allocated. */ template< template class Factory - , class PAR ///< ctor parameter of the Factories - , class RET ///< common base class of the Factory's products + , typename PAR ///< ctor parameter of the Factories + , typename RET ///< common base class of the Factory's products > class ConfigSelector { @@ -434,8 +439,8 @@ namespace engine { }; - typedef boost::scoped_ptr PFunc; - typedef std::map ConfigTable; + typedef boost::shared_ptr PFunc; + typedef std::map ConfigTable; ConfigTable possibleConfig_; ///< Table of factories @@ -454,12 +459,12 @@ namespace engine { typedef void Ret; - template + template void - visit (ulong code) + visit (size_t code) { - typedef typename DefineConfigByFlags::Config Config; - factories_[code].reset (new FactoryHolder > (ctor_param_)); + PFunc pFactory (new FactoryHolder > (ctor_param_)); + factories_[code] = pFactory; } void done() {} @@ -467,7 +472,7 @@ namespace engine { public: template - ConfigSelector(PAR factory_ctor_param) + ConfigSelector(CONFS const&, PAR factory_ctor_param) { FactoryTableBuilder buildTable(this->possibleConfig_, factory_ctor_param ); @@ -477,9 +482,12 @@ namespace engine { } RET - operator() (Bits configFlags) ///< invoke the factory corresponding to the given config + operator() (size_t configFlags) ///< invoke the factory corresponding to the given config { - return possibleConfig_[configFlags]->invoke(); + if (contains (possibleConfig_, configFlags)) + return possibleConfig_[configFlags]->invoke(); + else + throw lumiera::error::Invalid("ConfigSelector: No preconfigured factory for config-bits="+lexical_cast(configFlags)); } }; diff --git a/tests/common/typelist/configflagstest.cpp b/tests/common/typelist/configflagstest.cpp index 78584f30c..1c9dbdf83 100644 --- a/tests/common/typelist/configflagstest.cpp +++ b/tests/common/typelist/configflagstest.cpp @@ -167,8 +167,8 @@ namespace lumiera { template struct Maybe; struct Indeed { typedef Yes_t is_defined; }; - template<> struct Maybe : Indeed { enum{ CODE = 1 }; }; - template<> struct Maybe : Indeed { enum{ CODE = 3 }; }; + template<> struct Maybe : Indeed { enum{ CODE = 10 }; }; + template<> struct Maybe : Indeed { enum{ CODE = 30 }; }; template struct Maybe > @@ -204,6 +204,7 @@ namespace lumiera { check_instantiation (); check_filter (); check_FlagInfo (); + check_ConfigSelector (); } @@ -301,13 +302,12 @@ namespace lumiera { Ret done() {return result; } - template + template void visit (ulong code) { - typedef typename DefineConfigByFlags::Config Config; result += str (format ("visit(code=%u) --> %s\n") - % code % Printer::print() ); + % code % Printer::print() ); } }; @@ -323,16 +323,61 @@ namespace lumiera { cout << "max bit : " << FlagInfo::BITS <<"\n"; cout << "binary code: " << FlagInfo::CODE <<"\n"; - DISPLAY (SomeFlagsets); - cout << "max bit in [SomeFlagsets] : " << FlagInfo::BITS <<"\n"; + typedef Apply SomeConfigs; + DISPLAY (SomeConfigs); + cout << "max bit in [SomeConfigs] : " << FlagInfo::BITS <<"\n"; TestVisitor visitor; - cout << FlagInfo::accept (visitor); + cout << FlagInfo::accept (visitor); } - void check_Factory() + template + struct TestFactory + { + uint operator() () { return offset_ + Maybe::CODE; } + TestFactory(long o) : offset_(o) {} + + private: + long offset_; + }; + + + void check_ConfigSelector() { + cout << "\n==== check_ConfigSelector()\n"; + + typedef Apply ListAllConfigs; + typedef Filter::Test> Possible_Configs; + DISPLAY (Possible_Configs); + + typedef engine::ConfigSelector TestFactorySelector; + + const long offset = 1000; // parameter fed to all TestFactory ctors + TestFactorySelector testConfigSelector (Possible_Configs::List(), offset); + + + #define INVOKE_CONFIG_SELECTOR(CODE) \ + cout << " Flag-code = " << CODE \ + << " ConfigSelector() ---> " \ + << testConfigSelector (CODE) << "\n"; + + INVOKE_CONFIG_SELECTOR (2); + INVOKE_CONFIG_SELECTOR (12); + INVOKE_CONFIG_SELECTOR (20); + INVOKE_CONFIG_SELECTOR (4); + INVOKE_CONFIG_SELECTOR (8); + + try + { + INVOKE_CONFIG_SELECTOR (23); + NOTREACHED ; + } + catch (lumiera::error::Invalid& err) + { + cout << err.what() << "\n"; + lumiera_error (); // reset errorflag + } } From 17d0883d09eb9c90f51d4e5c4fef42a031f6c68c Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 30 Jul 2008 00:12:37 +0100 Subject: [PATCH 21/80] Added basic support for multiple tools in the timeline view --- src/gui/Makefile.am | 6 ++ src/gui/panels/timeline-panel.cpp | 40 ++++++++++- src/gui/panels/timeline-panel.hpp | 7 ++ src/gui/widgets/timeline-widget.cpp | 71 +++++++++++++++---- src/gui/widgets/timeline-widget.hpp | 7 ++ .../widgets/timeline/timeline-arrow-tool.cpp | 45 ++++++++++++ .../widgets/timeline/timeline-arrow-tool.hpp | 50 +++++++++++++ .../widgets/timeline/timeline-ibeam-tool.cpp | 45 ++++++++++++ .../widgets/timeline/timeline-ibeam-tool.hpp | 51 +++++++++++++ src/gui/widgets/timeline/timeline-tool.cpp | 39 ++++++++++ src/gui/widgets/timeline/timeline-tool.hpp | 58 +++++++++++++++ src/gui/widgets/timeline/track.hpp | 22 +++--- src/gui/workspace/actions.cpp | 60 +++++++++++----- src/gui/workspace/actions.hpp | 11 ++- 14 files changed, 469 insertions(+), 43 deletions(-) create mode 100644 src/gui/widgets/timeline/timeline-arrow-tool.cpp create mode 100644 src/gui/widgets/timeline/timeline-arrow-tool.hpp create mode 100644 src/gui/widgets/timeline/timeline-ibeam-tool.cpp create mode 100644 src/gui/widgets/timeline/timeline-ibeam-tool.hpp create mode 100644 src/gui/widgets/timeline/timeline-tool.cpp create mode 100644 src/gui/widgets/timeline/timeline-tool.hpp diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 53f7c8452..e463100d4 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -62,6 +62,12 @@ lumigui_SOURCES = \ $(lumigui_srcdir)/widgets/timeline/timeline-body.hpp \ $(lumigui_srcdir)/widgets/timeline/timeline-ruler.cpp \ $(lumigui_srcdir)/widgets/timeline/timeline-ruler.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-tool.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-tool.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.hpp \ $(lumigui_srcdir)/model/project.cpp \ $(lumigui_srcdir)/model/project.hpp \ $(lumigui_srcdir)/output/displayer.cpp \ diff --git a/src/gui/panels/timeline-panel.cpp b/src/gui/panels/timeline-panel.cpp index 3b6bfed84..ea46da0a0 100644 --- a/src/gui/panels/timeline-panel.cpp +++ b/src/gui/panels/timeline-panel.cpp @@ -25,6 +25,7 @@ using namespace Gtk; using namespace sigc; +using namespace lumiera::gui::widgets; namespace lumiera { namespace gui { @@ -34,23 +35,44 @@ const int TimelinePanel::ZoomToolSteps = 2; // 2 seems comfortable TimelinePanel::TimelinePanel() : Panel("timeline", _("Timeline"), "timeline_panel"), + arrowTool(Gtk::StockID("arrow")), + iBeamTool(Gtk::StockID("i_beam")), zoomIn(Stock::ZOOM_IN), zoomOut(Stock::ZOOM_OUT) { // Setup the toolbar + toolbar.append(arrowTool, mem_fun(this, + &TimelinePanel::on_arrow_tool)); + toolbar.append(iBeamTool, mem_fun(this, + &TimelinePanel::on_ibeam_tool)); toolbar.append(zoomIn, mem_fun(this, &TimelinePanel::on_zoom_in)); toolbar.append(zoomOut, mem_fun(this, &TimelinePanel::on_zoom_out)); - toolbar.set_icon_size(IconSize(ICON_SIZE_SMALL_TOOLBAR)); + toolbar.set_icon_size(IconSize(ICON_SIZE_LARGE_TOOLBAR)); toolbar.set_toolbar_style(TOOLBAR_ICONS); // Add the toolbar pack_start(toolbar, PACK_SHRINK); pack_start(timelineWidget, PACK_EXPAND_WIDGET); + update_tool_buttons(); update_zoom_buttons(); } +void +TimelinePanel::on_arrow_tool() +{ + timelineWidget.set_tool(timeline::Arrow); + update_tool_buttons(); +} + +void +TimelinePanel::on_ibeam_tool() +{ + timelineWidget.set_tool(timeline::IBeam); + update_tool_buttons(); +} + void TimelinePanel::on_zoom_in() { @@ -65,6 +87,22 @@ TimelinePanel::on_zoom_out() update_zoom_buttons(); } +void +TimelinePanel::update_tool_buttons() +{ + // This is included to prevent recursion + static bool updating = false; + + if(!updating) + { + updating = true; + const timeline::ToolType tool = timelineWidget.get_tool(); + arrowTool.set_active(tool == timeline::Arrow); + iBeamTool.set_active(tool == timeline::IBeam); + updating = false; + } +} + void TimelinePanel::update_zoom_buttons() { diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index a14288c41..06e71ff71 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -42,10 +42,14 @@ public: private: //----- Event Handlers -----// + void on_arrow_tool(); + void on_ibeam_tool(); + void on_zoom_in(); void on_zoom_out(); private: + void update_tool_buttons(); void update_zoom_buttons(); private: @@ -57,6 +61,9 @@ private: TimelineWidget timelineWidget; // Toolbar Widgets + Gtk::ToggleToolButton arrowTool; + Gtk::ToggleToolButton iBeamTool; + Gtk::ToolButton zoomIn; Gtk::ToolButton zoomOut; diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index 3146824d7..a56c29672 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -21,6 +21,8 @@ * *****************************************************/ #include "timeline-widget.hpp" +#include "timeline/timeline-arrow-tool.hpp" +#include "timeline/timeline-ibeam-tool.hpp" #include @@ -45,7 +47,8 @@ TimelineWidget::TimelineWidget() : horizontalAdjustment(0, 0, 0), verticalAdjustment(0, 0, 0), horizontalScroll(horizontalAdjustment), - verticalScroll(verticalAdjustment) + verticalScroll(verticalAdjustment), + tool(NULL) { body = new TimelineBody(this); ENSURE(body != NULL); @@ -71,14 +74,23 @@ TimelineWidget::TimelineWidget() : tracks.push_back(&video2); update_tracks(); + + set_tool(timeline::Arrow); } TimelineWidget::~TimelineWidget() { REQUIRE(body != NULL); - body->unreference(); + if(body != NULL) + body->unreference(); + REQUIRE(headerContainer != NULL); - headerContainer->unreference(); + if(headerContainer != NULL) + headerContainer->unreference(); + + REQUIRE(tool != NULL); + if(tool != NULL) + delete tool; } gavl_time_t @@ -111,15 +123,6 @@ TimelineWidget::set_time_scale(int64_t time_scale) horizontalAdjustment.set_page_size(timeScale * view_width); } -void -TimelineWidget::shift_view(int shift_size) -{ - const int view_width = body->get_allocation().get_width(); - - set_time_offset(get_time_offset() + - shift_size * timeScale * view_width / 16); -} - void TimelineWidget::zoom_view(int zoom_size) { @@ -151,6 +154,50 @@ TimelineWidget::zoom_view(int point, int zoom_size) set_time_scale(new_time_scale); } +void +TimelineWidget::shift_view(int shift_size) +{ + const int view_width = body->get_allocation().get_width(); + + set_time_offset(get_time_offset() + + shift_size * timeScale * view_width / 16); +} + +ToolType +TimelineWidget::get_tool() const +{ + REQUIRE(tool != NULL); + if(tool != NULL) + return tool->get_type(); + return None; +} + +void +TimelineWidget::set_tool(ToolType tool_type) +{ + // Tidy up old tool + if(tool != NULL) + { + // Do we need to change tools? + if(tool->get_type() == tool_type) + return; + + delete tool; + } + + // Create the new tool + switch(tool_type) + { + case timeline::Arrow: + tool = new timeline::ArrowTool(); + break; + + case timeline::IBeam: + tool = new timeline::IBeamTool(); + break; + } +} + void TimelineWidget::on_scroll() { diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index c179a4d59..cc49f7897 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -30,6 +30,7 @@ #include "timeline/header-container.hpp" #include "timeline/timeline-body.hpp" #include "timeline/timeline-ruler.hpp" +#include "timeline/timeline-tool.hpp" #include "timeline/track.hpp" namespace lumiera { @@ -95,6 +96,10 @@ public: **/ void shift_view(int shift_size); + timeline::ToolType get_tool() const; + + void set_tool(timeline::ToolType tool_type); + /* ===== Events ===== */ protected: void on_scroll(); @@ -130,6 +135,8 @@ protected: Gtk::HScrollbar horizontalScroll; Gtk::VScrollbar verticalScroll; + timeline::Tool *tool; + /* ===== Constants ===== */ public: static const int64_t MaxScale; diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.cpp b/src/gui/widgets/timeline/timeline-arrow-tool.cpp new file mode 100644 index 000000000..28c63e1ee --- /dev/null +++ b/src/gui/widgets/timeline/timeline-arrow-tool.cpp @@ -0,0 +1,45 @@ +/* + timeline-arrow-tool.cpp - Implementation of the ArrowTool class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include "timeline-arrow-tool.hpp" + +namespace lumiera { +namespace gui { +namespace widgets { +namespace timeline { + +ArrowTool::ArrowTool() +{ + +} + +ToolType +ArrowTool::get_type() const +{ + return Arrow; +} + +} // namespace timeline +} // namespace widgets +} // namespace gui +} // namespace lumiera + diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.hpp b/src/gui/widgets/timeline/timeline-arrow-tool.hpp new file mode 100644 index 000000000..edf287767 --- /dev/null +++ b/src/gui/widgets/timeline/timeline-arrow-tool.hpp @@ -0,0 +1,50 @@ +/* + timeline-arrow-tool.hpp - Declaration of the ArrowTool class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ +/** @file timeline-arrow-tool.hpp + ** This file contains the definition of the arrow tool class + */ + +#ifndef TIMELINE_ARROW_TOOL_HPP +#define TIMELINE_ARROW_TOOL_HPP + +#include +#include "timeline-tool.hpp" + +namespace lumiera { +namespace gui { +namespace widgets { +namespace timeline { + +class ArrowTool : public Tool +{ +public: + ArrowTool(); + + ToolType get_type() const; +}; + +} // namespace timeline +} // namespace widgets +} // namespace gui +} // namespace lumiera + +#endif // TIMELINE_ARROW_TOOL_HPP diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp new file mode 100644 index 000000000..f6c9bf0cc --- /dev/null +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp @@ -0,0 +1,45 @@ +/* + timeline-ibeam-tool.cpp - Implementation of the IBeamTool class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include "timeline-ibeam-tool.hpp" + +namespace lumiera { +namespace gui { +namespace widgets { +namespace timeline { + +IBeamTool::IBeamTool() +{ + +} + +ToolType +IBeamTool::get_type() const +{ + return IBeam; +} + +} // namespace timeline +} // namespace widgets +} // namespace gui +} // namespace lumiera + diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp new file mode 100644 index 000000000..848c75b60 --- /dev/null +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp @@ -0,0 +1,51 @@ +/* + timeline-ibeam-tool.hpp - Declaration of the ArrowTool class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ +/** @file timeline-ibeam-tool.hpp + ** This file contains the definition of ibeam tool class + ** tool objects + */ + +#ifndef TIMELINE_IBEAM_TOOL_HPP +#define TIMELINE_IBEAM_TOOL_HPP + +#include +#include "timeline-tool.hpp" + +namespace lumiera { +namespace gui { +namespace widgets { +namespace timeline { + +class IBeamTool : public Tool +{ +public: + IBeamTool(); + + ToolType get_type() const; +}; + +} // namespace timeline +} // namespace widgets +} // namespace gui +} // namespace lumiera + +#endif // TIMELINE_IBEAM_TOOL_HPP diff --git a/src/gui/widgets/timeline/timeline-tool.cpp b/src/gui/widgets/timeline/timeline-tool.cpp new file mode 100644 index 000000000..e1b8f5c0f --- /dev/null +++ b/src/gui/widgets/timeline/timeline-tool.cpp @@ -0,0 +1,39 @@ +/* + timeline-tool.hpp - Implementation of the Tool class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include "timeline-tool.hpp" + +namespace lumiera { +namespace gui { +namespace widgets { +namespace timeline { + +Tool::Tool() +{ + +} + +} // namespace timeline +} // namespace widgets +} // namespace gui +} // namespace lumiera + diff --git a/src/gui/widgets/timeline/timeline-tool.hpp b/src/gui/widgets/timeline/timeline-tool.hpp new file mode 100644 index 000000000..1007aace6 --- /dev/null +++ b/src/gui/widgets/timeline/timeline-tool.hpp @@ -0,0 +1,58 @@ +/* + timeline-tool.hpp - Declaration of the Tool class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ +/** @file timeline-tool.hpp + ** This file contains the definition of base class for timeline + ** tool objects + */ + +#ifndef TIMELINE_TOOL_HPP +#define TIMELINE_TOOL_HPP + +#include + +namespace lumiera { +namespace gui { +namespace widgets { +namespace timeline { + +enum ToolType +{ + None, + Arrow, + IBeam +}; + +class Tool +{ +public: + Tool(); + + virtual ToolType get_type() const = 0; +}; + + +} // namespace timeline +} // namespace widgets +} // namespace gui +} // namespace lumiera + +#endif // TIMELINE_TOOL_HPP diff --git a/src/gui/widgets/timeline/track.hpp b/src/gui/widgets/timeline/track.hpp index 3abbf036d..b5f193019 100644 --- a/src/gui/widgets/timeline/track.hpp +++ b/src/gui/widgets/timeline/track.hpp @@ -34,22 +34,22 @@ namespace widgets { namespace timeline { class Track - { - public: - Track(); +{ +public: + Track(); - Glib::ustring get_title(); + Glib::ustring get_title(); - Gtk::Widget& get_header_widget(); + Gtk::Widget& get_header_widget(); - int get_height(); + int get_height(); - void draw_track(Cairo::RefPtr cairo); + void draw_track(Cairo::RefPtr cairo); - protected: - Gtk::VBox headerWidget; - Gtk::Label label; - }; +protected: + Gtk::VBox headerWidget; + Gtk::Label label; +}; } // namespace timeline diff --git a/src/gui/workspace/actions.cpp b/src/gui/workspace/actions.cpp index deade71fa..64bc6bb07 100644 --- a/src/gui/workspace/actions.cpp +++ b/src/gui/workspace/actions.cpp @@ -95,37 +95,65 @@ void Actions::register_stock_items() { RefPtr factory = IconFactory::create(); - add_stock_item(factory, "assets-panel.png", "assets_panel", _("_Assets")); - add_stock_item(factory, "timeline-panel.png", "timeline_panel", _("_Timeline")); - add_stock_item(factory, "viewer-panel.png", "viewer_panel", _("_Viewer")); + + add_stock_item_set(factory, "assets-panel.png", "assets_panel", _("_Assets")); + add_stock_item_set(factory, "timeline-panel.png", "timeline_panel", _("_Timeline")); + add_stock_item_set(factory, "viewer-panel.png", "viewer_panel", _("_Viewer")); + + add_stock_item_set(factory, "arrow.png", "arrow", _("_Arrow")); + add_stock_item_set(factory, "i-beam.png", "i_beam", _("_I-Beam")); + factory->add_default(); //Add factory to list of factories. } -void -Actions::add_stock_item(const Glib::RefPtr& factory, - const Glib::ustring& filepath, - const Glib::ustring& id, const Glib::ustring& label) +bool +Actions::add_stock_item_set(const Glib::RefPtr& factory, + const Glib::ustring& filename, + const Glib::ustring& id, + const Glib::ustring& label) +{ + Gtk::IconSet icon_set; + + add_stock_icon_source(icon_set, 16, filename); + add_stock_icon_source(icon_set, 22, filename); + add_stock_icon_source(icon_set, 24, filename); + add_stock_icon_source(icon_set, 32, filename); + add_stock_icon_source(icon_set, 48, filename); + + if(!icon_set.get_sizes().empty()) + { + const Gtk::StockID stock_id(id); + factory->add(stock_id, icon_set); + Gtk::Stock::add(Gtk::StockItem(stock_id, label)); + return true; + } + + return false; +} + +bool +Actions::add_stock_icon_source(Gtk::IconSet &icon_set, + int size, const Glib::ustring& filename) { Gtk::IconSource source; + try { //This throws an exception if the file is not found: - source.set_pixbuf( Gdk::Pixbuf::create_from_file(filepath) ); + source.set_pixbuf( Gdk::Pixbuf::create_from_file( + Glib::ustring::compose("icons/%1x%1/%2", size, filename) ) ); } catch(const Glib::Exception& ex) { - g_message(ex.what().c_str()); + return false; } - source.set_size(Gtk::ICON_SIZE_SMALL_TOOLBAR); - source.set_size_wildcarded(); //Icon may be scaled. + source.set_size(IconSize(size)); + //source.set_size_wildcarded(); // Icon may be scaled. - Gtk::IconSet icon_set; - icon_set.add_source(source); //More than one source per set is allowed. + icon_set.add_source(source); - const Gtk::StockID stock_id(id); - factory->add(stock_id, icon_set); - Gtk::Stock::add(Gtk::StockItem(stock_id, label)); + return true; } void diff --git a/src/gui/workspace/actions.hpp b/src/gui/workspace/actions.hpp index 235ae29ef..c3b21c384 100644 --- a/src/gui/workspace/actions.hpp +++ b/src/gui/workspace/actions.hpp @@ -53,9 +53,14 @@ class WorkspaceWindow; * labels associated with IDs */ static void register_stock_items(); - static void add_stock_item(const Glib::RefPtr& factory, - const Glib::ustring& filepath, - const Glib::ustring& id, const Glib::ustring& label); + static bool add_stock_item_set( + const Glib::RefPtr& factory, + const Glib::ustring& filename, + const Glib::ustring& id, + const Glib::ustring& label); + + static bool add_stock_icon_source(Gtk::IconSet &icon_set, + int size, const Glib::ustring& filename); /** * Updates the state of the menu/toolbar actions From 847cc9c267b4a917d380b2d8f1c2165be2b2d1a3 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 30 Jul 2008 03:56:13 +0200 Subject: [PATCH 22/80] WIP rearranged some headers --- src/common/configrules.hpp | 2 +- src/common/meta/configflags.hpp | 180 +++++++++ .../{typelistutil.hpp => meta/generator.hpp} | 46 +-- src/common/{ => meta}/typelist.hpp | 4 +- src/common/meta/typelistutil.hpp | 213 ++++++++++ src/common/meta/util.hpp | 74 ++++ src/common/variant.hpp | 2 +- src/common/visitor.hpp | 2 +- src/common/wrapperptr.hpp | 2 +- src/proc/engine/nodeoperation.hpp | 13 +- src/proc/engine/nodewiringconfig.hpp | 376 ++---------------- src/tool/try.cpp | 2 +- .../{typelist => meta}/configflagstest.cpp | 10 +- .../generatortest.cpp} | 12 +- .../{typelist => meta}/typelistmaniptest.cpp | 4 +- .../{typelist => meta}/typelisttest.cpp | 2 +- 16 files changed, 535 insertions(+), 409 deletions(-) create mode 100644 src/common/meta/configflags.hpp rename src/common/{typelistutil.hpp => meta/generator.hpp} (86%) rename src/common/{ => meta}/typelist.hpp (98%) create mode 100644 src/common/meta/typelistutil.hpp create mode 100644 src/common/meta/util.hpp rename tests/common/{typelist => meta}/configflagstest.cpp (97%) rename tests/common/{typelist/typelistutiltest.cpp => meta/generatortest.cpp} (94%) rename tests/common/{typelist => meta}/typelistmaniptest.cpp (98%) rename tests/common/{typelist => meta}/typelisttest.cpp (98%) diff --git a/src/common/configrules.hpp b/src/common/configrules.hpp index 0968c88d4..e80ccfa8a 100644 --- a/src/common/configrules.hpp +++ b/src/common/configrules.hpp @@ -48,7 +48,7 @@ #include "common/p.hpp" #include "common/query.hpp" -#include "common/typelistutil.hpp" +#include "common/meta/generator.hpp" #include "common/singletonsubclass.hpp" //TODO: is it sensible to bring in the types explicitly here? (it's not necessary, but may be convenient...) diff --git a/src/common/meta/configflags.hpp b/src/common/meta/configflags.hpp new file mode 100644 index 000000000..daf8917de --- /dev/null +++ b/src/common/meta/configflags.hpp @@ -0,0 +1,180 @@ +/* + CONFIGFLAGS.hpp - Building classes based on configuration cases + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file configflags.hpp + ** Under some circumstances it is necessary to assemble functionality + ** out of elementary building blocks. Especially, this assembly can be + ** expressed as template specialisations directed by a configuration type. + ** Thus, the purpose of this header is to encode a flag-like configuraiton + ** as distinct types, which can be used to select such specialisations. + ** Each possible configuration can be encoded as a list of flags, which allows + ** to generate, filter and process those configurations. The final goal is to + ** automatically generate a factory which will deliver objects configured + ** according to the configuration in question. + ** + ** @see proc::engine::config::Strategy usage example + ** @see proc::engine::config::ConfigSelector + ** @see typelist.hpp + ** + */ + + +#ifndef LUMIERA_META_CONFIGFLAGS_H +#define LUMIERA_META_CONFIGFLAGS_H + + +#include "common/meta/typelist.hpp" + + +namespace lumiera { + namespace typelist { + + + template struct Flag { typedef Flag ID; }; + template<> struct Flag<0> { typedef NullType ID; }; + + + template< char f1=0 + , char f2=0 + , char f3=0 + , char f4=0 + , char f5=0 + > + struct Flags + { + typedef typename Types< typename Flag::ID + , typename Flag::ID + , typename Flag::ID + , typename Flag::ID + , typename Flag::ID + >::List + Tuple; + typedef Tuple List; + }; + + + template< char f1=0 + , char f2=0 + , char f3=0 + , char f4=0 + , char f5=0 + > + struct Config ///< distinct type representing a configuration + { + typedef typename Flags::Tuple Flags; + typedef Flags List; + }; + + + + template + struct ConfigSetFlag; ///< set (prepend) the Flag to the given config + + template< char Fl + , char f1 + , char f2 + , char f3 + , char f4 + , char IGN + > + struct ConfigSetFlag > + { + typedef Config Config; + }; + + + + /** build a configuration type for the given list-of-flags */ + template > + struct DefineConfigByFlags + { + typedef CONF Config; + typedef Config Type; + }; + template + struct DefineConfigByFlags< Node,FLAGS>, CONF> + { + typedef typename ConfigSetFlag< Fl + , typename DefineConfigByFlags::Config + >::Config Config; + typedef Config Type; + }; + + + /** + * Helper for calculating values and for + * invoking runtime code based on a given FlagTuple. + * Can also be used on a Typelist of several Configs. + * The latter case is typically used to invoke an operation + * while ennumerating all Flag-Configurations defined in Code. + * An example would be to build (at runtime) an dispatcher table. + * Explanation: For the Case covering a List of Configs, we provide + * a templated visitaion function, which can accept a functor object + * to be invoked on each Configuration. + */ + template + struct FlagInfo; + + template + struct FlagInfo, FLAGS> > + { + enum{ BITS = MAX(ff, FlagInfo::BITS) + , CODE = (1<::CODE + }; + }; + template<> + struct FlagInfo + { + enum{ BITS = 0 + , CODE = 0 + }; + + template + static typename FUNC::Ret + accept (FUNC& functor) + { + return functor.done(); + } + }; + template + struct FlagInfo > + { + typedef typename CONF::Flags ThisFlags; + enum{ BITS = MAX (char(FlagInfo::BITS), char(FlagInfo::BITS)) + }; + + template + static typename FUNC::Ret + accept (FUNC& functor) + { + functor.template visit(FlagInfo::CODE); + return FlagInfo::accept (functor); + } + }; + + + + } // namespace typelist + +} // namespace lumiera +#endif diff --git a/src/common/typelistutil.hpp b/src/common/meta/generator.hpp similarity index 86% rename from src/common/typelistutil.hpp rename to src/common/meta/generator.hpp index 3fb6a531e..59f340b5d 100644 --- a/src/common/typelistutil.hpp +++ b/src/common/meta/generator.hpp @@ -1,5 +1,5 @@ /* - TYPELISTUTIL.hpp - metaprogramming utilities for lists-of-types + GENERATOR.hpp - metaprogramming utilities for generating classes and interfaces Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -38,7 +38,7 @@ This code is heavily inspired by */ -/** @file typelistutil.hpp +/** @file generator.hpp ** Helpers for working with lumiera::typelist::Types (i.e. lists-of-types). ** The main purpose is to build interfaces and polymorphic implementations ** (using virtual functions) based on templated Types or Collections of types, @@ -50,10 +50,10 @@ This code is heavily inspired by */ -#ifndef LUMIERA_TYPELISTUTIL_H -#define LUMIERA_TYPELISTUTIL_H +#ifndef LUMIERA_META_GENERATOR_H +#define LUMIERA_META_GENERATOR_H -#include "common/typelist.hpp" +#include "common/meta/typelist.hpp" @@ -196,42 +196,6 @@ namespace lumiera }; - /** - * Metafunction counting the number of Types in the collection - */ - template - struct count; - template<> - struct count - { - enum{ value = 0 }; - }; - template - struct count > - { - enum{ value = 1 + count::value }; - }; - - /** - * Metafunction " max( sizeof(T) ) for T in TYPES " - */ - template - struct maxSize; - template<> - struct maxSize - { - enum{ value = 0 }; - }; - template - struct maxSize > - { - enum{ thisval = sizeof(TY) - , nextval = maxSize::value - , value = nextval > thisval? nextval:thisval - }; - }; - - } // namespace typelist } // namespace lumiera diff --git a/src/common/typelist.hpp b/src/common/meta/typelist.hpp similarity index 98% rename from src/common/typelist.hpp rename to src/common/meta/typelist.hpp index 2f45ae85b..c2d4568d0 100644 --- a/src/common/typelist.hpp +++ b/src/common/meta/typelist.hpp @@ -53,8 +53,8 @@ This code is heavily inspired by */ -#ifndef LUMIERA_TYPELIST_H -#define LUMIERA_TYPELIST_H +#ifndef LUMIERA_META_TYPELIST_H +#define LUMIERA_META_TYPELIST_H diff --git a/src/common/meta/typelistutil.hpp b/src/common/meta/typelistutil.hpp new file mode 100644 index 000000000..3a0d56284 --- /dev/null +++ b/src/common/meta/typelistutil.hpp @@ -0,0 +1,213 @@ +/* + TYPELISTUTIL.hpp - Utils for working with lists-of-types + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +#ifndef LUMIERA_META_TYPELISTUTIL_H +#define LUMIERA_META_TYPELISTUTIL_H + + + +#include "common/meta/typelist.hpp" + +namespace lumiera { + namespace typelist { + + + /** + * Metafunction counting the number of Types in the collection + */ + template + struct count; + template<> + struct count + { + enum{ value = 0 }; + }; + template + struct count > + { + enum{ value = 1 + count::value }; + }; + + /** + * Metafunction " max( sizeof(T) ) for T in TYPES " + */ + template + struct maxSize; + template<> + struct maxSize + { + enum{ value = 0 }; + }; + template + struct maxSize > + { + enum{ thisval = sizeof(TY) + , nextval = maxSize::value + , value = nextval > thisval? nextval:thisval + }; + }; + + + /** apply a transformation (template) to each type in the list */ + template class _TRANS_> + struct Apply { typedef TY List; }; + + template< class TY, class TYPES + , template class _TRANS_ + > + struct Apply, _TRANS_ > { typedef Node< typename _TRANS_::Type + , typename Apply::List + > List; }; + + + template + struct CondNode { typedef TAIL Next; }; + + template + struct CondNode { typedef Node Next; }; + + /** filter away those types which don't fulfill a predicate metafunction */ + template< class TYPES + , template class _P_ ///< a template providing a boolean member \c ::value + > + struct Filter; + + template class _P_> + struct Filter { typedef NullType List; }; + + template< class TY, class TYPES + , template class _P_ + > + struct Filter,_P_> { typedef typename CondNode< _P_::value + , TY + , typename Filter::List + >::Next + List; }; + + + /** append lists-of-types */ + template + struct Append { typedef Node::List> List; }; + + template< class TY, class TYPES + , class TAIL + > + struct Append, TAIL> { typedef Node::List> List; }; + + template + struct Append > { typedef Node List; }; + + template + struct Append, NullType> { typedef Node List; }; + + template + struct Append { typedef Node List; }; + + template + struct Append { typedef Node List; }; + + template<> + struct Append { typedef NullType List; }; + + + + /** + * prefix each of the elements, + * yielding a list-of lists-of-types + */ + template + struct PrefixAll { typedef Node< typename Append::List, NullType> List; }; + + template + struct PrefixAll { typedef NullType List; }; + + template + struct PrefixAll { typedef Node< typename Append::List, NullType> List; }; + + template< class T + , class TY, class TYPES + > + struct PrefixAll > { typedef Node< typename Append::List + , typename PrefixAll::List + > List; }; + + + + + template + struct Distribute { typedef typename PrefixAll::List List; }; + + template + struct Distribute { typedef NullType List; }; + + template< class TY, class TYPES + , class TAIL + > + struct Distribute,TAIL> { typedef typename Append< typename PrefixAll::List + , typename Distribute::List + >::List + List; }; + + + + /** use a permutation generator + * for creating a list of all possible combinations + */ + template< class X + , template class _PERMU_> + struct Combine { typedef typename Distribute< typename _PERMU_::List + , Node + >::List List; }; + template< template class _PERMU_> + struct Combine { typedef Node List; }; + + template< class TY, class TYPES + , template class _PERMU_> + struct Combine,_PERMU_> { typedef typename Distribute< typename _PERMU_::List + , typename Combine::List + >::List List; }; + + /** permutation generator for the Combine metafunction, + * yielding an "on" and "off" case + */ + template + struct FlagOnOff + { + typedef Node > List; + }; + + + /** generate all possible on-off combinations of the given flags */ + template + struct CombineFlags + { + typedef typename Combine::List List; + }; + + + + + } // namespace typelist + +} // namespace lumiera +#endif diff --git a/src/common/meta/util.hpp b/src/common/meta/util.hpp new file mode 100644 index 000000000..3c2d985f2 --- /dev/null +++ b/src/common/meta/util.hpp @@ -0,0 +1,74 @@ +/* + UTIL.hpp - metaprogramming helpers and utilities + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +#ifndef LUMIERA_META_UTIL_H +#define LUMIERA_META_UTIL_H + + + +namespace lumiera { + namespace typelist { + + + /* types for figuring out the overload resolution chosen by the compiler */ + + typedef char Yes_t; + struct No_t { char padding[8]; }; + + + /** semi-automatic detection if an instantiation is possible. + * Requires help by the template to be tested, which needs to define + * a typedef member \c is_defined. The embedded metafunction Test can be used + * as a predicate for filtering types which may yield a valid instantiation + * of the candidate template in question. + * \par + * A fully automated solution for this problem is impossible by theoretic reasons. + * Any non trivial use of such a \c is_defined trait would break the "One Definition Rule", + * as the state of any type can change from "partially defined" to "fully defined" over + * the course of any translation unit. Thus, even if there may be a \em solution out there, + * we can expect it to break at some point by improvements/fixes to the C++ Language. + */ + template class _CandidateTemplate_> + struct Instantiation + { + + template + class Test + { + typedef _CandidateTemplate_ Instance; + + template + static Yes_t check(typename U::is_defined *); + template + static No_t check(...); + + public: + static const bool value = (sizeof(Yes_t)==sizeof(check(0))); + }; + }; + + + } // namespace typelist + +} // namespace lumiera +#endif diff --git a/src/common/variant.hpp b/src/common/variant.hpp index 561b7149c..48f813e19 100644 --- a/src/common/variant.hpp +++ b/src/common/variant.hpp @@ -41,7 +41,7 @@ #define LUMIERA_VARIANT_H -#include "common/typelistutil.hpp" +#include "common/meta/generator.hpp" #include diff --git a/src/common/visitor.hpp b/src/common/visitor.hpp index 3d22f11e6..49bbcedb5 100644 --- a/src/common/visitor.hpp +++ b/src/common/visitor.hpp @@ -79,7 +79,7 @@ Credits for many further implementation ideas go to #include "common/visitorpolicies.hpp" #include "common/visitordispatcher.hpp" -#include "common/typelist.hpp" +#include "common/meta/typelist.hpp" namespace lumiera diff --git a/src/common/wrapperptr.hpp b/src/common/wrapperptr.hpp index e17963eff..81afa1177 100644 --- a/src/common/wrapperptr.hpp +++ b/src/common/wrapperptr.hpp @@ -29,7 +29,7 @@ #include "common/variant.hpp" #include "common/accesscasted.hpp" -#include "common/typelist.hpp" +#include "common/meta/typelist.hpp" #include "proc/mobject/placement.hpp" #include "common/p.hpp" diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp index 144050d39..40be62c35 100644 --- a/src/proc/engine/nodeoperation.hpp +++ b/src/proc/engine/nodeoperation.hpp @@ -62,7 +62,6 @@ #include "proc/engine/buffhandle.hpp" #include "proc/engine/bufftable.hpp" #include "proc/engine/nodeinvocation.hpp" -#include "proc/engine/nodewiringconfig.hpp" @@ -230,6 +229,18 @@ namespace engine { /* === declare the possible Assembly of these elementary steps === */ + enum Cases + { + CACHING = 1, + PROCESS, + INPLACE, + + NOT_SET = 0, + NUM_Cases = INPLACE + }; + + + template struct SelectBuffProvider; diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index 9223f5633..fe1a24856 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -19,369 +19,49 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - - +/** @file nodewiringconfig.hpp + ** Sometimes we need to coose a different implementation for dealing with + ** some special cases. While for simple cases, just testing a flag or using a + ** switch statement will do the job, matters get more difficult when we have to + ** employ a completely different execution path for each of the different cases, + ** while using a set of common building blocks. + ** \par + ** In the Lumiera render engine, right on the critical path, we need some glue code + ** for invoking the predecessor nodes when pulling a given processing node. The actual + ** sequence is quite dependant on the specific situation each node is wired up, regarding + ** buffer allocation, cache querying and the possible support for GPU processing and + ** render farms. The solution is to define specialisations of a Strategy template + ** using the specific configuration as template argument. Based on these, we can + ** create a collection of factories, which in turn will build the internal wiring + ** for the individual ProcNode instances in accordance to the situation determined + ** for this node, expressed as a set of flags. As a net result, each node has an + ** indivudual configuration (as opposed to creating a lot of hand-written individual + ** ProcNode subclasses), but parts of this configuration assembly is done already at + ** compile time, allowing for additional checks by typing and for possible optimisation. + ** + ** @see proc::engine::config::Strategy + ** @see nodewiring.hpp + ** @see configflags.hpp + ** + */ #ifndef ENGINE_NODEWIRINGCONFIG_H #define ENGINE_NODEWIRINGCONFIG_H #include "common/util.hpp" +#include "common/meta/configflags.hpp" -//#include -#include -#include -#include -#include -#include #include - - /////////////////TODO: library - -#include "common/typelistutil.hpp" -namespace lumiera { - namespace typelist { - - template class _TRANS_> - struct Apply { typedef TY List; }; - - template< class TY, class TYPES - , template class _TRANS_ - > - struct Apply, _TRANS_ > { typedef Node< typename _TRANS_::Type - , typename Apply::List - > List; }; - - - template - struct CondNode { typedef TAIL Next; }; - - template - struct CondNode { typedef Node Next; }; - - - template< class TYPES , template class _P_> - struct Filter; - - template class _P_> - struct Filter { typedef NullType List; }; - - template< class TY, class TYPES - , template class _P_ - > - struct Filter,_P_> { typedef typename CondNode< _P_::value - , TY - , typename Filter::List - >::Next - List; }; - - - - template - struct Append { typedef Node::List> List; }; - - template< class TY, class TYPES - , class TAIL - > - struct Append, TAIL> { typedef Node::List> List; }; - - template - struct Append > { typedef Node List; }; - - template - struct Append, NullType> { typedef Node List; }; - - template - struct Append { typedef Node List; }; - - template - struct Append { typedef Node List; }; - - template<> - struct Append { typedef NullType List; }; - - - - - template - struct PrefixAll { typedef Node< typename Append::List, NullType> List; }; - - template - struct PrefixAll { typedef NullType List; }; - - template - struct PrefixAll { typedef Node< typename Append::List, NullType> List; }; - - template< class T - , class TY, class TYPES - > - struct PrefixAll > { typedef Node< typename Append::List - , typename PrefixAll::List - > List; }; - - - - - template - struct Distribute { typedef typename PrefixAll::List List; }; - - template - struct Distribute { typedef NullType List; }; - - template< class TY, class TYPES - , class TAIL - > - struct Distribute,TAIL> { typedef typename Append< typename PrefixAll::List - , typename Distribute::List - >::List - List; }; - - - - - template< class X - , template class _PERMU_> - struct Combine { typedef typename Distribute< typename _PERMU_::List - , Node - >::List List; }; - template< template class _PERMU_> - struct Combine { typedef Node List; }; - - template< class TY, class TYPES - , template class _PERMU_> - struct Combine,_PERMU_> { typedef typename Distribute< typename _PERMU_::List - , typename Combine::List - >::List List; }; - - - template - struct FlagOnOff - { - typedef Node > List; - }; - - template - struct CombineFlags - { - typedef typename Combine::List List; - }; - - - - /////////// meta utils - - typedef char Yes_t; - struct No_t { char padding[8]; }; - - - /** semi-automatic detection if an instantiation is possible. - * Requires help by the template to be tested, which needs to define - * a typedef member \c is_defined. The embedded metafunction Test can be used - * as a predicate for filtering types which may yield a valid instantiation - * of the candidate template in question. - * \par - * A fully automated solution for this problem is impossible by theoretic reasons. - * Any non trivial use of such a \c is_defined trait would break the "One Definition Rule", - * as the state of any type can change from "partially defined" to "fully defined" over - * the course of any translation unit. Thus, even if there may be a \em solution out there, - * we can expect it to break at some point by improvements/fixes to the C++ Language. - */ - template class _CandidateTemplate_> - struct Instantiation - { - - template - class Test - { - typedef _CandidateTemplate_ Instance; - - template - static Yes_t check(typename U::is_defined *); - template - static No_t check(...); - - public: - static const bool value = (sizeof(Yes_t)==sizeof(check(0))); - }; - }; - - - - - - - template struct Flag { typedef Flag ID; }; - template<> struct Flag<0> { typedef NullType ID; }; - - - template< char f1=0 - , char f2=0 - , char f3=0 - , char f4=0 - , char f5=0 - > - struct Flags - { - typedef typename Types< typename Flag::ID - , typename Flag::ID - , typename Flag::ID - , typename Flag::ID - , typename Flag::ID - >::List - Tuple; - typedef Tuple List; - }; - - - template< char f1=0 - , char f2=0 - , char f3=0 - , char f4=0 - , char f5=0 - > - struct Config - { - typedef typename Flags::Tuple Flags; - typedef Flags List; - }; - - - template - struct ConfigSetFlag; - - template< char Fl - , char f1 - , char f2 - , char f3 - , char f4 - , char IGN - > - struct ConfigSetFlag > - { - typedef Config Config; - }; - - template > - struct DefineConfigByFlags - { - typedef CONF Config; - typedef Config Type; - }; - template - struct DefineConfigByFlags< Node,FLAGS>, CONF> - { - typedef typename ConfigSetFlag< Fl - , typename DefineConfigByFlags::Config - >::Config Config; - typedef Config Type; - }; - - - /** - * Helper for calculating values and for - * invoking runtime code based on a given FlagTuple. - * Can also be used on a Typelist of several Configs. - * The latter case is typically used to invoke an operation - * while ennumerating all Flag-Configurations defined in Code. - * An example would be to build (at runtime) an dispatcher table. - * Explanation: For the Case covering a List of Configs, we provide - * a templated visitaion function, which can accept a functor object - * to be invoked on each Configuration. - */ - template - struct FlagInfo; - - template - struct FlagInfo, FLAGS> > - { - enum{ BITS = MAX(ff, FlagInfo::BITS) - , CODE = (1<::CODE - }; - }; - template<> - struct FlagInfo - { - enum{ BITS = 0 - , CODE = 0 - }; - - template - static typename FUNC::Ret - accept (FUNC& functor) - { - return functor.done(); - } - }; - template - struct FlagInfo > - { - typedef typename CONF::Flags ThisFlags; - enum{ BITS = MAX (char(FlagInfo::BITS), char(FlagInfo::BITS)) - }; - - template - static typename FUNC::Ret - accept (FUNC& functor) - { - functor.template visit(FlagInfo::CODE); - return FlagInfo::accept (functor); - } - }; - - - - - - } // namespace typelist - -} // namespace lumiera - - /////////////////TODO: library(end) - +#include namespace engine { - - class WiringFactory; - - ///////TODO - using lumiera::typelist::Config; using lumiera::typelist::FlagInfo; - using lumiera::typelist::DefineConfigByFlags; - ///////TODO using boost::lexical_cast; using util::contains; - enum Cases - { - CACHING = 1, - PROCESS, - INPLACE, - - NOT_SET = 0, - NUM_Cases = INPLACE - }; - typedef std::bitset Bits; - - - - - /** - * Helper type used to describe the \em situation on which to base - * the selection of the wiring and configuration of a ProcNode. - * It is based on a tuple of elementary parameters (here of type bool); - * a combination of these describes the situation and is used to select - * a strategy, which in turn determines what concret operations to use - * while pulling the node, and how to combine these operations. - * @see engine::Strategy ///TODO namespace.... - */ -// template -// struct Config -// { -// static Bits getRepr () { return getCaseRepresentation(caching,process,inplace); } -// }; - /** * Helper for fabricating ProcNode Wiring configurations. @@ -439,7 +119,7 @@ namespace engine { }; - typedef boost::shared_ptr PFunc; + typedef std::tr1::shared_ptr PFunc; typedef std::map ConfigTable; ConfigTable possibleConfig_; ///< Table of factories diff --git a/src/tool/try.cpp b/src/tool/try.cpp index 7d9d99000..3f51bcaf6 100644 --- a/src/tool/try.cpp +++ b/src/tool/try.cpp @@ -32,7 +32,7 @@ using boost::is_base_of; #include -#include "common/typelistutil.hpp" +#include "common/meta/generator.hpp" using lumiera::typelist::NullType; using lumiera::typelist::Node; using lumiera::typelist::Types; diff --git a/tests/common/typelist/configflagstest.cpp b/tests/common/meta/configflagstest.cpp similarity index 97% rename from tests/common/typelist/configflagstest.cpp rename to tests/common/meta/configflagstest.cpp index 1c9dbdf83..63ac834d9 100644 --- a/tests/common/typelist/configflagstest.cpp +++ b/tests/common/meta/configflagstest.cpp @@ -38,10 +38,10 @@ #include "common/test/run.hpp" -#include "common/typelistutil.hpp" +#include "common/meta/generator.hpp" +#include "common/meta/typelistutil.hpp" +#include "proc/engine/nodewiringconfig.hpp" #include "common/util.hpp" -//#include "common/typelist/typelistmanip.hpp" -#include "proc/engine/nodewiringconfig.hpp" ///////////TODO move to configflags.hpp #include #include @@ -343,6 +343,10 @@ namespace lumiera { }; + /** @test use the ConfigSelector template to build a set of factories, + * based on a set of configurations. Then invoke the apropriate + * factory by specifying the configuration bit code + */ void check_ConfigSelector() { cout << "\n==== check_ConfigSelector()\n"; diff --git a/tests/common/typelist/typelistutiltest.cpp b/tests/common/meta/generatortest.cpp similarity index 94% rename from tests/common/typelist/typelistutiltest.cpp rename to tests/common/meta/generatortest.cpp index 73cab939e..2909b076d 100644 --- a/tests/common/typelist/typelistutiltest.cpp +++ b/tests/common/meta/generatortest.cpp @@ -1,5 +1,5 @@ /* - TypeListUtil(Test) - check the typelist helpers + Generator(Test) - build an interface + implementation directed by a typelis Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -21,7 +21,7 @@ * *****************************************************/ -/** @file typelistutiltest.cpp +/** @file generatortest.cpp ** \par what are we doing here?? ** ** the following test composes both an interface and the corresponding implementation @@ -31,14 +31,14 @@ ** need to be absolutely fixed in the class definition) ** ** @see typelisttest.cpp - ** @see typelistutil.hpp + ** @see generator.hpp ** @see lumiera::query::ConfigRules a real world usage example ** */ #include "common/test/run.hpp" -#include "common/typelistutil.hpp" +#include "common/meta/generator.hpp" #include #include @@ -118,7 +118,7 @@ namespace lumiera * for a collection of classes * */ - class TypeListUtil_test : public Test + class TypeListGenerator_test : public Test { virtual void run(Arg arg) { @@ -144,7 +144,7 @@ namespace lumiera /** Register this test class... */ - LAUNCHER (TypeListUtil_test, "unit common"); + LAUNCHER (TypeListGenerator_test, "unit common"); diff --git a/tests/common/typelist/typelistmaniptest.cpp b/tests/common/meta/typelistmaniptest.cpp similarity index 98% rename from tests/common/typelist/typelistmaniptest.cpp rename to tests/common/meta/typelistmaniptest.cpp index 7b285d205..9d2321299 100644 --- a/tests/common/typelist/typelistmaniptest.cpp +++ b/tests/common/meta/typelistmaniptest.cpp @@ -39,9 +39,9 @@ #include "common/test/run.hpp" -#include "common/typelistutil.hpp" +#include "common/meta/generator.hpp" +#include "common/meta/typelistutil.hpp" #include "common/util.hpp" -#include "proc/engine/nodewiringconfig.hpp" ///////////TODO move to typelistutil.hpp #include #include diff --git a/tests/common/typelist/typelisttest.cpp b/tests/common/meta/typelisttest.cpp similarity index 98% rename from tests/common/typelist/typelisttest.cpp rename to tests/common/meta/typelisttest.cpp index 42159d96c..5c942b1e0 100644 --- a/tests/common/typelist/typelisttest.cpp +++ b/tests/common/meta/typelisttest.cpp @@ -22,7 +22,7 @@ #include "common/test/run.hpp" -#include "common/typelist.hpp" +#include "common/meta/typelist.hpp" #include From cf7bd178ded663d660cba6115d991f50680627ef Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 3 Aug 2008 16:47:38 +0200 Subject: [PATCH 23/80] WIP further refactorings. Put nodeoperation.hpp and ConfigSelector in a sub namespace engine::config --- src/common/meta/configflags.hpp | 12 +- src/common/meta/util.hpp | 16 +- src/common/variant.hpp | 1 + src/proc/engine/nodeoperation.hpp | 460 +++++++++++----------- src/proc/engine/nodewiring.cpp | 71 +++- src/proc/engine/nodewiring.hpp | 5 + src/proc/engine/nodewiringconfig.hpp | 233 +++++------ tests/common/meta/configflagstest.cpp | 76 +--- tests/common/meta/typelistdiagnostics.hpp | 140 +++++++ 9 files changed, 589 insertions(+), 425 deletions(-) create mode 100644 tests/common/meta/typelistdiagnostics.hpp diff --git a/src/common/meta/configflags.hpp b/src/common/meta/configflags.hpp index daf8917de..7ffb79a70 100644 --- a/src/common/meta/configflags.hpp +++ b/src/common/meta/configflags.hpp @@ -25,12 +25,18 @@ ** Under some circumstances it is necessary to assemble functionality ** out of elementary building blocks. Especially, this assembly can be ** expressed as template specialisations directed by a configuration type. - ** Thus, the purpose of this header is to encode a flag-like configuraiton + ** Thus, the purpose of this header is to encode flag-like configuraitons ** as distinct types, which can be used to select such specialisations. ** Each possible configuration can be encoded as a list of flags, which allows ** to generate, filter and process those configurations. The final goal is to - ** automatically generate a factory which will deliver objects configured - ** according to the configuration in question. + ** automatically generate a factory which is able to deliver objects + ** configured according to the situation encoded in the flags. + ** + ** @note currently there is an inherent limitation to configurations defined by + ** a maximum of 5 independant flags. While it is easy to increase this limit, + ** you should consider that the final goal is to genarate template instantiations, + ** which would lead to more and more code bloat with growing number of possible + ** combination. ** ** @see proc::engine::config::Strategy usage example ** @see proc::engine::config::ConfigSelector diff --git a/src/common/meta/util.hpp b/src/common/meta/util.hpp index 3c2d985f2..b01a412fa 100644 --- a/src/common/meta/util.hpp +++ b/src/common/meta/util.hpp @@ -27,15 +27,17 @@ namespace lumiera { + + + /* types for figuring out the overload resolution chosen by the compiler */ + + typedef char Yes_t; + struct No_t { char padding[8]; }; + + + namespace typelist { - - /* types for figuring out the overload resolution chosen by the compiler */ - - typedef char Yes_t; - struct No_t { char padding[8]; }; - - /** semi-automatic detection if an instantiation is possible. * Requires help by the template to be tested, which needs to define * a typedef member \c is_defined. The embedded metafunction Test can be used diff --git a/src/common/variant.hpp b/src/common/variant.hpp index 48f813e19..751c2d9fc 100644 --- a/src/common/variant.hpp +++ b/src/common/variant.hpp @@ -41,6 +41,7 @@ #define LUMIERA_VARIANT_H +#include "common/meta/typelistutil.hpp" #include "common/meta/generator.hpp" #include diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp index 40be62c35..b413c15bb 100644 --- a/src/proc/engine/nodeoperation.hpp +++ b/src/proc/engine/nodeoperation.hpp @@ -63,243 +63,249 @@ #include "proc/engine/bufftable.hpp" #include "proc/engine/nodeinvocation.hpp" +#include "common/meta/util.hpp" +#include "common/meta/configflags.hpp" + namespace engine { - - - /** - * Collection of functions used to build up the invocation sequence. - */ - class OperationBase - { - - }; + namespace config { - template - struct QueryCache : NEXT - { - BuffHandle - step (Invocation& ivo) - { - BuffHandle fetched = ivo.fetch ( - this->genFrameID (ivo)); - if (fetched) - return fetched; - else - return NEXT::step (ivo); - } - }; - - - template - struct AllocBufferTable : NEXT - { - BuffHandle - step (Invocation& ivo) - { - BuffTableChunk buffTab (ivo.wiring, ivo.getBuffTableStorage()); - ivo.setBuffTab(&buffTab); - ASSERT (ivo.buffTab); - ASSERT (ivo.buffTab_isConsistent()); - - return NEXT::step (ivo); - } - }; - - - template - struct PullInput : NEXT - { - BuffHandle - step (Invocation& ivo) - { - BuffHandle * inH = ivo.buffTab->inHandle; - BuffHandle::PBuff *inBuff = ivo.buffTab->inBuff; - - for (uint i = 0; i < ivo.nrI(); ++i ) - { - inBuff[i] = - *(inH[i] = this->pullPredecessor(ivo,i)); // invoke predecessor - // now Input #i is ready... - } - return NEXT::step (ivo); // note: passing down a ref to the ProcessInvocation - } - }; - - - template - struct ReadSource : NEXT - { - BuffHandle - step (Invocation& ivo) - { - BuffHandle *inH = ivo.buffTab->inHandle; - BuffHandle *outH = ivo.buffTab->outHandle; - BuffHandle::PBuff *inBuff = ivo.buffTab->inBuff; - BuffHandle::PBuff *outBuff = ivo.buffTab->outBuff; - - ASSERT (ivo.nrO() == ivo.nrI() ); - - for (uint i = 0; i < ivo.nrI(); ++i ) - { - inBuff[i] = outBuff[i] = - *(inH[i] = outH[i] = this->getSource(ivo,i)); - // now Input #i is ready... - } - return NEXT::step (ivo); - } - }; - - - template - struct AllocOutput : NEXT - { - BuffHandle - step (Invocation& ivo) - { - ASSERT (ivo.buffTab); - ASSERT (ivo.nrO() < ivo.buffTabSize()); - BuffHandle *outH = ivo.buffTab->outHandle; - BuffHandle::PBuff *outBuff = ivo.buffTab->outBuff; - - for (uint i = 0; i < ivo.nrO(); ++i ) - { - outBuff[i] = - *(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType)); - // now Output buffer for channel #i is available... - } - return NEXT::step (ivo); - } - }; - - - template - struct ProcessData : NEXT - { - BuffHandle - step (Invocation& ivo) - { - ASSERT (ivo.buffTab); - ASSERT (ivo.buffTab_isConsistent()); - ASSERT (this->validateBuffers(ivo)); - - // Invoke our own process() function, - // providing the array of outBuffer+inBuffer ptrs - ivo.wiring.processFunction (ivo.buffTab->outBuff); - - return NEXT::step (ivo); - } - }; - - template - struct FeedCache : NEXT - { - BuffHandle - step (Invocation& ivo) - { - for (uint i = 0; i < ivo.nrO(); ++i ) - { - // declare all Outputs as finished - ivo.is_calculated(ivo.buffTab->outHandle[i]); - } - - return NEXT::step (ivo); - } - }; - - template - struct ReleaseBuffers : NEXT /////////////////TODO: couldn't this be done automatically by BuffTab's dtor?? - { ///////////////// this would require BuffHandle to be a smart ref.... - BuffHandle - step (Invocation& ivo) - { - // all buffers besides the required Output no longer needed - this->releaseBuffers(ivo.buffTab->outHandle, - ivo.buffTabSize(), - ivo.outNr); - - return ivo.buffTab->outHandle[ivo.outNr]; - } - }; - - - - - /* === declare the possible Assembly of these elementary steps === */ - - enum Cases - { - CACHING = 1, - PROCESS, - INPLACE, + + /** + * Collection of functions used to build up the invocation sequence. + */ + class OperationBase + { + typedef lumiera::Yes_t is_defined; + }; - NOT_SET = 0, - NUM_Cases = INPLACE - }; + template + struct QueryCache : NEXT + { + BuffHandle + step (Invocation& ivo) + { + BuffHandle fetched = ivo.fetch ( + this->genFrameID (ivo)); + if (fetched) + return fetched; + else + return NEXT::step (ivo); + } + }; + + + template + struct AllocBufferTable : NEXT + { + BuffHandle + step (Invocation& ivo) + { + BuffTableChunk buffTab (ivo.wiring, ivo.getBuffTableStorage()); + ivo.setBuffTab(&buffTab); + ASSERT (ivo.buffTab); + ASSERT (ivo.buffTab_isConsistent()); + + return NEXT::step (ivo); + } + }; + + + template + struct PullInput : NEXT + { + BuffHandle + step (Invocation& ivo) + { + BuffHandle * inH = ivo.buffTab->inHandle; + BuffHandle::PBuff *inBuff = ivo.buffTab->inBuff; + + for (uint i = 0; i < ivo.nrI(); ++i ) + { + inBuff[i] = + *(inH[i] = this->pullPredecessor(ivo,i)); // invoke predecessor + // now Input #i is ready... + } + return NEXT::step (ivo); // note: passing down a ref to the ProcessInvocation + } + }; + + + template + struct ReadSource : NEXT + { + BuffHandle + step (Invocation& ivo) + { + BuffHandle *inH = ivo.buffTab->inHandle; + BuffHandle *outH = ivo.buffTab->outHandle; + BuffHandle::PBuff *inBuff = ivo.buffTab->inBuff; + BuffHandle::PBuff *outBuff = ivo.buffTab->outBuff; + + ASSERT (ivo.nrO() == ivo.nrI() ); + + for (uint i = 0; i < ivo.nrI(); ++i ) + { + inBuff[i] = outBuff[i] = + *(inH[i] = outH[i] = this->getSource(ivo,i)); + // now Input #i is ready... + } + return NEXT::step (ivo); + } + }; + + + template + struct AllocOutput : NEXT + { + BuffHandle + step (Invocation& ivo) + { + ASSERT (ivo.buffTab); + ASSERT (ivo.nrO() < ivo.buffTabSize()); + BuffHandle *outH = ivo.buffTab->outHandle; + BuffHandle::PBuff *outBuff = ivo.buffTab->outBuff; + + for (uint i = 0; i < ivo.nrO(); ++i ) + { + outBuff[i] = + *(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType)); + // now Output buffer for channel #i is available... + } + return NEXT::step (ivo); + } + }; + + + template + struct ProcessData : NEXT + { + BuffHandle + step (Invocation& ivo) + { + ASSERT (ivo.buffTab); + ASSERT (ivo.buffTab_isConsistent()); + ASSERT (this->validateBuffers(ivo)); + + // Invoke our own process() function, + // providing the array of outBuffer+inBuffer ptrs + ivo.wiring.processFunction (ivo.buffTab->outBuff); + + return NEXT::step (ivo); + } + }; + + template + struct FeedCache : NEXT + { + BuffHandle + step (Invocation& ivo) + { + for (uint i = 0; i < ivo.nrO(); ++i ) + { + // declare all Outputs as finished + ivo.is_calculated(ivo.buffTab->outHandle[i]); + } + + return NEXT::step (ivo); + } + }; + + template + struct ReleaseBuffers : NEXT /////////////////TODO: couldn't this be done automatically by BuffTab's dtor?? + { ///////////////// this would require BuffHandle to be a smart ref.... + BuffHandle + step (Invocation& ivo) + { + // all buffers besides the required Output no longer needed + this->releaseBuffers(ivo.buffTab->outHandle, + ivo.buffTabSize(), + ivo.outNr); + + return ivo.buffTab->outHandle[ivo.outNr]; + } + }; + + + + + /* === declare the possible Assembly of these elementary steps === */ + + enum Cases + { + CACHING = 1, + PROCESS, + INPLACE, + + NOT_SET = 0, + NUM_Cases = INPLACE + }; + + + + template + struct SelectBuffProvider; + + template<> struct SelectBuffProvider : AllocBufferFromCache { }; + template<> struct SelectBuffProvider : AllocBufferFromParent{ }; + template<> struct SelectBuffProvider : AllocBufferFromCache { }; + template<> struct SelectBuffProvider<> : AllocBufferFromParent{ }; + + template + struct Strategy ; - - template - struct SelectBuffProvider; - - template<> struct SelectBuffProvider : AllocBufferFromCache { }; - template<> struct SelectBuffProvider : AllocBufferFromParent{ }; - template<> struct SelectBuffProvider : AllocBufferFromCache { }; - template<> struct SelectBuffProvider<> : AllocBufferFromParent{ }; - - - template - struct Strategy ; - - using lumiera::typelist::Config; - - template - struct Strategy< Config > - : QueryCache< - AllocBufferTable< - PullInput< - AllocOutput< - ProcessData< - FeedCache< + using lumiera::typelist::Config; + + template + struct Strategy< Config > + : QueryCache< + AllocBufferTable< + PullInput< + AllocOutput< + ProcessData< + FeedCache< + ReleaseBuffers< + OperationBase > > > > > > > + { }; + + template + struct Strategy< Config > + : AllocBufferTable< + PullInput< + AllocOutput< + ProcessData< ReleaseBuffers< - OperationBase > > > > > > > - { }; - - template - struct Strategy< Config > - : AllocBufferTable< - PullInput< - AllocOutput< - ProcessData< + OperationBase > > > > > + { }; + + template<> + struct Strategy< Config<> > + : AllocBufferTable< + ReadSource< ReleaseBuffers< - OperationBase > > > > > - { }; - - template<> - struct Strategy< Config<> > - : AllocBufferTable< - ReadSource< - ReleaseBuffers< - OperationBase > > > - { }; - - template<> - struct Strategy< Config > : Strategy< Config<> > { }; - - template<> - struct Strategy< Config > - : AllocBufferTable< - ReadSource< - AllocOutput< - ProcessData< // wiring_.processFunction is supposed to do just buffer copying here - ReleaseBuffers< - OperationBase > > > > > - { }; - - - + OperationBase > > > + { }; + + template<> + struct Strategy< Config > : Strategy< Config<> > { }; + + template<> + struct Strategy< Config > + : AllocBufferTable< + ReadSource< + AllocOutput< + ProcessData< // wiring_.processFunction is supposed to do just buffer copying here + ReleaseBuffers< + OperationBase > > > > > + { }; + + + + + } // namespace config } // namespace engine #endif diff --git a/src/proc/engine/nodewiring.cpp b/src/proc/engine/nodewiring.cpp index a9cafa1a8..dfbe534f9 100644 --- a/src/proc/engine/nodewiring.cpp +++ b/src/proc/engine/nodewiring.cpp @@ -26,9 +26,77 @@ #include "proc/engine/nodeoperation.hpp" #include "proc/engine/nodewiringconfig.hpp" +#include "common/meta/typelistutil.hpp" + namespace engine { + namespace { // internal: setting up a factory for each required configuration + + using config::CACHING; + using config::PROCESS; + using config::INPLACE; + + using config::ConfigSelector; + using config::Strategy; + + using lumiera::typelist::Flags; + using lumiera::typelist::CombineFlags; + using lumiera::typelist::DefineConfigByFlags; + using lumiera::typelist::Instantiation; + using lumiera::typelist::Apply; + using lumiera::typelist::Filter; + + + typedef Flags::Tuple AllFlags; + + /** build the list of all possible flag combinations */ + typedef CombineFlags AllFlagCombinations; + + /** build a configuration type for each of those flag combinations */ + typedef Apply AllConfigs; + + /** filter those configurations which actually define a wiring strategy */ + typedef Filter::Test> PossibleConfigs; + + + class Alloc {}; ///////////////TODO + + + template + class WiringDescriptorFactory + { + Alloc& alloc_; + + public: + WiringDescriptorFactory(Alloc& a) + : alloc_(a) {} + + WiringDescriptor& + operator() () + { + /////////////////////////////////////////////TODO + //return offset_ + Maybe::CODE; + } + }; + + + typedef ConfigSelector WiringSelector; + + struct WiringFactoryImpl + { +// WiringSelector selector; + + WiringFactoryImpl (Alloc& alloc) +// : selector(PossibleConfigs::List(), alloc) + { } + }; + + } // (END) internals + + + /////////////////////////////TODO: define the ctor + /** create and configure a concrete wiring descriptor to tie * a ProcNode to its predecessor nodes. This includes selecting @@ -47,7 +115,8 @@ namespace engine { UNIMPLEMENTED ("build the actual wiring descriptor based on given operation options"); // Bits config (FlagInfo::CODE); -// return selector(config); + size_t config = 13; /////////////////////////////////////////TODO +// return pImpl_->selector(config); } // BlockAlloc > > >::fabricate(); diff --git a/src/proc/engine/nodewiring.hpp b/src/proc/engine/nodewiring.hpp index d17b95396..2d1e587a4 100644 --- a/src/proc/engine/nodewiring.hpp +++ b/src/proc/engine/nodewiring.hpp @@ -27,6 +27,7 @@ #include "proc/engine/procnode.hpp" +#include #include @@ -36,6 +37,8 @@ namespace engine { class WiringFactory; + namespace { class WiringFactoryImpl; } + /** * Actual implementation of the link between nodes, @@ -73,6 +76,8 @@ namespace engine { class WiringFactory { + boost::scoped_ptr pImpl_; + public: WiringDescriptor& operator() (uint nrOut, uint nrIn, bool cache); diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index fe1a24856..c6df0c0db 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -56,122 +56,125 @@ namespace engine { - - using lumiera::typelist::FlagInfo; + namespace config { - using boost::lexical_cast; - using util::contains; - - - /** - * Helper for fabricating ProcNode Wiring configurations. - * This object builds a table of factories, holding one factory - * for each possible node configuration. Provided with the desired - * configuration encoded as bits, the related factory can be invoked, - * thus producing a product object for the given configuration. - * - * \par implementation notes - * The actual factory class is templated, so it will be defined - * at the use site of ConfigSelector. Moreover, this factory - * usually expects an ctor argument, which will be fed through - * when creating the ConfigSelector instance. This is one of - * the reasons why we go through all these complicated factory - * building: this ctor argument usually brings in a reference - * to the actual memory allocator. Thus we have to rebuild the - * ConfigSelector each time we switch and rebuild the ProcNode - * factories, which in turn happens each time we use a new - * bulk allocation memory block -- typically for each separate - * segment of the Timeline and processing node graph. - * - * Now the selection of the possible flag configurations, for which - * Factory instances are created in the table, is governed by the - * type parameter of the ConfigSelector ctor. This type parameter - * needs to be a Typelist of Typelists, each representing a flag - * configuration. The intention is to to drive this selection by - * the use of template metaprogramming for extracting all - * currently defined StateProxy object configurations. - * @todo as the facories live only within the enclosed table (map) - * we could allocate them in-place. Unfortunately this is - * non-trivial, because the stl containers employ - * value semantics and thus do a copy even on insert. - * Thus, for now we use a shared_ptr to hold the factory - * heap allocated. - */ - template< template class Factory - , typename PAR ///< ctor parameter of the Factories - , typename RET ///< common base class of the Factory's products - > - class ConfigSelector - { - - struct FacFunctor - { - virtual ~FacFunctor() {} - virtual RET invoke() =0; - }; - template - struct FactoryHolder : FacFunctor - { - FAC factory_; - FactoryHolder(PAR p) : factory_(p) {} - - virtual RET invoke () { return factory_(); } - }; - - - typedef std::tr1::shared_ptr PFunc; - typedef std::map ConfigTable; - - ConfigTable possibleConfig_; ///< Table of factories - - /** Helper: a visitor usable with FlagInfo */ - struct FactoryTableBuilder - { - PAR ctor_param_; - ConfigTable& factories_; - - FactoryTableBuilder (ConfigTable& tab, PAR p) - : ctor_param_(p), - factories_(tab) { } - - - /* === visitation interface === */ - - typedef void Ret; - - template - void - visit (size_t code) - { - PFunc pFactory (new FactoryHolder > (ctor_param_)); - factories_[code] = pFactory; - } - - void done() {} - }; - - public: - template - ConfigSelector(CONFS const&, PAR factory_ctor_param) - { - FactoryTableBuilder buildTable(this->possibleConfig_, - factory_ctor_param ); - // store a new Factory instance - // for each possible Flag-Configuration - FlagInfo::accept (buildTable); - } - - RET - operator() (size_t configFlags) ///< invoke the factory corresponding to the given config - { - if (contains (possibleConfig_, configFlags)) - return possibleConfig_[configFlags]->invoke(); - else - throw lumiera::error::Invalid("ConfigSelector: No preconfigured factory for config-bits="+lexical_cast(configFlags)); - } - }; - - + using lumiera::typelist::FlagInfo; + + using boost::lexical_cast; + using util::contains; + + + /** + * Helper for fabricating ProcNode Wiring configurations. + * This object builds a table of factories, holding one factory + * for each possible node configuration. Provided with the desired + * configuration encoded as bits, the related factory can be invoked, + * thus producing a product object for the given configuration. + * + * \par implementation notes + * The actual factory class is templated, so it will be defined + * at the use site of ConfigSelector. Moreover, this factory + * usually expects an ctor argument, which will be fed through + * when creating the ConfigSelector instance. This is one of + * the reasons why we go through all these complicated factory + * building: this ctor argument usually brings in a reference + * to the actual memory allocator. Thus we have to rebuild the + * ConfigSelector each time we switch and rebuild the ProcNode + * factories, which in turn happens each time we use a new + * bulk allocation memory block -- typically for each separate + * segment of the Timeline and processing node graph. + * + * Now the selection of the possible flag configurations, for which + * Factory instances are created in the table, is governed by the + * type parameter of the ConfigSelector ctor. This type parameter + * needs to be a Typelist of Typelists, each representing a flag + * configuration. The intention is to to drive this selection by + * the use of template metaprogramming for extracting all + * currently defined StateProxy object configurations. + * @todo as the facories live only within the enclosed table (map) + * we could allocate them in-place. Unfortunately this is + * non-trivial, because the stl containers employ + * value semantics and thus do a copy even on insert. + * Thus, for now we use a shared_ptr to hold the factory + * heap allocated. + */ + template< template class Factory + , typename PAR ///< ctor parameter of the Factories + , typename RET ///< common base class of the Factory's products + > + class ConfigSelector + { + + struct FacFunctor + { + virtual ~FacFunctor() {} + virtual RET invoke() =0; + }; + template + struct FactoryHolder : FacFunctor + { + FAC factory_; + FactoryHolder(PAR p) : factory_(p) {} + + virtual RET invoke () { return factory_(); } + }; + + + typedef std::tr1::shared_ptr PFunc; + typedef std::map ConfigTable; + + ConfigTable possibleConfig_; ///< Table of factories + + /** Helper: a visitor usable with FlagInfo */ + struct FactoryTableBuilder + { + PAR ctor_param_; + ConfigTable& factories_; + + FactoryTableBuilder (ConfigTable& tab, PAR p) + : ctor_param_(p), + factories_(tab) { } + + + /* === visitation interface === */ + + typedef void Ret; + + template + void + visit (size_t code) + { + PFunc pFactory (new FactoryHolder > (ctor_param_)); + factories_[code] = pFactory; + } + + void done() {} + }; + + public: + template + ConfigSelector(CONFS const&, PAR factory_ctor_param) + { + FactoryTableBuilder buildTable(this->possibleConfig_, + factory_ctor_param ); + // store a new Factory instance + // for each possible Flag-Configuration + FlagInfo::accept (buildTable); + } + + RET + operator() (size_t configFlags) ///< invoke the factory corresponding to the given config + { + if (contains (possibleConfig_, configFlags)) + return possibleConfig_[configFlags]->invoke(); + else + throw lumiera::error::Invalid("ConfigSelector: No preconfigured factory for config-bits="+lexical_cast(configFlags)); + } + }; + + + + } // namespace config } // namespace engine #endif diff --git a/tests/common/meta/configflagstest.cpp b/tests/common/meta/configflagstest.cpp index 63ac834d9..cf5660361 100644 --- a/tests/common/meta/configflagstest.cpp +++ b/tests/common/meta/configflagstest.cpp @@ -38,8 +38,11 @@ #include "common/test/run.hpp" +#include "common/meta/util.hpp" #include "common/meta/generator.hpp" #include "common/meta/typelistutil.hpp" +#include "common/meta/configflags.hpp" +#include "meta/typelistdiagnostics.hpp" #include "proc/engine/nodewiringconfig.hpp" #include "common/util.hpp" @@ -69,77 +72,6 @@ namespace lumiera { , NOT_SET = 0 }; - format fmt ("-<%u>%s"); - - struct NullP - { - static string print () { return "-"; } - }; - - /** debugging template, - * printing the "number" used for intantiation on ctor call - */ - template - struct Printer; - - template - struct Printer - : BASE - { - static string print () { return str( fmt % "·" % BASE::print()); } - }; - - template - struct Printer, BASE> - : BASE - { - static string print () { return str( fmt % uint(Fl) % BASE::print()); } - }; - - - - /** call the debug-print for a typelist - * utilizing the Printer template */ - template - string - printSublist () - { - typedef InstantiateChained SubList; - return SubList::print(); - } - - /** Spezialisation for debug-printing of a nested sublist */ - template - struct Printer, BASE> - : BASE - { - static string print () - { - typedef Node List; - return string("\n\t+--") + printSublist()+"+" - + BASE::print(); - } - }; - - template - struct Printer, BASE> - : BASE - { - static string print () - { - typedef typename Config::Flags FlagList; - return string("\n\t+-Conf-[") + printSublist()+"]" - + BASE::print(); - } - }; - - -#define DIAGNOSE(LIST) \ - typedef InstantiateChained Contents_##LIST; - -#define DISPLAY(NAME) \ - DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n"; - /* === Test data === */ @@ -355,7 +287,7 @@ namespace lumiera { typedef Filter::Test> Possible_Configs; DISPLAY (Possible_Configs); - typedef engine::ConfigSelector TestFactorySelector; + typedef engine::config::ConfigSelector TestFactorySelector; const long offset = 1000; // parameter fed to all TestFactory ctors TestFactorySelector testConfigSelector (Possible_Configs::List(), offset); diff --git a/tests/common/meta/typelistdiagnostics.hpp b/tests/common/meta/typelistdiagnostics.hpp new file mode 100644 index 000000000..bccc05ab2 --- /dev/null +++ b/tests/common/meta/typelistdiagnostics.hpp @@ -0,0 +1,140 @@ +/* + TYPELISTDIAGNOSTICS - helper for testing the typelist based utilities + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + +/** @file typelistdiagnostics.hpp + ** a Printer template usable for debugging the structure of a typelist built + ** upon some simple debugging-style types. Examples being a Num template, + ** or the Flag type. A Printer type generated from this template provides + ** a static \c print() function returing a string visualizing the structure + ** of the typelist provided as parameter to the Printer template. + ** + ** @see typelistmaniptest.cpp + ** @see configflagstest.cpp + ** + */ +#ifndef META_TYPELISTDIAGNOSTICS_H +#define META_TYPELISTDIAGNOSTICS_H + + +#include "common/meta/generator.hpp" +//#include "common/meta/typelistutil.hpp" +//#include "common/meta/util.hpp" +//#include "common/util.hpp" + +#include + +using std::string; +using boost::format; + + +namespace lumiera { + namespace typelist { + namespace test { + + + namespace { // internal definitions + + + format fmt ("-<%u>%s"); + + struct NullP + { + static string print () { return "-"; } + }; + + /** debugging template, + * printing the "number" used for intantiation on ctor call + */ + template + struct Printer; + + template + struct Printer + : BASE + { + static string print () { return str( fmt % "·" % BASE::print()); } + }; + + template + struct Printer, BASE> + : BASE + { + static string print () { return str( fmt % uint(Fl) % BASE::print()); } + }; + + + + /** call the debug-print for a typelist + * utilizing the Printer template */ + template + string + printSublist () + { + typedef InstantiateChained SubList; + return SubList::print(); + } + + /** Spezialisation for debug-printing of a nested sublist */ + template + struct Printer, BASE> + : BASE + { + static string print () + { + typedef Node List; + return string("\n\t+--") + printSublist()+"+" + + BASE::print(); + } + }; + + template + struct Printer, BASE> + : BASE + { + static string print () + { + typedef typename Config::Flags FlagList; + return string("\n\t+-Conf-[") + printSublist()+"]" + + BASE::print(); + } + }; + + +#define DIAGNOSE(LIST) \ + typedef InstantiateChained Contents_##LIST; + +#define DISPLAY(NAME) \ + DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n"; + + + + } // (End) internal defs + + + + } // namespace test + + } // namespace typelist + +} // namespace lumiera +#endif From 29e33e4eb4afe8c3b8345e81aaa55df8985f6ba6 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 4 Aug 2008 05:42:55 +0200 Subject: [PATCH 24/80] generating (wiring) configs now considered final --- src/proc/engine/nodefactory.hpp | 6 +- src/proc/engine/nodeinvocation.hpp | 8 +- src/proc/engine/nodeoperation.hpp | 8 +- src/proc/engine/nodewiring.cpp | 51 +++-- src/proc/engine/nodewiring.hpp | 3 +- src/proc/engine/nodewiringconfig.hpp | 4 +- src/proc/engine/procnode.hpp | 9 +- .../builder/applicablebuildertargettypes.hpp | 2 +- src/proc/mobject/builder/operationpoint.hpp | 2 +- tests/50components.tests | 205 +++++++++++++++++- tests/common/meta/configflagstest.cpp | 20 +- tests/common/meta/typelistdiagnostics.hpp | 38 +++- tests/common/meta/typelistmaniptest.cpp | 73 +------ 13 files changed, 308 insertions(+), 121 deletions(-) diff --git a/src/proc/engine/nodefactory.hpp b/src/proc/engine/nodefactory.hpp index 8dbcc5f0c..7abae3340 100644 --- a/src/proc/engine/nodefactory.hpp +++ b/src/proc/engine/nodefactory.hpp @@ -47,7 +47,7 @@ namespace engine { using std::vector; class Trafo; - typedef Trafo* PTrafo; ///< @todo handle ProcNode by pointer or by shared-ptr?? + typedef Trafo* PTrafo; ///< @note ProcNode is handled by pointer and bulk allocated/dealocated /** @@ -55,10 +55,6 @@ namespace engine { */ class NodeFactory { - /** custom deleter func allowing a smart-ptr - * to take ownership of processing nodes - */ - static void deleterFunc (ProcNode* pno) { delete pno; } public: diff --git a/src/proc/engine/nodeinvocation.hpp b/src/proc/engine/nodeinvocation.hpp index 2b5c0afbb..8b350d382 100644 --- a/src/proc/engine/nodeinvocation.hpp +++ b/src/proc/engine/nodeinvocation.hpp @@ -23,8 +23,8 @@ /** @file nodeinvocation.hpp ** Organize the state related to the invocation of s single ProcNode::pull() call ** This header defines part of the "glue" which holds together the render node network - ** and enables to pull a result frames from the nodes. Doing so requires some invocation - ** local state tobe maintained, especially a table of buffers used to carry out the + ** and enables to pull result frames from the nodes. Doing so requires some invocation + ** local state to be maintained, especially a table of buffers used to carry out the ** calculations. Further, getting the input buffers filled requires to issue recursive ** \c pull() calls, which on the whole creates a stack-like assembly of local invocation ** state. @@ -37,7 +37,7 @@ ** ** \par composition of the Invocation State ** For each individual ProcNode#pull() call, the WiringAdapter#callDown() builds an StateAdapter - ** instance directly on the stack, holding the actual buffer pointers and state references. Using this + ** instance directly on the stack, managing the actual buffer pointers and state references. Using this ** StateAdapter, the predecessor nodes are pulled. The way these operations are carried out is encoded ** in the actual StateAdapter type known to the NodeWiring (WiringAdapter) instance. All of these actual ** StateAdapter types are built as implementing the engine::State interface. @@ -196,7 +196,7 @@ namespace engine { { public: ActualInvocationProcess (State& callingProcess, WiringDescriptor const& w, const uint outCh) - : Invocation(callingProcess, w, outCh) + : BufferProvider(callingProcess, w, outCh) { } /** contains the details of Cache query and recursive calls diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp index b413c15bb..b30c6cbeb 100644 --- a/src/proc/engine/nodeoperation.hpp +++ b/src/proc/engine/nodeoperation.hpp @@ -248,10 +248,10 @@ namespace engine { template struct SelectBuffProvider; - template<> struct SelectBuffProvider : AllocBufferFromCache { }; - template<> struct SelectBuffProvider : AllocBufferFromParent{ }; - template<> struct SelectBuffProvider : AllocBufferFromCache { }; - template<> struct SelectBuffProvider<> : AllocBufferFromParent{ }; + template<> struct SelectBuffProvider { typedef AllocBufferFromCache Type; }; + template<> struct SelectBuffProvider { typedef AllocBufferFromParent Type; }; + template<> struct SelectBuffProvider { typedef AllocBufferFromCache Type; }; + template<> struct SelectBuffProvider<> { typedef AllocBufferFromParent Type; }; template diff --git a/src/proc/engine/nodewiring.cpp b/src/proc/engine/nodewiring.cpp index dfbe534f9..6a20f86e4 100644 --- a/src/proc/engine/nodewiring.cpp +++ b/src/proc/engine/nodewiring.cpp @@ -30,15 +30,8 @@ namespace engine { - - namespace { // internal: setting up a factory for each required configuration - - using config::CACHING; - using config::PROCESS; - using config::INPLACE; - - using config::ConfigSelector; - using config::Strategy; + + namespace config { using lumiera::typelist::Flags; using lumiera::typelist::CombineFlags; @@ -49,16 +42,24 @@ namespace engine { typedef Flags::Tuple AllFlags; - + /** build the list of all possible flag combinations */ typedef CombineFlags AllFlagCombinations; - + /** build a configuration type for each of those flag combinations */ typedef Apply AllConfigs; /** filter those configurations which actually define a wiring strategy */ typedef Filter::Test> PossibleConfigs; + } // namespace config + + + + + namespace { // internal: setting up a factory for each required configuration + + using config::ConfigSelector; class Alloc {}; ///////////////TODO @@ -67,7 +68,7 @@ namespace engine { class WiringDescriptorFactory { Alloc& alloc_; - + public: WiringDescriptorFactory(Alloc& a) : alloc_(a) {} @@ -75,20 +76,32 @@ namespace engine { WiringDescriptor& operator() () { - /////////////////////////////////////////////TODO - //return offset_ + Maybe::CODE; + /////////////////////////////////////////////TODO + + typedef config::Strategy Strategy; + typedef typename config::SelectBuffProvider<>::Type BuffProvider; ////////////////////////TODO: how to extract the required flags from CONF?? + typedef ActualInvocationProcess InvocationStateType; + + typedef NodeWiring Product; + + Product * dummy (0); + return *dummy; } }; - typedef ConfigSelector WiringSelector; - + typedef ConfigSelector< WiringDescriptorFactory ///< Factory template + , WiringDescriptor& ///< type of the product + , Alloc& ///< allocator fed to all factories + > WiringSelector; + + struct WiringFactoryImpl { -// WiringSelector selector; + WiringSelector selector; WiringFactoryImpl (Alloc& alloc) -// : selector(PossibleConfigs::List(), alloc) + : selector(config::PossibleConfigs::List(), alloc) { } }; @@ -119,6 +132,6 @@ namespace engine { // return pImpl_->selector(config); } // BlockAlloc > > >::fabricate(); - + } // namespace engine diff --git a/src/proc/engine/nodewiring.hpp b/src/proc/engine/nodewiring.hpp index 2d1e587a4..442ca4297 100644 --- a/src/proc/engine/nodewiring.hpp +++ b/src/proc/engine/nodewiring.hpp @@ -44,8 +44,9 @@ namespace engine { * Actual implementation of the link between nodes, * also acting as "track switch" for the execution path * choosen while operating the node network for rendering. - * @param STATE StateAdapter object controlling the + * @param STATE Invocation state object controlling the * behaviour of callDown() while rendering. + * @see StateAdapter * @see NodeFactory */ template diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index c6df0c0db..0ebefd865 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -99,8 +99,8 @@ namespace engine { * heap allocated. */ template< template class Factory - , typename PAR ///< ctor parameter of the Factories - , typename RET ///< common base class of the Factory's products + , typename RET ///< common base class of the Factory's products + , typename PAR ///< ctor parameter of the Factories > class ConfigSelector { diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp index 13d6e2241..343c6a6e8 100644 --- a/src/proc/engine/procnode.hpp +++ b/src/proc/engine/procnode.hpp @@ -133,13 +133,16 @@ namespace engine { static NodeFactory create; ///////TODO: really? probably we'll rather have a NodeFactory object in the builder... /** Engine Core operation: render and pull output from this node. - * On return, currentProcess will hold onto output buffer(s) - * containing the calculated result frames. + * On return, currentProcess will hold onto output buffer(s) + * containing the calculated result frames. In case this node + * calculates a multi channel output, only one channel can be + * retrieved by such a \c pull() call, but you can expect data + * of the other channels to be processed and fed to cache. * @param currentProcess the current processing state for * managing buffers and accessing current parameter values * @param requiredOutputNr the output channel requested (in case * this node delivers more than one output channel) - * @return ID of the result buffer (accessible via currentProcess) + * @return handle to the buffer containing the calculated result. */ BuffHandle pull (State& currentProcess, uint requiredOutputNr=0) const diff --git a/src/proc/mobject/builder/applicablebuildertargettypes.hpp b/src/proc/mobject/builder/applicablebuildertargettypes.hpp index e51fa1251..b02fb9d45 100644 --- a/src/proc/mobject/builder/applicablebuildertargettypes.hpp +++ b/src/proc/mobject/builder/applicablebuildertargettypes.hpp @@ -55,7 +55,7 @@ namespace mobject { * common selection of types to be handled by any such builder tool. * The actual BuilderTool impl should inherit from this template by * feeding back its type (CRTP), this causes a dispatcher table entry - * be generated for this concrete BuilderTool implementation. + * to be generated for this concrete BuilderTool implementation. */ template struct ApplicableBuilderTargetTypes diff --git a/src/proc/mobject/builder/operationpoint.hpp b/src/proc/mobject/builder/operationpoint.hpp index daa0f18d6..f72d9c711 100644 --- a/src/proc/mobject/builder/operationpoint.hpp +++ b/src/proc/mobject/builder/operationpoint.hpp @@ -54,7 +54,7 @@ namespace mobject { public: /** create node(s) corresponding to the given Processor-Asset * and wire them as a successor to this OperationPoint; then - * move this point to point at the resulting new exit node(s) + * move this point to refer to the resulting new exit node(s) */ void attach (asset::PProc const&); diff --git a/tests/50components.tests b/tests/50components.tests index 2bac409cb..9b15ca3ee 100644 --- a/tests/50components.tests +++ b/tests/50components.tests @@ -50,6 +50,109 @@ out: Standard Cmdlineformat:one two END +TEST "ConfigFlags_test" ConfigFlags_test <- +out: Conf2 :-<2>- +out: Conf3 :-<3>- +out: Conf4 :-<2>-<4>- +out: AllFlags :-<1>-<2>-<3>-<4>- +out: ______ +out: ______ check_flags() +out: Flags1 :-<2>-<4>- +out: Flags2 :-<2>-<4>- +out: SimpleConfig_defined_by_Typelist :-<1>- +out: AnotherConfig_defined_by_Typelist :-<1>-<2>-<3>-<4>- +out: ______ +out: ______ check_instantiation() +out: defined Conf0? ---> 0 +out: defined Conf1? ---> 1 +out: defined Conf2? ---> 1 +out: defined Conf3? ---> 1 +out: defined Conf4? ---> 1 +out: defined Trash? ---> 0 +out: ______ +out: ______ check_filter() +out: SomeFlagsets : +out: +---<1>-<3>-+ +out: +---<2>-<4>-+- +out: Configs_defined_by_Flagsets : +out: +-Conf-[-<1>-<3>-] +out: +-Conf-[-<2>-<4>-]- +out: Filter_possible_Configs : +out: +-Conf-[-<2>-<4>-]- +out: AllFlagCombinations : +out: +---<1>-<2>-<3>-<4>-<·>-+ +out: +---<1>-<2>-<3>-<·>-+ +out: +---<1>-<2>-<4>-<·>-+ +out: +---<1>-<2>-<·>-+ +out: +---<1>-<3>-<4>-<·>-+ +out: +---<1>-<3>-<·>-+ +out: +---<1>-<4>-<·>-+ +out: +---<1>-<·>-+ +out: +---<2>-<3>-<4>-<·>-+ +out: +---<2>-<3>-<·>-+ +out: +---<2>-<4>-<·>-+ +out: +---<2>-<·>-+ +out: +---<3>-<4>-<·>-+ +out: +---<3>-<·>-+ +out: +---<4>-<·>-+ +out: +---<·>-+- +out: ListAllConfigs : +out: +-Conf-[-<1>-<2>-<3>-<4>-] +out: +-Conf-[-<1>-<2>-<3>-] +out: +-Conf-[-<1>-<2>-<4>-] +out: +-Conf-[-<1>-<2>-] +out: +-Conf-[-<1>-<3>-<4>-] +out: +-Conf-[-<1>-<3>-] +out: +-Conf-[-<1>-<4>-] +out: +-Conf-[-<1>-] +out: +-Conf-[-<2>-<3>-<4>-] +out: +-Conf-[-<2>-<3>-] +out: +-Conf-[-<2>-<4>-] +out: +-Conf-[-<2>-] +out: +-Conf-[-<3>-<4>-] +out: +-Conf-[-<3>-] +out: +-Conf-[-<4>-] +out: +-Conf-[-]- +out: Filter_all_possible_Configs : +out: +-Conf-[-<1>-] +out: +-Conf-[-<2>-<3>-] +out: +-Conf-[-<2>-<4>-] +out: +-Conf-[-<2>-] +out: +-Conf-[-<3>-]- +out: ______ +out: ______ check_FlagInfo() +out: Flags1 :-<1>-<3>- +out: max bit : 3 +out: binary code: 10 +out: SomeConfigs : +out: +-Conf-[-<1>-<3>-] +out: +-Conf-[-<2>-<4>-]- +out: max bit in [SomeConfigs] : 4 +out: TestVisitor application: +out: visit(code=10) --> +out: +-Conf-[-<1>-<3>-]- +out: visit(code=20) --> +out: +-Conf-[-<2>-<4>-]- +out: ______ +out: ______ check_ConfigSelector() +out: Possible_Configs : +out: +-Conf-[-<1>-] +out: +-Conf-[-<2>-<3>-] +out: +-Conf-[-<2>-<4>-] +out: +-Conf-[-<2>-] +out: +-Conf-[-<3>-]- +out: Flag-code = 2 ConfigSelector() ---> 1010 +out: Flag-code = 12 ConfigSelector() ---> 1023 +out: Flag-code = 20 ConfigSelector() ---> 1024 +out: Flag-code = 4 ConfigSelector() ---> 1020 +out: Flag-code = 8 ConfigSelector() ---> 1030 +out: LUMIERA_ERROR_INVALID:invalid input or parameters (ConfigSelector: No preconfigured factory for config-bits=23). +return: 0 +END + + TEST "CustomSharedPtr_test" CustomSharedPtr_test < > out: ctor DoIt > out: ctor DoIt > @@ -241,6 +344,106 @@ return: 0 END +TEST "TypeListManipl_test" TypeListManipl_test <-<2>-<3>- +out: List2 :-<5>-<6>-<7>- +out: Added2 :-<3>-<4>-<5>- +out: Append1 :- +out: Append2 :-<11>-<22>- +out: Append3 :-<111>- +out: Append4 :-<222>- +out: Append5 :-<1>-<2>-<3>- +out: Append6 :-<5>-<6>-<7>- +out: Append7 :-<111>-<5>-<6>-<7>- +out: Append8 :-<1>-<2>-<3>-<222>- +out: Append9 :-<1>-<2>-<3>-<5>-<6>-<7>- +out: FilterEven :-<2>-<6>- +out: Prefix1 : +out: +---<11>-<22>-+- +out: Prefix2 : +out: +---<101>-<1>-+ +out: +---<101>-<2>-+ +out: +---<101>-<3>-+- +out: Prefix3 : +out: +---<1>-+ +out: +---<2>-+ +out: +---<3>-+- +out: Prefix4 : +out: +---<111>-<1>-<2>-<3>-+ +out: +---<111>-<0>-+ +out: +---<111>-<5>-<6>-<7>-+- +out: Prefix5 : +out: +---<1>-<2>-<3>-<5>-+ +out: +---<1>-<2>-<3>-<6>-+ +out: +---<1>-<2>-<3>-<7>-+- +out: Prefix6 : +out: +---<1>-<2>-<3>-<1>-<2>-<3>-+ +out: +---<1>-<2>-<3>-<0>-+ +out: +---<1>-<2>-<3>-<5>-<6>-<7>-+- +out: Dist1 : +out: +---<11>-<1>-+ +out: +---<11>-<2>-+ +out: +---<11>-<3>-+- +out: Dist2 : +out: +---<11>-<0>-+ +out: +---<22>-<0>-+ +out: +---<33>-<0>-+- +out: Dist3 : +out: +---<11>-<1>-+ +out: +---<11>-<2>-+ +out: +---<11>-<3>-+ +out: +---<22>-<1>-+ +out: +---<22>-<2>-+ +out: +---<22>-<3>-+ +out: +---<33>-<1>-+ +out: +---<33>-<2>-+ +out: +---<33>-<3>-+- +out: Dist4 : +out: +---<11>-<1>-<2>-<3>-+ +out: +---<11>-<5>-<6>-<7>-+ +out: +---<22>-<1>-<2>-<3>-+ +out: +---<22>-<5>-<6>-<7>-+ +out: +---<33>-<1>-<2>-<3>-+ +out: +---<33>-<5>-<6>-<7>-+- +out: Down :-<11>-<10>-<9>-<8>-<7>-<6>-<5>-<4>-<3>-<2>-<1>-<0>- +out: Combi : +out: +---<1>-<2>-<3>-<·>-+ +out: +---<1>-<2>-<2>-<·>-+ +out: +---<1>-<2>-<1>-<·>-+ +out: +---<1>-<2>-<0>-<·>-+ +out: +---<1>-<1>-<3>-<·>-+ +out: +---<1>-<1>-<2>-<·>-+ +out: +---<1>-<1>-<1>-<·>-+ +out: +---<1>-<1>-<0>-<·>-+ +out: +---<1>-<0>-<3>-<·>-+ +out: +---<1>-<0>-<2>-<·>-+ +out: +---<1>-<0>-<1>-<·>-+ +out: +---<1>-<0>-<0>-<·>-+ +out: +---<0>-<2>-<3>-<·>-+ +out: +---<0>-<2>-<2>-<·>-+ +out: +---<0>-<2>-<1>-<·>-+ +out: +---<0>-<2>-<0>-<·>-+ +out: +---<0>-<1>-<3>-<·>-+ +out: +---<0>-<1>-<2>-<·>-+ +out: +---<0>-<1>-<1>-<·>-+ +out: +---<0>-<1>-<0>-<·>-+ +out: +---<0>-<0>-<3>-<·>-+ +out: +---<0>-<0>-<2>-<·>-+ +out: +---<0>-<0>-<1>-<·>-+ +out: +---<0>-<0>-<0>-<·>-+- +out: OnOff : +out: +---<1>-<2>-<3>-<·>-+ +out: +---<1>-<2>-<·>-+ +out: +---<1>-<3>-<·>-+ +out: +---<1>-<·>-+ +out: +---<2>-<3>-<·>-+ +out: +---<2>-<·>-+ +out: +---<3>-<·>-+ +out: +---<·>-+- +return: 0 +END + + TEST "VisitingTool_test" VisitingTool_test < Flags1; typedef Flags Flags2; @@ -186,7 +186,8 @@ namespace lumiera { << "? ---> " \ << Instantiation::Test::value << "\n"; - cout << "\n==== check_instantiation()\n"; + DELIMITER (check_instantiation()); + CAN_INSTANTIATE (Conf0); CAN_INSTANTIATE (Conf1); CAN_INSTANTIATE (Conf2); @@ -203,7 +204,7 @@ namespace lumiera { */ void check_filter () { - cout << "\n==== check_filter()\n"; + DELIMITER (check_filter()); DISPLAY (SomeFlagsets); @@ -238,7 +239,7 @@ namespace lumiera { void visit (ulong code) { - result += str (format ("visit(code=%u) --> %s\n") + result += str (format ("visit(code=%u) -->%s\n") % code % Printer::print() ); } }; @@ -249,7 +250,7 @@ namespace lumiera { */ void check_FlagInfo() { - cout << "\n==== check_FlagInfo()\n"; + DELIMITER (check_FlagInfo()); DISPLAY (Flags1); cout << "max bit : " << FlagInfo::BITS <<"\n"; @@ -281,13 +282,16 @@ namespace lumiera { */ void check_ConfigSelector() { - cout << "\n==== check_ConfigSelector()\n"; + DELIMITER (check_ConfigSelector()); typedef Apply ListAllConfigs; typedef Filter::Test> Possible_Configs; DISPLAY (Possible_Configs); - typedef engine::config::ConfigSelector TestFactorySelector; + typedef engine::config::ConfigSelector< TestFactory // Factory template + , uint // product type + , long // common ctor argument + > TestFactorySelector; const long offset = 1000; // parameter fed to all TestFactory ctors TestFactorySelector testConfigSelector (Possible_Configs::List(), offset); diff --git a/tests/common/meta/typelistdiagnostics.hpp b/tests/common/meta/typelistdiagnostics.hpp index bccc05ab2..8de0e8d76 100644 --- a/tests/common/meta/typelistdiagnostics.hpp +++ b/tests/common/meta/typelistdiagnostics.hpp @@ -37,6 +37,7 @@ #include "common/meta/generator.hpp" + //#include "common/meta/typelistutil.hpp" //#include "common/meta/util.hpp" //#include "common/util.hpp" @@ -49,11 +50,33 @@ using boost::format; namespace lumiera { namespace typelist { + + /** constant-wrapper type for debugging purposes, + * usable for generating lists of distinguishable types + */ + template + struct Num + { + enum{ VAL=I }; + }; + + + /* some forwards used by configflagstest.cpp */ + template struct Flag; + template< char f1 + , char f2 + , char f3 + , char f4 + , char f5 + > + struct Config; + + + namespace test { - - namespace { // internal definitions + using boost::format; format fmt ("-<%u>%s"); @@ -75,8 +98,15 @@ namespace lumiera { static string print () { return str( fmt % "·" % BASE::print()); } }; + template + struct Printer, BASE> ///< display the presence of a Num instance in the typelist + : BASE + { + static string print () { return str( fmt % uint(Num::VAL) % BASE::print()); } + }; + template - struct Printer, BASE> + struct Printer, BASE> ///< display the presence of a Flag in the typelist : BASE { static string print () { return str( fmt % uint(Fl) % BASE::print()); } @@ -124,7 +154,7 @@ namespace lumiera { typedef InstantiateChained Contents_##LIST; #define DISPLAY(NAME) \ - DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n"; + DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t:" << Contents_##NAME::print() << "\n"; diff --git a/tests/common/meta/typelistmaniptest.cpp b/tests/common/meta/typelistmaniptest.cpp index 9d2321299..f2b86c11e 100644 --- a/tests/common/meta/typelistmaniptest.cpp +++ b/tests/common/meta/typelistmaniptest.cpp @@ -41,6 +41,7 @@ #include "common/test/run.hpp" #include "common/meta/generator.hpp" #include "common/meta/typelistutil.hpp" +#include "meta/typelistdiagnostics.hpp" #include "common/util.hpp" #include @@ -56,65 +57,7 @@ namespace lumiera { namespace test { - namespace { // internal definitions - - boost::format fmt ("<%i>"); - - /** constant-wrapper type for debugging purposes, - * usable for generating lists of distinguishable types - */ - template - struct Num - { - enum{ VAL=I }; - static string str () { return boost::str (fmt % I); } - }; - - - /** debugging template, - * printing the "number" used for intantiation - */ - template - struct Printer; - - template - struct Printer - { - static string print () { return "-"; } - }; - - template - struct Printer, BASE> - : BASE - { - static string print () { return string("-") + Num::str() + BASE::print(); } - }; - - - typedef Printer NullP; - - /** call the debug-print for a typelist - * utilizing the Printer template */ - template - string - printSublist () - { - typedef InstantiateChained SubList; - return SubList::print(); - } - - /** Spezialisation for debug-printing of a nested sublist */ - template - struct Printer, BASE> - : BASE - { - static string print () - { - typedef Node List; - return string("\n\t+--") + printSublist()+"+" - + BASE::print(); - } - }; + namespace { // test data @@ -131,16 +74,10 @@ namespace lumiera { template struct CountDown { typedef NullType List; }; template<> struct CountDown > { typedef Node, NullType> List; }; template struct CountDown > { typedef Node, typename CountDown >::List> List; }; - -#define DIAGNOSE(LIST) \ - typedef InstantiateChained Contents_##LIST; - -#define DISPLAY(NAME) \ - DIAGNOSE(NAME); cout << STRINGIFY(NAME) << "\t" << Contents_##NAME::print() << "\n"; - } // (End) internal defs + } // (End) test data @@ -174,8 +111,8 @@ namespace lumiera { void check_diagnostics () { // Explanation: the DISPLAY macro expands as follows.... - typedef InstantiateChained > Contents_List1; - cout << "List1" << "\t" << Contents_List1::print() << "\n"; + typedef InstantiateChained Contents_List1; + cout << "List1" << "\t:" << Contents_List1::print() << "\n"; // That is: we instantiate the "Printer" template for each of the types in List1, // forming an inheritance chain. I.e. the defined Type "Contents_List1" inherits From 04320ae794132665cb26b401f05d9a084d38bd34 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 4 Aug 2008 12:06:24 +0100 Subject: [PATCH 25/80] Added code to render icons as part of the build process --- Makefile.am | 4 + icons/render-icons.py => admin/render-icon.py | 122 ++++++++++++------ icons/Makefile.am | 53 ++++++++ icons/svg/i-beam.svg | 16 +-- src/gui/Makefile.am | 17 +-- 5 files changed, 153 insertions(+), 59 deletions(-) rename icons/render-icons.py => admin/render-icon.py (53%) create mode 100644 icons/Makefile.am diff --git a/Makefile.am b/Makefile.am index 379d36803..3cf851c55 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,6 @@ # Copyright (C) Lumiera.org # 2007, Christian Thaeter +# 2008, Joel Holdsworth # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -44,6 +45,9 @@ include $(top_srcdir)/src/gui/Makefile.am # plugins #include $(top_srcdir)/src... +# resources +include $(top_srcdir)/icons/Makefile.am + # tests include $(top_srcdir)/tests/common/Makefile.am include $(top_srcdir)/tests/components/Makefile.am diff --git a/icons/render-icons.py b/admin/render-icon.py similarity index 53% rename from icons/render-icons.py rename to admin/render-icon.py index 4ebbd3fc4..9bf4c7dc5 100755 --- a/icons/render-icons.py +++ b/admin/render-icon.py @@ -19,12 +19,16 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +import sys +import getopt from xml.dom import minidom import os import shutil +import cairo +import rsvg -svgDir = "svg" -prerenderedDir = "prerendered" +#svgDir = "svg" +#prerenderedDir = "prerendered" inkscapePath = "/usr/bin/inkscape" artworkLayerPrefix = "artwork:" @@ -63,7 +67,6 @@ def parsePlateLayer( layer ): height = float(node.getAttribute("height")) rectangles.append([x, y, width, height]) return rectangles - def parseSVG( file_path ): print "Rendering " + file_path @@ -82,46 +85,91 @@ def parseSVG( file_path ): return artwork_name, size, parsePlateLayer( plate ) return None -def renderSVGIcons(): - listing = os.listdir(svgDir) - for file_path in listing: - [root, extension] = os.path.splitext(file_path) - if extension.lower() == ".svg": - file_path = os.path.join(svgDir, file_path) - artwork_name, doc_size, rectangles = parseSVG(file_path) - for rectangle in rectangles: - x1 = rectangle[0] - y1 = doc_size[1] - rectangle[1] - rectangle[3] - x2 = x1 + rectangle[2] - y2 = y1 + rectangle[3] - os.spawnlp(os.P_WAIT, inkscapePath, inkscapePath, - file_path, - "-z", - "-a %g:%g:%g:%g" % (x1, y1, x2, y2), - "-w %g" % (rectangle[2]), "-h %g" % (rectangle[3]), - "--export-png=%gx%g/%s.png" % (rectangle[2], rectangle[3], artwork_name)) +def renderSvgInkscape(file_path, out_dir, artwork_name, rectangle, doc_size): -def copyPrerenderedIcons(): - listing = os.listdir(prerenderedDir) - for list_item in listing: - src_dir = os.path.join(prerenderedDir, list_item) - copyMergeDirectory(src_dir, list_item) + # Calculate the rendering rectangle + x1 = rectangle[0] + y1 = doc_size[1] - rectangle[1] - rectangle[3] + x2 = x1 + rectangle[2] + y2 = y1 + rectangle[3] + + # Call Inkscape to do the render + os.spawnlp(os.P_WAIT, inkscapePath, inkscapePath, + file_path, + "-z", + "-a %g:%g:%g:%g" % (x1, y1, x2, y2), + "-w %g" % (rectangle[2]), "-h %g" % (rectangle[3]), + "--export-png=" + os.path.join(out_dir, "%gx%g/%s.png" % (rectangle[2], rectangle[3], artwork_name))) + +def renderSvgRsvg(file_path, out_dir, artwork_name, rectangle, doc_size): + # Prepare a Cairo context + width = int(rectangle[2]) + height = int(rectangle[3]) + + surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height) + context = cairo.Context(surface) + context.translate(-rectangle[0], -rectangle[1]) -def main(): + # Load an render the SVG + svg = rsvg.Handle(file=file_path) + svg.render_cairo(context) + + # Output a PNG file + surface.write_to_png(os.path.join(out_dir, + "%ix%i/%s.png" % (width, height, artwork_name))) + +def renderSvgIcon(file_path, out_dir): + artwork_name, doc_size, rectangles = parseSVG(file_path) + for rectangle in rectangles: + renderSvgRsvg(file_path, out_dir, artwork_name, rectangle, doc_size) + +#def renderSvgIcons(): +# listing = os.listdir(svgDir) +# for file_path in listing: +# [root, extension] = os.path.splitext(file_path) +# if extension.lower() == ".svg": +# renderSvgIcon(os.path.join(svgDir, file_path)) + +#def copyPrerenderedIcons(): +# listing = os.listdir(prerenderedDir) +# for list_item in listing: +# src_dir = os.path.join(prerenderedDir, list_item) +# copyMergeDirectory(src_dir, list_item) + +def printHelp(): + print "render-icon.py - An icon rendering utility script for lumiera" + +def parseArguments(argv): + optlist, args = getopt.getopt(argv, "") + + if len(args) == 2: + return args[0], args[1] + + printHelp() + return None, None + +def main(argv): + in_path, out_dir = parseArguments(argv) + + if in_path == None or out_dir == None: + return + + if os.path.exists(out_dir) == False: + print "Directory not found: " + out_dir + return # Create the icons folders - createDirectory("48x48") - createDirectory("32x32") - createDirectory("24x24") - createDirectory("22x22") - createDirectory("16x16") - - # Render the SVG icons - renderSVGIcons() + createDirectory(os.path.join(out_dir, "48x48")) + createDirectory(os.path.join(out_dir, "32x32")) + createDirectory(os.path.join(out_dir, "24x24")) + createDirectory(os.path.join(out_dir, "22x22")) + createDirectory(os.path.join(out_dir, "16x16")) + renderSvgIcon(in_path, out_dir) + # Copy in prerendered icons - copyPrerenderedIcons() + #copyPrerenderedIcons() if __name__=="__main__": - main() + main(sys.argv[1:]) diff --git a/icons/Makefile.am b/icons/Makefile.am new file mode 100644 index 000000000..d3adca1fa --- /dev/null +++ b/icons/Makefile.am @@ -0,0 +1,53 @@ +# Copyright (C) Lumiera.org +# 2008, Joel Holdsworth +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +svgdir = $(top_srcdir)/icons/svg +prerendereddir = $(top_srcdir)/icons/prerendered +icondir = $(top_builddir) +iconcommand = python $(top_srcdir)/admin/render-icon.py + +16x16 = $(icondir)/16x16 +22x22 = $(icondir)/22x22 +24x24 = $(icondir)/24x24 +32x32 = $(icondir)/32x32 +48x48 = $(icondir)/48x48 + +16x16pre = $(prerendereddir)/16x16 +22x22pre = $(prerendereddir)/22x22 +24x24pre = $(prerendereddir)/24x24 +32x32pre = $(prerendereddir)/32x32 +48x48pre = $(prerendereddir)/48x48 + +lumigui_DEPENDENCIES += \ + $(16x16)/arrow.png $(22x22)/arrow.png $(24x24)/arrow.png $(32x32)/arrow.png $(48x48)/arrow.png \ + $(16x16)/i-beam.png $(22x22)/i-beam.png $(24x24)/i-beam.png $(32x32)/i-beam.png $(48x48)/i-beam.png \ + $(16x16)/assets-panel.png \ + $(16x16)/timeline-panel.png \ + $(16x16)/viewer-panel.png + +$(16x16)/arrow.png $(22x22)/arrow.png $(24x24)/arrow.png $(32x32)/arrow.png $(48x48)/arrow.png : $(svgdir)/arrow.svg + $(iconcommand) $< $(icondir) +$(16x16)/i-beam.png $(22x22)/i-beam.png $(24x24)/i-beam.png $(32x32)/i-beam.png $(48x48)/i-beam.png : $(svgdir)/i-beam.svg + $(iconcommand) $< $(icondir) + +$(16x16)/assets-panel.png: + cp $(16x16pre)/assets-panel.png $(16x16) +$(16x16)/timeline-panel.png: + cp $(16x16pre)/timeline-panel.png $(16x16) +$(16x16)/viewer-panel.png: + cp $(16x16pre)/viewer-panel.png $(16x16) + diff --git a/icons/svg/i-beam.svg b/icons/svg/i-beam.svg index 2f4e82f27..250f087c0 100644 --- a/icons/svg/i-beam.svg +++ b/icons/svg/i-beam.svg @@ -554,9 +554,9 @@ objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="5.6568543" - inkscape:cx="79.400744" - inkscape:cy="54.133354" + inkscape:zoom="32" + inkscape:cx="135.70823" + inkscape:cy="18.300078" inkscape:document-units="px" inkscape:current-layer="layer4" showgrid="true" @@ -565,9 +565,9 @@ inkscape:snap-global="true" showguides="true" inkscape:guide-bbox="true" - inkscape:window-width="1679" - inkscape:window-height="977" - inkscape:window-x="1281" + inkscape:window-width="1670" + inkscape:window-height="973" + inkscape:window-x="1285" inkscape:window-y="48"> Date: Mon, 4 Aug 2008 12:15:42 +0100 Subject: [PATCH 26/80] Temporarily bodged the icon source directory --- src/gui/workspace/actions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/workspace/actions.cpp b/src/gui/workspace/actions.cpp index 64bc6bb07..f3ebcd450 100644 --- a/src/gui/workspace/actions.cpp +++ b/src/gui/workspace/actions.cpp @@ -141,7 +141,7 @@ Actions::add_stock_icon_source(Gtk::IconSet &icon_set, { //This throws an exception if the file is not found: source.set_pixbuf( Gdk::Pixbuf::create_from_file( - Glib::ustring::compose("icons/%1x%1/%2", size, filename) ) ); + Glib::ustring::compose("%1x%1/%2", size, filename) ) ); } catch(const Glib::Exception& ex) { From fdab62a5d8c9045cb4c884fe4b5dc6fdd9347c87 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 4 Aug 2008 12:20:13 +0100 Subject: [PATCH 27/80] Added a separator between tool groups --- src/gui/panels/timeline-panel.cpp | 1 + src/gui/panels/timeline-panel.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gui/panels/timeline-panel.cpp b/src/gui/panels/timeline-panel.cpp index ea46da0a0..905a7b035 100644 --- a/src/gui/panels/timeline-panel.cpp +++ b/src/gui/panels/timeline-panel.cpp @@ -45,6 +45,7 @@ TimelinePanel::TimelinePanel() : &TimelinePanel::on_arrow_tool)); toolbar.append(iBeamTool, mem_fun(this, &TimelinePanel::on_ibeam_tool)); + toolbar.append(seperator1); toolbar.append(zoomIn, mem_fun(this, &TimelinePanel::on_zoom_in)); toolbar.append(zoomOut, mem_fun(this, &TimelinePanel::on_zoom_out)); diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index 06e71ff71..dc228403c 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -64,6 +64,8 @@ private: Gtk::ToggleToolButton arrowTool; Gtk::ToggleToolButton iBeamTool; + Gtk::SeparatorToolItem seperator1; + Gtk::ToolButton zoomIn; Gtk::ToolButton zoomOut; From 2ee6f6be62cfc6858e24bef8cc2df4cb4a2e9cda Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 4 Aug 2008 16:39:36 +0100 Subject: [PATCH 28/80] Tidied and simplified video display widget, and added cursor support to the ibeam and arrow tool --- src/gui/panels/timeline-panel.cpp | 17 ++- src/gui/panels/timeline-panel.hpp | 3 + src/gui/widgets/timeline-widget.cpp | 21 +-- src/gui/widgets/timeline-widget.hpp | 1 + src/gui/widgets/timeline/header-container.cpp | 4 +- src/gui/widgets/timeline/header-container.hpp | 132 ++++++++-------- .../widgets/timeline/timeline-arrow-tool.cpp | 9 +- .../widgets/timeline/timeline-arrow-tool.hpp | 5 +- src/gui/widgets/timeline/timeline-body.cpp | 6 +- .../widgets/timeline/timeline-ibeam-tool.cpp | 10 +- .../widgets/timeline/timeline-ibeam-tool.hpp | 5 +- src/gui/widgets/timeline/timeline-tool.cpp | 23 ++- src/gui/widgets/timeline/timeline-tool.hpp | 18 ++- src/gui/widgets/video-display-widget.cpp | 143 +++++------------- src/gui/widgets/video-display-widget.hpp | 39 +++-- 15 files changed, 217 insertions(+), 219 deletions(-) diff --git a/src/gui/panels/timeline-panel.cpp b/src/gui/panels/timeline-panel.cpp index 905a7b035..b03b4604f 100644 --- a/src/gui/panels/timeline-panel.cpp +++ b/src/gui/panels/timeline-panel.cpp @@ -38,7 +38,8 @@ TimelinePanel::TimelinePanel() : arrowTool(Gtk::StockID("arrow")), iBeamTool(Gtk::StockID("i_beam")), zoomIn(Stock::ZOOM_IN), - zoomOut(Stock::ZOOM_OUT) + zoomOut(Stock::ZOOM_OUT), + updatingToolbar(false) { // Setup the toolbar toolbar.append(arrowTool, mem_fun(this, @@ -63,6 +64,7 @@ TimelinePanel::TimelinePanel() : void TimelinePanel::on_arrow_tool() { + if(updatingToolbar) return; timelineWidget.set_tool(timeline::Arrow); update_tool_buttons(); } @@ -70,6 +72,7 @@ TimelinePanel::on_arrow_tool() void TimelinePanel::on_ibeam_tool() { + if(updatingToolbar) return; timelineWidget.set_tool(timeline::IBeam); update_tool_buttons(); } @@ -77,6 +80,7 @@ TimelinePanel::on_ibeam_tool() void TimelinePanel::on_zoom_in() { + timelineWidget.zoom_view(ZoomToolSteps); update_zoom_buttons(); } @@ -90,17 +94,14 @@ TimelinePanel::on_zoom_out() void TimelinePanel::update_tool_buttons() -{ - // This is included to prevent recursion - static bool updating = false; - - if(!updating) +{ + if(!updatingToolbar) { - updating = true; + updatingToolbar = true; const timeline::ToolType tool = timelineWidget.get_tool(); arrowTool.set_active(tool == timeline::Arrow); iBeamTool.set_active(tool == timeline::IBeam); - updating = false; + updatingToolbar = false; } } diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index dc228403c..01791f91b 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -69,6 +69,9 @@ private: Gtk::ToolButton zoomIn; Gtk::ToolButton zoomOut; + // Internals + bool updatingToolbar; + //----- Constants -----// static const int ZoomToolSteps; }; diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index a56c29672..6b9d83be2 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -177,25 +177,28 @@ TimelineWidget::set_tool(ToolType tool_type) { // Tidy up old tool if(tool != NULL) - { - // Do we need to change tools? - if(tool->get_type() == tool_type) - return; - - delete tool; - } + { + // Do we need to change tools? + //if(tool->get_type() == tool_type) + // return; + + delete tool; + } // Create the new tool switch(tool_type) { case timeline::Arrow: - tool = new timeline::ArrowTool(); + tool = new timeline::ArrowTool(this); break; case timeline::IBeam: - tool = new timeline::IBeamTool(); + tool = new timeline::IBeamTool(this); break; } + + // Apply the cursor if possible + tool->apply_cursor(); } void diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index cc49f7897..e5e90fe92 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -148,6 +148,7 @@ protected: friend class timeline::TimelineBody; friend class timeline::HeaderContainer; + friend class timeline::Tool; }; } // namespace widgets diff --git a/src/gui/widgets/timeline/header-container.cpp b/src/gui/widgets/timeline/header-container.cpp index 5e74da3eb..dfc085fc1 100644 --- a/src/gui/widgets/timeline/header-container.cpp +++ b/src/gui/widgets/timeline/header-container.cpp @@ -39,7 +39,9 @@ HeaderContainer::HeaderContainer(lumiera::gui::widgets::TimelineWidget *timeline { REQUIRE(timeline_widget != NULL); - set_flags(Gtk::NO_WINDOW); // This widget will not have a window at first + // This widget will not have a window at first + set_flags(Gtk::NO_WINDOW); + set_redraw_on_allocate(false); // Connect to the timeline widget's vertical scroll event, diff --git a/src/gui/widgets/timeline/header-container.hpp b/src/gui/widgets/timeline/header-container.hpp index 69d13b953..3a6d43065 100644 --- a/src/gui/widgets/timeline/header-container.hpp +++ b/src/gui/widgets/timeline/header-container.hpp @@ -46,80 +46,80 @@ class Track; * associated with timeline tracks. */ class HeaderContainer : public Gtk::Container - { - public: - /** - * Constructor - * - * @param[in] timeline_widget A pointer to the owner timeline widget - */ - HeaderContainer(lumiera::gui::widgets::TimelineWidget *timeline_widget); - - /** - * Attaches the header all the header widgets of root - * tracks to this control. - * - * @note This must be called when the track list changes - * to synchronise the headers with the timeline body and - * the backend. - */ - void update_headers(); - - /* ===== Overrides ===== */ - private: - void on_realize(); - void on_unrealize(); +{ +public: + /** + * Constructor + * + * @param[in] timeline_widget A pointer to the owner timeline widget + */ + HeaderContainer(lumiera::gui::widgets::TimelineWidget *timeline_widget); - void on_size_allocate (Gtk::Allocation& allocation); - void on_size_request (Gtk::Requisition* requisition); - - void forall_vfunc(gboolean include_internals, GtkCallback callback, - gpointer callback_data); - - /* ===== Events ===== */ - private: - void on_scroll(); + /** + * Attaches the header all the header widgets of root + * tracks to this control. + * + * @note This must be called when the track list changes + * to synchronise the headers with the timeline body and + * the backend. + */ + void update_headers(); + + /* ===== Overrides ===== */ +private: + void on_realize(); + void on_unrealize(); + + void on_size_allocate (Gtk::Allocation& allocation); + void on_size_request (Gtk::Requisition* requisition); - /* ===== Internals ===== */ - private: + void forall_vfunc(gboolean include_internals, GtkCallback callback, + gpointer callback_data); - /** - * Moves all the header widgets to the correct position - * given scroll, stacking etc. - */ - void layout_headers(); + /* ===== Events ===== */ +private: + void on_scroll(); - private: + /* ===== Internals ===== */ +private: + + /** + * Moves all the header widgets to the correct position + * given scroll, stacking etc. + */ + void layout_headers(); - /** - * The owner TimelineWidget of which this class is a helper - */ - lumiera::gui::widgets::TimelineWidget *timelineWidget; +private: - /** - * A structure to represent a header widget and it's - * associated track - */ - struct RootHeader - { - Glib::RefPtr widget; - Track *track; - }; - - /** - * Contains a list of the root currently present on - * the timeline view - */ - std::vector< RootHeader > rootHeaders; + /** + * The owner TimelineWidget of which this class is a helper + */ + lumiera::gui::widgets::TimelineWidget *timelineWidget; - /** - * The widget's window object. - * - * @note This is needed for the sake of clipping when - * widgets are scrolled. - */ - Glib::RefPtr gdkWindow; + /** + * A structure to represent a header widget and it's + * associated track + */ + struct RootHeader + { + Glib::RefPtr widget; + Track *track; }; + + /** + * Contains a list of the root currently present on + * the timeline view + */ + std::vector< RootHeader > rootHeaders; + + /** + * The widget's window object. + * + * @note This is needed for the sake of clipping when + * widgets are scrolled. + */ + Glib::RefPtr gdkWindow; +}; } // namespace timeline } // namespace widgets diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.cpp b/src/gui/widgets/timeline/timeline-arrow-tool.cpp index 28c63e1ee..4e65165f5 100644 --- a/src/gui/widgets/timeline/timeline-arrow-tool.cpp +++ b/src/gui/widgets/timeline/timeline-arrow-tool.cpp @@ -27,7 +27,8 @@ namespace gui { namespace widgets { namespace timeline { -ArrowTool::ArrowTool() +ArrowTool::ArrowTool(TimelineWidget *timeline_widget) : + Tool(timeline_widget) { } @@ -38,6 +39,12 @@ ArrowTool::get_type() const return Arrow; } +Gdk::Cursor +ArrowTool::get_cursor() const +{ + return Gdk::Cursor(Gdk::ARROW); +} + } // namespace timeline } // namespace widgets } // namespace gui diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.hpp b/src/gui/widgets/timeline/timeline-arrow-tool.hpp index edf287767..05f4ef562 100644 --- a/src/gui/widgets/timeline/timeline-arrow-tool.hpp +++ b/src/gui/widgets/timeline/timeline-arrow-tool.hpp @@ -37,9 +37,12 @@ namespace timeline { class ArrowTool : public Tool { public: - ArrowTool(); + ArrowTool(TimelineWidget *timeline_widget); ToolType get_type() const; + +protected: + Gdk::Cursor get_cursor() const; }; } // namespace timeline diff --git a/src/gui/widgets/timeline/timeline-body.cpp b/src/gui/widgets/timeline/timeline-body.cpp index d2e711638..63edb6a1a 100644 --- a/src/gui/widgets/timeline/timeline-body.cpp +++ b/src/gui/widgets/timeline/timeline-body.cpp @@ -61,7 +61,6 @@ TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widge "Track Background", "The background colour of timeline tracks", GDK_TYPE_COLOR, G_PARAM_READABLE)); - } void @@ -69,12 +68,15 @@ TimelineBody::on_realize() { Widget::on_realize(); - // We wish to receive all event notifications + // We wish to receive event notifications add_events( Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK); + + // Apply the cursor if possible + timelineWidget->tool->apply_cursor(); } void diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp index f6c9bf0cc..8225ced80 100644 --- a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp @@ -27,9 +27,9 @@ namespace gui { namespace widgets { namespace timeline { -IBeamTool::IBeamTool() +IBeamTool::IBeamTool(TimelineWidget *timeline_widget) : + Tool(timeline_widget) { - } ToolType @@ -38,6 +38,12 @@ IBeamTool::get_type() const return IBeam; } +Gdk::Cursor +IBeamTool::get_cursor() const +{ + return Gdk::Cursor(Gdk::XTERM); +} + } // namespace timeline } // namespace widgets } // namespace gui diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp index 848c75b60..79eb36c8c 100644 --- a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp @@ -38,9 +38,12 @@ namespace timeline { class IBeamTool : public Tool { public: - IBeamTool(); + IBeamTool(TimelineWidget *timeline_widget); ToolType get_type() const; + +protected: + Gdk::Cursor get_cursor() const; }; } // namespace timeline diff --git a/src/gui/widgets/timeline/timeline-tool.cpp b/src/gui/widgets/timeline/timeline-tool.cpp index e1b8f5c0f..21ceacda7 100644 --- a/src/gui/widgets/timeline/timeline-tool.cpp +++ b/src/gui/widgets/timeline/timeline-tool.cpp @@ -21,15 +21,36 @@ * *****************************************************/ #include "timeline-tool.hpp" +#include "../timeline-widget.hpp" namespace lumiera { namespace gui { namespace widgets { namespace timeline { -Tool::Tool() +Tool::Tool(TimelineWidget *timeline_widget) : + timelineWidget(timeline_widget) { + REQUIRE(timeline_widget != NULL); + REQUIRE(timeline_widget->body != NULL); +} +bool +Tool::apply_cursor() +{ + REQUIRE(timelineWidget != NULL); + + if(timelineWidget->body == NULL) + return false; + + Glib::RefPtr window = + timelineWidget->body->get_window(); + if(!window) + return false; + + window->set_cursor(get_cursor()); + + return true; } } // namespace timeline diff --git a/src/gui/widgets/timeline/timeline-tool.hpp b/src/gui/widgets/timeline/timeline-tool.hpp index 1007aace6..675781747 100644 --- a/src/gui/widgets/timeline/timeline-tool.hpp +++ b/src/gui/widgets/timeline/timeline-tool.hpp @@ -27,11 +27,14 @@ #ifndef TIMELINE_TOOL_HPP #define TIMELINE_TOOL_HPP -#include +#include "../../gtk-lumiera.hpp" namespace lumiera { namespace gui { namespace widgets { + +class TimelineWidget; + namespace timeline { enum ToolType @@ -43,10 +46,19 @@ enum ToolType class Tool { -public: - Tool(); +protected: + Tool(TimelineWidget *timeline_widget); +public: virtual ToolType get_type() const = 0; + + bool apply_cursor(); + +protected: + virtual Gdk::Cursor get_cursor() const = 0; + +protected: + TimelineWidget *timelineWidget; }; diff --git a/src/gui/widgets/video-display-widget.cpp b/src/gui/widgets/video-display-widget.cpp index 39aee4678..fc400cf5d 100644 --- a/src/gui/widgets/video-display-widget.cpp +++ b/src/gui/widgets/video-display-widget.cpp @@ -36,128 +36,67 @@ namespace gui { namespace widgets { VideoDisplayWidget::VideoDisplayWidget() : - gdkWindow(NULL), displayer(NULL) - { - set_flags(Gtk::NO_WINDOW); - } +{ +} VideoDisplayWidget::~VideoDisplayWidget() - { - if(displayer != NULL) - delete displayer; - } +{ + if(displayer != NULL) + delete displayer; +} void VideoDisplayWidget::on_realize() - { - set_flags(Gtk::NO_WINDOW); +{ + // Call base class: + Gtk::Widget::on_realize(); - // Call base class: - Gtk::Widget::on_realize(); + // Set colors + modify_bg(Gtk::STATE_NORMAL, Gdk::Color("black")); - // Create the GdkWindow: - GdkWindowAttr attributes; - memset(&attributes, 0, sizeof(attributes)); + if(displayer != NULL) + delete displayer; + displayer = createDisplayer(this, 320, 240); - Gtk::Allocation allocation = get_allocation(); - - // Set initial position and size of the Gdk::Window: - attributes.x = allocation.get_x(); - attributes.y = allocation.get_y(); - attributes.width = allocation.get_width(); - attributes.height = allocation.get_height(); - - attributes.event_mask = get_events () | Gdk::EXPOSURE_MASK; - attributes.window_type = GDK_WINDOW_CHILD; - attributes.wclass = GDK_INPUT_OUTPUT; - - gdkWindow = Gdk::Window::create(get_window() /* parent */, &attributes, - GDK_WA_X | GDK_WA_Y); - unset_flags(Gtk::NO_WINDOW); - set_window(gdkWindow); - - // Set colors - modify_bg(Gtk::STATE_NORMAL, Gdk::Color("black")); - - // Make the widget receive expose events - gdkWindow->set_user_data(gobj()); - - if(displayer != NULL) - delete displayer; - displayer = createDisplayer(this, 320, 240); - - add_events(Gdk::ALL_EVENTS_MASK); - } - -void -VideoDisplayWidget::on_unrealize() - { - gdkWindow.clear(); - - //Call base class: - Gtk::Widget::on_unrealize(); - } + add_events(Gdk::ALL_EVENTS_MASK); +} bool VideoDisplayWidget::on_button_press_event (GdkEventButton* event) - { - unsigned char buffer[320 * 240 * 4]; +{ + unsigned char buffer[320 * 240 * 4]; - for(int i = 0; i < 320*240*4; i++) - buffer[i] = rand(); + for(int i = 0; i < 320*240*4; i++) + buffer[i] = rand(); - displayer->put((void*)buffer); + displayer->put((void*)buffer); - return true; - } - -bool -VideoDisplayWidget::on_expose_event(GdkEventExpose* event) - { - // This is where we draw on the window - /*Glib::RefPtr window = get_window(); - if(window) - { - Cairo::RefPtr cr = window->create_cairo_context(); - if(event) - { - // clip to the area that needs to be re-exposed so we don't draw any - // more than we need to. - cr->rectangle(event->area.x, event->area.y, - event->area.width, event->area.height); - cr->clip(); - } - - // Paint the background - cr->set_source_rgb(0.0, 0.0, 0.0); - cr->paint(); - }*/ - return true; - } + return true; +} Displayer* VideoDisplayWidget::createDisplayer( Gtk::Widget *drawingArea, int width, int height ) - { - REQUIRE(drawingArea != NULL); - REQUIRE(width > 0 && height > 0); - - Displayer *displayer = NULL; - - displayer = new XvDisplayer( drawingArea, width, height ); - if ( !displayer->usable() ) - { - delete displayer; - displayer = NULL; - } +{ + REQUIRE(drawingArea != NULL); + REQUIRE(width > 0 && height > 0); + + Displayer *displayer = NULL; + + displayer = new XvDisplayer( drawingArea, width, height ); + if ( !displayer->usable() ) + { + delete displayer; + displayer = NULL; + } - if ( displayer == NULL ) - { - displayer = new GdkDisplayer( drawingArea, width, height ); - } + if ( displayer == NULL ) + { + displayer = new GdkDisplayer( drawingArea, width, height ); + } - return displayer; - } + return displayer; +} } // namespace widgets } // namespace gui diff --git a/src/gui/widgets/video-display-widget.hpp b/src/gui/widgets/video-display-widget.hpp index 66e224c18..d525a7297 100644 --- a/src/gui/widgets/video-display-widget.hpp +++ b/src/gui/widgets/video-display-widget.hpp @@ -36,34 +36,29 @@ namespace lumiera { namespace gui { namespace widgets { - class VideoDisplayWidget : public Gtk::Widget - { - public: - VideoDisplayWidget(); +class VideoDisplayWidget : public Gtk::DrawingArea +{ +public: + VideoDisplayWidget(); - ~VideoDisplayWidget(); + ~VideoDisplayWidget(); - /* ===== Overrides ===== */ - private: - virtual void on_realize(); + /* ===== Overrides ===== */ +private: + virtual void on_realize(); - virtual void on_unrealize(); - - virtual bool on_expose_event(GdkEventExpose* event); + // TEST CODE!!!! + virtual bool on_button_press_event (GdkEventButton* event); - // TEST CODE!!!! - virtual bool on_button_press_event (GdkEventButton* event); + /* ===== Internals ===== */ +private: + static Displayer* + createDisplayer( Gtk::Widget *drawingArea, int width, int height ); - /* ===== Internals ===== */ - private: - static Displayer* - createDisplayer( Gtk::Widget *drawingArea, int width, int height ); +private: - private: - Glib::RefPtr gdkWindow; - - Displayer *displayer; - }; + Displayer *displayer; +}; } // namespace widgets } // namespace gui From 45ca590c38535e044de2bfb3ca6814a6152fd07c Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 4 Aug 2008 16:40:38 +0100 Subject: [PATCH 29/80] Reinstated a small efficiency --- src/gui/widgets/timeline-widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index 6b9d83be2..faea874ff 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -179,8 +179,8 @@ TimelineWidget::set_tool(ToolType tool_type) if(tool != NULL) { // Do we need to change tools? - //if(tool->get_type() == tool_type) - // return; + if(tool->get_type() == tool_type) + return; delete tool; } From 07975e520f29a15cea73a03a43a4cab2bf30d800 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 5 Aug 2008 03:46:06 +0200 Subject: [PATCH 30/80] change ConfigSelector to accept arbitrary factory function signatures --- src/common/meta/configflags.hpp | 2 ++ src/proc/engine/nodewiring.cpp | 5 ++-- src/proc/engine/nodewiringconfig.hpp | 38 +++++++++++++-------------- tests/50components.tests | 22 ++++++++-------- tests/common/meta/configflagstest.cpp | 19 ++++++++------ 5 files changed, 46 insertions(+), 40 deletions(-) diff --git a/src/common/meta/configflags.hpp b/src/common/meta/configflags.hpp index 7ffb79a70..fa24bfc97 100644 --- a/src/common/meta/configflags.hpp +++ b/src/common/meta/configflags.hpp @@ -55,6 +55,8 @@ namespace lumiera { namespace typelist { + const size_t CONFIG_FLAGS_MAX = 5; + template struct Flag { typedef Flag ID; }; template<> struct Flag<0> { typedef NullType ID; }; diff --git a/src/proc/engine/nodewiring.cpp b/src/proc/engine/nodewiring.cpp index 6a20f86e4..7d999aa48 100644 --- a/src/proc/engine/nodewiring.cpp +++ b/src/proc/engine/nodewiring.cpp @@ -89,9 +89,10 @@ namespace engine { } }; + typedef WiringDescriptor& (FunctionType)(void); typedef ConfigSelector< WiringDescriptorFactory ///< Factory template - , WiringDescriptor& ///< type of the product + , FunctionType ///< function signature of the Factory , Alloc& ///< allocator fed to all factories > WiringSelector; @@ -129,7 +130,7 @@ namespace engine { // Bits config (FlagInfo::CODE); size_t config = 13; /////////////////////////////////////////TODO -// return pImpl_->selector(config); +// return pImpl_->selector[config](); } // BlockAlloc > > >::fabricate(); diff --git a/src/proc/engine/nodewiringconfig.hpp b/src/proc/engine/nodewiringconfig.hpp index 0ebefd865..aac1ff7a1 100644 --- a/src/proc/engine/nodewiringconfig.hpp +++ b/src/proc/engine/nodewiringconfig.hpp @@ -51,7 +51,8 @@ #include "common/util.hpp" #include "common/meta/configflags.hpp" -#include +#include +#include #include @@ -59,10 +60,10 @@ namespace engine { namespace config { using lumiera::typelist::FlagInfo; - - using boost::lexical_cast; using util::contains; + using lumiera::typelist::CONFIG_FLAGS_MAX; + /** * Helper for fabricating ProcNode Wiring configurations. @@ -99,28 +100,26 @@ namespace engine { * heap allocated. */ template< template class Factory - , typename RET ///< common base class of the Factory's products + , typename FUNC ///< common function type of all Factory instances , typename PAR ///< ctor parameter of the Factories > class ConfigSelector { + typedef boost::function FacFunction; - struct FacFunctor - { - virtual ~FacFunctor() {} - virtual RET invoke() =0; - }; template - struct FactoryHolder : FacFunctor + struct FactoryHolder + : private FAC, + public FacFunction { - FAC factory_; - FactoryHolder(PAR p) : factory_(p) {} - - virtual RET invoke () { return factory_(); } + FactoryHolder(PAR p) + : FAC(p), + FacFunction( static_cast(*this)) + { } }; - typedef std::tr1::shared_ptr PFunc; + typedef std::tr1::shared_ptr PFunc; typedef std::map ConfigTable; ConfigTable possibleConfig_; ///< Table of factories @@ -162,13 +161,14 @@ namespace engine { FlagInfo::accept (buildTable); } - RET - operator() (size_t configFlags) ///< invoke the factory corresponding to the given config + FacFunction& + operator[] (size_t configFlags) ///< retrieve the factory corresponding to the given config { if (contains (possibleConfig_, configFlags)) - return possibleConfig_[configFlags]->invoke(); + return *possibleConfig_[configFlags]; else - throw lumiera::error::Invalid("ConfigSelector: No preconfigured factory for config-bits="+lexical_cast(configFlags)); + throw lumiera::error::Invalid("ConfigSelector: No preconfigured factory for config-bits=" + +std::bitset(configFlags).to_string()); } }; diff --git a/tests/50components.tests b/tests/50components.tests index 9b15ca3ee..90ab37569 100644 --- a/tests/50components.tests +++ b/tests/50components.tests @@ -57,22 +57,22 @@ out: Conf2 :-<2>- out: Conf3 :-<3>- out: Conf4 :-<2>-<4>- out: AllFlags :-<1>-<2>-<3>-<4>- -out: ______ -out: ______ check_flags() +out: __________________________ +out: __________________________ check_flags() out: Flags1 :-<2>-<4>- out: Flags2 :-<2>-<4>- out: SimpleConfig_defined_by_Typelist :-<1>- out: AnotherConfig_defined_by_Typelist :-<1>-<2>-<3>-<4>- -out: ______ -out: ______ check_instantiation() +out: __________________________ +out: __________________________ check_instantiation() out: defined Conf0? ---> 0 out: defined Conf1? ---> 1 out: defined Conf2? ---> 1 out: defined Conf3? ---> 1 out: defined Conf4? ---> 1 out: defined Trash? ---> 0 -out: ______ -out: ______ check_filter() +out: __________________________ +out: __________________________ check_filter() out: SomeFlagsets : out: +---<1>-<3>-+ out: +---<2>-<4>-+- @@ -121,8 +121,8 @@ out: +-Conf-[-<2>-<3>-] out: +-Conf-[-<2>-<4>-] out: +-Conf-[-<2>-] out: +-Conf-[-<3>-]- -out: ______ -out: ______ check_FlagInfo() +out: __________________________ +out: __________________________ check_FlagInfo() out: Flags1 :-<1>-<3>- out: max bit : 3 out: binary code: 10 @@ -135,8 +135,8 @@ out: visit(code=10) --> out: +-Conf-[-<1>-<3>-]- out: visit(code=20) --> out: +-Conf-[-<2>-<4>-]- -out: ______ -out: ______ check_ConfigSelector() +out: __________________________ +out: __________________________ check_ConfigSelector() out: Possible_Configs : out: +-Conf-[-<1>-] out: +-Conf-[-<2>-<3>-] @@ -148,7 +148,7 @@ out: Flag-code = 12 ConfigSelector() ---> 1023 out: Flag-code = 20 ConfigSelector() ---> 1024 out: Flag-code = 4 ConfigSelector() ---> 1020 out: Flag-code = 8 ConfigSelector() ---> 1030 -out: LUMIERA_ERROR_INVALID:invalid input or parameters (ConfigSelector: No preconfigured factory for config-bits=23). +out: LUMIERA_ERROR_INVALID:invalid input or parameters (ConfigSelector: No preconfigured factory for config-bits=10111). return: 0 END diff --git a/tests/common/meta/configflagstest.cpp b/tests/common/meta/configflagstest.cpp index 1d1bad7db..34b54be48 100644 --- a/tests/common/meta/configflagstest.cpp +++ b/tests/common/meta/configflagstest.cpp @@ -112,7 +112,10 @@ namespace lumiera { } // (End) internal defs -#define DELIMITER(TITLE) cout << "______\n______ " << STRINGIFY(TITLE) << "\n"; +#define PRINT_DELIMITER(TITLE) \ + cout << "__________________________\n" \ + "__________________________ " \ + << STRINGIFY(TITLE) << "\n"; @@ -155,7 +158,7 @@ namespace lumiera { /** @test conversion between list-of-flags and a config-type in both directions */ void check_flags () { - DELIMITER (check_flags()); + PRINT_DELIMITER (check_flags()); typedef Config Flags1; typedef Flags Flags2; @@ -186,7 +189,7 @@ namespace lumiera { << "? ---> " \ << Instantiation::Test::value << "\n"; - DELIMITER (check_instantiation()); + PRINT_DELIMITER (check_instantiation()); CAN_INSTANTIATE (Conf0); CAN_INSTANTIATE (Conf1); @@ -204,7 +207,7 @@ namespace lumiera { */ void check_filter () { - DELIMITER (check_filter()); + PRINT_DELIMITER (check_filter()); DISPLAY (SomeFlagsets); @@ -250,7 +253,7 @@ namespace lumiera { */ void check_FlagInfo() { - DELIMITER (check_FlagInfo()); + PRINT_DELIMITER (check_FlagInfo()); DISPLAY (Flags1); cout << "max bit : " << FlagInfo::BITS <<"\n"; @@ -282,14 +285,14 @@ namespace lumiera { */ void check_ConfigSelector() { - DELIMITER (check_ConfigSelector()); + PRINT_DELIMITER (check_ConfigSelector()); typedef Apply ListAllConfigs; typedef Filter::Test> Possible_Configs; DISPLAY (Possible_Configs); typedef engine::config::ConfigSelector< TestFactory // Factory template - , uint // product type + , uint(void) // Factory function type , long // common ctor argument > TestFactorySelector; @@ -300,7 +303,7 @@ namespace lumiera { #define INVOKE_CONFIG_SELECTOR(CODE) \ cout << " Flag-code = " << CODE \ << " ConfigSelector() ---> " \ - << testConfigSelector (CODE) << "\n"; + << testConfigSelector[CODE] () << "\n"; INVOKE_CONFIG_SELECTOR (2); INVOKE_CONFIG_SELECTOR (12); From 8803d86e27cb35b6dcc3d18518d160ba2c53c43e Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 6 Aug 2008 05:29:29 +0200 Subject: [PATCH 31/80] start planning towards how to describe the type of frames and buffers --- wiki/renderengine.html | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/wiki/renderengine.html b/wiki/renderengine.html index c55d698a2..9b194b09a 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -1279,7 +1279,7 @@ For this Lumiera design, we could consider making GOP just another raw media dat &rarr;see in [[Wikipedia|http://en.wikipedia.org/wiki/Group_of_pictures]]
    -
    +
    This wiki page is the entry point to detail notes covering some technical decisions, details and problems encountered in the course of the implementation of the Lumiera Renderengine, the Builder and the related parts.
     
     * [[Packages, Interfaces and Namespaces|InterfaceNamespaces]]
    @@ -1296,6 +1296,8 @@ For this Lumiera design, we could consider making GOP just another raw media dat
     * [[integrating the Config Query system|ConfigQueryIntegration]]
     * [[identifying the basic Builder operations|BasicBuildingOperations]] and [[planning the Implementation|PlanningNodeCreatorTool]]
     * [[how to handle »attached placement«|AttachedPlacementProblem]]
    +* working out the [[basic building situations|BuilderPrimitives]] and [[mechanics of rendering|RenderMechanics]]
    +* how to classify and [[describe media stream types|StreamTypeDescr]]
     
    @@ -3066,6 +3068,32 @@ if (oldText.indexOf("SplashScreen")==-1) * moreover, it contains methods to communicate with other state relevant parts of the system, thereby shielding the rendering code from any complexities of Thread communication if necessary. (thus the name Proxy)
    +
    +
    //how to classify and describe media streams//
    +Media data is understood to appear structured as stream(s) over time. While there may be an inherent internal structuring, at a given perspective ''any stream is a unit and homogeneous''. In the context of digital media data processing, streams are always ''quantized'', which means they appear as a temporal sequence of data chunks called ''frames''.
    +
    +! Terminology
    +* __Media__ is comprised of a set of streams or channels
    +* __Stream__ denotes a homogeneous flow of media data of a single kind
    +* __Channel__ denotes a elementary stream, which can't be further separated in the given context
    +* all of these are delivered and processed in a smallest unit called __Frame__. Each frame corresponds to a //time interval.//
    +* a __Buffer__ is a data structure capable of holding a Frame of media data.
    +* the __~Stream-Type__ describes the kind of media data contained in the stream
    +
    +! Problem of Stream Type Description
    +Media types vary largely and exhibit a large number of different properties, which can't be subsumed under a single classification scheme. But on the other hand, we want to deal with media objects in a uniform and generic manner, because on the large all kinds of media behave somewhat similar. The problem is, these similarities disappear when describing media with logical precision. Thus we are forced into specialized handling and operations for each kind of media, while we want to implement a generic handling concept.
    +
    +! Handling Stream Type Description
    +!! Identification
    +A stream type is denoted by a ~StreamID, which is an identifier, acting as an unique key for accessing information related to the stream type.
    +
    +!! Requirements
    +* set up a buffer and be able to create/retrieve frames of media data.
    +* determine if sources and sinks for media data can be connected, and how.
    +* determine and enumerate the internal structure of a stream.
    +* discover processing facilities
    +
    +
    This design lays great emphasis on separating all those components and subsystems, which are considered not to have a //natural link// of their underlying concepts. This often means putting some additional constraints on the implementation, so basically we need to rely on the actual implementation to live up to this goal. In many cases it may seem to be more natural to "just access the necessary information". But on the long run this coupling of not-directly related components makes the whole codebase monolithic and introduces lots of //accidental complexity.//
     
    
    From 2082f0843b8091e9218e4209010f319d76e02a87 Mon Sep 17 00:00:00 2001
    From: Joel Holdsworth 
    Date: Thu, 7 Aug 2008 20:27:41 +0100
    Subject: [PATCH 32/80] Initial implementation of I-Beam tool. Needs more work
    
    ---
     src/gui/widgets/timeline-widget.cpp           | 108 ++++++++++-------
     src/gui/widgets/timeline-widget.hpp           |  31 ++++-
     .../widgets/timeline/timeline-arrow-tool.cpp  |  22 +++-
     .../widgets/timeline/timeline-arrow-tool.hpp  |   7 +-
     src/gui/widgets/timeline/timeline-body.cpp    | 112 +++++++++++++++++-
     src/gui/widgets/timeline/timeline-body.hpp    |  18 ++-
     .../widgets/timeline/timeline-ibeam-tool.cpp  |  54 ++++++++-
     .../widgets/timeline/timeline-ibeam-tool.hpp  |  14 ++-
     src/gui/widgets/timeline/timeline-ruler.cpp   | 106 +++++++++++------
     src/gui/widgets/timeline/timeline-ruler.hpp   |  35 +++---
     src/gui/widgets/timeline/timeline-tool.cpp    |  35 ++++--
     src/gui/widgets/timeline/timeline-tool.hpp    |  19 +--
     12 files changed, 428 insertions(+), 133 deletions(-)
    
    diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp
    index faea874ff..867595ad3 100644
    --- a/src/gui/widgets/timeline-widget.cpp
    +++ b/src/gui/widgets/timeline-widget.cpp
    @@ -21,8 +21,6 @@
     * *****************************************************/
     
     #include "timeline-widget.hpp"
    -#include "timeline/timeline-arrow-tool.hpp"
    -#include "timeline/timeline-ibeam-tool.hpp"
     
     #include 
     
    @@ -46,14 +44,17 @@ TimelineWidget::TimelineWidget() :
       totalHeight(0),
       horizontalAdjustment(0, 0, 0),
       verticalAdjustment(0, 0, 0),
    +  selectionStart(0),
    +  selectionEnd(0),
       horizontalScroll(horizontalAdjustment),
    -  verticalScroll(verticalAdjustment),
    -  tool(NULL)
    +  verticalScroll(verticalAdjustment)
     {
       body = new TimelineBody(this);
       ENSURE(body != NULL);
       headerContainer = new HeaderContainer(this);
       ENSURE(headerContainer != NULL);
    +  ruler = new TimelineRuler(this);
    +  ENSURE(ruler != NULL);
     
       horizontalAdjustment.signal_value_changed().connect( sigc::mem_fun(
         this, &TimelineWidget::on_scroll) );
    @@ -63,9 +64,10 @@ TimelineWidget::TimelineWidget() :
         this, &TimelineWidget::on_motion_in_body_notify_event) );
       
       set_time_scale(GAVL_TIME_SCALE / 200);
    +  set_selection(2000000, 4000000);
     
       attach(*body, 1, 2, 1, 2, FILL|EXPAND, FILL|EXPAND);
    -  attach(ruler, 1, 2, 0, 1, FILL|EXPAND, SHRINK);
    +  attach(*ruler, 1, 2, 0, 1, FILL|EXPAND, SHRINK);
       attach(*headerContainer, 0, 1, 1, 2, SHRINK, FILL|EXPAND);
       attach(horizontalScroll, 1, 2, 2, 3, FILL|EXPAND, SHRINK);
       attach(verticalScroll, 2, 3, 1, 2, SHRINK, FILL|EXPAND);
    @@ -87,10 +89,10 @@ TimelineWidget::~TimelineWidget()
       REQUIRE(headerContainer != NULL);
       if(headerContainer != NULL)
         headerContainer->unreference();
    -  
    -  REQUIRE(tool != NULL);
    -  if(tool != NULL)
    -    delete tool;
    +    
    +  REQUIRE(ruler != NULL);
    +  if(ruler != NULL)
    +    ruler->unreference();
     }
     
     gavl_time_t
    @@ -102,9 +104,11 @@ TimelineWidget::get_time_offset() const
     void
     TimelineWidget::set_time_offset(gavl_time_t time_offset)
     {
    +  REQUIRE(ruler != NULL);
    +  
       timeOffset = time_offset;
       horizontalAdjustment.set_value(time_offset);
    -  ruler.set_time_offset(time_offset);
    +  ruler->update_view();
     }
     
     int64_t
    @@ -116,11 +120,14 @@ TimelineWidget::get_time_scale() const
     void
     TimelineWidget::set_time_scale(int64_t time_scale)
     {
    +  REQUIRE(ruler != NULL);
    +  
       timeScale = time_scale;
    -  ruler.set_time_scale(time_scale);
       
       const int view_width = body->get_allocation().get_width();
       horizontalAdjustment.set_page_size(timeScale * view_width);
    +  
    +  ruler->update_view();
     }
     
     void
    @@ -163,49 +170,56 @@ TimelineWidget::shift_view(int shift_size)
         shift_size * timeScale * view_width / 16);
     }
     
    +gavl_time_t
    +TimelineWidget::get_selection_start() const
    +{
    +  return selectionStart;
    +}
    +
    +gavl_time_t
    +TimelineWidget::get_selection_end() const
    +{
    +  return selectionEnd;
    +}
    +
    +void
    +TimelineWidget::set_selection(gavl_time_t start, gavl_time_t end)
    +{
    +  if(start < end)
    +    {
    +      selectionStart = start;
    +      selectionEnd = end;
    +    }
    +  else
    +    {
    +      // The selection is back-to-front, flip it round
    +      selectionStart = end;
    +      selectionEnd = start;
    +    }
    +
    +  ruler->queue_draw();
    +  body->queue_draw();
    +}
    +
     ToolType
     TimelineWidget::get_tool() const
     {
    -  REQUIRE(tool != NULL);
    -  if(tool != NULL)
    -    return tool->get_type();
    -  return None;
    +  REQUIRE(body != NULL);
    +  return body->get_tool();
     }
       
     void
     TimelineWidget::set_tool(ToolType tool_type)
     {
    -  // Tidy up old tool
    -  if(tool != NULL)
    -    {
    -      // Do we need to change tools?
    -      if(tool->get_type() == tool_type)
    -        return;
    -        
    -      delete tool;
    -    }
    -  
    -  // Create the new tool
    -  switch(tool_type)
    -    {
    -    case timeline::Arrow:
    -      tool = new timeline::ArrowTool(this);
    -      break;
    -      
    -    case timeline::IBeam:
    -      tool = new timeline::IBeamTool(this);
    -      break;
    -    }
    -    
    -  // Apply the cursor if possible
    -  tool->apply_cursor();
    +  REQUIRE(body != NULL);
    +  body->set_tool(tool_type);
     }
     
     void
     TimelineWidget::on_scroll()
     {
       timeOffset = horizontalAdjustment.get_value();
    -  ruler.set_time_offset(timeOffset);
    +  ruler->update_view();
     }
       
     void
    @@ -216,6 +230,18 @@ TimelineWidget::on_size_allocate(Allocation& allocation)
       update_scroll();
     }
     
    +int
    +TimelineWidget::time_to_x(gavl_time_t time) const
    +{
    +  return (int)((time - timeOffset) / timeScale);
    +}
    +
    +gavl_time_t
    +TimelineWidget::x_to_time(int x) const
    +{
    +  return (gavl_time_t)((int64_t)x * timeScale + timeOffset);
    +}
    +
     void
     TimelineWidget::update_tracks()
     {
    @@ -282,7 +308,7 @@ bool
     TimelineWidget::on_motion_in_body_notify_event(GdkEventMotion *event)
     {
       REQUIRE(event != NULL);
    -  ruler.set_mouse_chevron_offset(event->x);
    +  ruler->set_mouse_chevron_offset(event->x);
       return true;
     }
     
    diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp
    index e5e90fe92..ca6be76ec 100644
    --- a/src/gui/widgets/timeline-widget.hpp
    +++ b/src/gui/widgets/timeline-widget.hpp
    @@ -31,6 +31,8 @@
     #include "timeline/timeline-body.hpp"
     #include "timeline/timeline-ruler.hpp"
     #include "timeline/timeline-tool.hpp"
    +#include "timeline/timeline-arrow-tool.hpp"
    +#include "timeline/timeline-ibeam-tool.hpp"
     #include "timeline/track.hpp"
     
     namespace lumiera {
    @@ -96,18 +98,30 @@ public:
        **/
       void shift_view(int shift_size);
       
    +  gavl_time_t get_selection_start() const;
    +  
    +  gavl_time_t get_selection_end() const;
    +  
    +  void set_selection(gavl_time_t start, gavl_time_t end);
    +  
       timeline::ToolType get_tool() const;
       
       void set_tool(timeline::ToolType tool_type);
    -  
    +    
       /* ===== Events ===== */
     protected:
       void on_scroll();
       
       void on_size_allocate(Gtk::Allocation& allocation);
    +  
    +  /* ===== Utilities ===== */
    +protected:
    +  int time_to_x(gavl_time_t time) const;
    +  
    +  gavl_time_t x_to_time(int x) const;
     
       /* ===== Internals ===== */
    -protected:
    +private:
     
       void update_tracks();
       
    @@ -118,8 +132,14 @@ protected:
       bool on_motion_in_body_notify_event(GdkEventMotion *event);
     
     protected:
    +
    +  // View State
       gavl_time_t timeOffset;
       int64_t timeScale;
    +  
    +  // Selection State
    +  gavl_time_t selectionStart;
    +  gavl_time_t selectionEnd;
     
       int totalHeight;
     
    @@ -129,13 +149,11 @@ protected:
     
       timeline::HeaderContainer *headerContainer;
       timeline::TimelineBody *body;
    -  timeline::TimelineRuler ruler;
    +  timeline::TimelineRuler *ruler;
     
       Gtk::Adjustment horizontalAdjustment, verticalAdjustment;
       Gtk::HScrollbar horizontalScroll;
       Gtk::VScrollbar verticalScroll;
    -  
    -  timeline::Tool *tool;
        
       /* ===== Constants ===== */
     public:
    @@ -148,7 +166,10 @@ protected:
     
       friend class timeline::TimelineBody;
       friend class timeline::HeaderContainer;
    +  friend class timeline::TimelineRuler;
       friend class timeline::Tool;
    +  friend class timeline::ArrowTool;
    +  friend class timeline::IBeamTool;
     };
     
     }   // namespace widgets
    diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.cpp b/src/gui/widgets/timeline/timeline-arrow-tool.cpp
    index 4e65165f5..109d6190e 100644
    --- a/src/gui/widgets/timeline/timeline-arrow-tool.cpp
    +++ b/src/gui/widgets/timeline/timeline-arrow-tool.cpp
    @@ -27,8 +27,8 @@ namespace gui {
     namespace widgets {
     namespace timeline {
     
    -ArrowTool::ArrowTool(TimelineWidget *timeline_widget) :
    -  Tool(timeline_widget)
    +ArrowTool::ArrowTool(TimelineBody *timeline_body) :
    +  Tool(timeline_body)
     {
     
     }
    @@ -45,6 +45,24 @@ ArrowTool::get_cursor() const
       return Gdk::Cursor(Gdk::ARROW);
     }
     
    +void
    +ArrowTool::on_button_press_event(GdkEventButton* event)
    +{
    +  Tool::on_button_press_event(event);
    +}
    +
    +void
    +ArrowTool::on_button_release_event(GdkEventButton* event)
    +{
    +  Tool::on_button_release_event(event);
    +}
    +
    +void
    +ArrowTool::on_motion_notify_event(GdkEventMotion *event)
    +{
    +  Tool::on_motion_notify_event(event);
    +}
    +
     }   // namespace timeline
     }   // namespace widgets
     }   // namespace gui
    diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.hpp b/src/gui/widgets/timeline/timeline-arrow-tool.hpp
    index 05f4ef562..b7bfb6138 100644
    --- a/src/gui/widgets/timeline/timeline-arrow-tool.hpp
    +++ b/src/gui/widgets/timeline/timeline-arrow-tool.hpp
    @@ -37,12 +37,17 @@ namespace timeline {
     class ArrowTool : public Tool
     {
     public:
    -  ArrowTool(TimelineWidget *timeline_widget);
    +  ArrowTool(TimelineBody *timeline_body);
     
       ToolType get_type() const;
       
     protected:
       Gdk::Cursor get_cursor() const;
    +  
    +protected:
    +  void on_button_press_event(GdkEventButton* event);
    +  void on_button_release_event(GdkEventButton* event);
    +  void on_motion_notify_event(GdkEventMotion *event);
     };
     
     }   // namespace timeline
    diff --git a/src/gui/widgets/timeline/timeline-body.cpp b/src/gui/widgets/timeline/timeline-body.cpp
    index 63edb6a1a..50da41348 100644
    --- a/src/gui/widgets/timeline/timeline-body.cpp
    +++ b/src/gui/widgets/timeline/timeline-body.cpp
    @@ -27,6 +27,9 @@
     #include "../timeline-widget.hpp"
     #include "../../window-manager.hpp"
     
    +#include "timeline-arrow-tool.hpp"
    +#include "timeline-ibeam-tool.hpp"
    +
     using namespace Gtk;
     using namespace std;
     using namespace lumiera::gui;
    @@ -38,8 +41,10 @@ namespace gui {
     namespace widgets {
     namespace timeline {
     
    -TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widget) :
    +TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget
    +  *timeline_widget) :
         Glib::ObjectBase("TimelineBody"),
    +    tool(NULL),
         dragType(None),
         mouseDownX(0),
         mouseDownY(0),
    @@ -63,6 +68,51 @@ TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widge
           GDK_TYPE_COLOR, G_PARAM_READABLE));
     }
     
    +TimelineBody::~TimelineBody()
    +{
    +  REQUIRE(tool != NULL);
    +  if(tool != NULL)
    +    delete tool;
    +}
    +
    +ToolType
    +TimelineBody::get_tool() const
    +{
    +  REQUIRE(tool != NULL);
    +  if(tool != NULL)
    +    return tool->get_type();
    +  return lumiera::gui::widgets::timeline::None;
    +}
    +  
    +void
    +TimelineBody::set_tool(timeline::ToolType tool_type)
    +{  
    +  // Tidy up old tool
    +  if(tool != NULL)
    +    {
    +      // Do we need to change tools?
    +      if(tool->get_type() == tool_type)
    +        return;
    +        
    +      delete tool;
    +    }
    +  
    +  // Create the new tool
    +  switch(tool_type)
    +    {
    +    case timeline::Arrow:
    +      tool = new ArrowTool(this);
    +      break;
    +      
    +    case timeline::IBeam:
    +      tool = new IBeamTool(this);
    +      break;
    +    }
    +    
    +  // Apply the cursor if possible
    +  tool->apply_cursor();
    +}
    +
     void
     TimelineBody::on_realize()
     {
    @@ -76,7 +126,7 @@ TimelineBody::on_realize()
         Gdk::BUTTON_RELEASE_MASK);
         
       // Apply the cursor if possible
    -  timelineWidget->tool->apply_cursor();
    +  tool->apply_cursor();
     }
     
     void
    @@ -138,7 +188,12 @@ TimelineBody::on_button_press_event(GdkEventButton* event)
       default:
         dragType = None;
         break;
    -  }  
    +  }
    +  
    +  // Forward the event to the tool
    +  tool->on_button_press_event(event);
    +  
    +  return true;
     }
       
     bool
    @@ -146,11 +201,16 @@ TimelineBody::on_button_release_event(GdkEventButton* event)
     {
       // Terminate any drags
       dragType = None;
    +  
    +  // Forward the event to the tool
    +  tool->on_button_release_event(event);
    +  
    +  return true;
     }
     
     bool
     TimelineBody::on_motion_notify_event(GdkEventMotion *event)
    -{ 
    +{
       REQUIRE(event != NULL);
         
       switch(dragType)
    @@ -168,6 +228,9 @@ TimelineBody::on_motion_notify_event(GdkEventMotion *event)
         }
       }
       
    +  // Forward the event to the tool
    +  tool->on_motion_notify_event(event);
    +  
       // false so that the message is passed up to the owner TimelineWidget
       return false;
     }
    @@ -175,6 +238,8 @@ TimelineBody::on_motion_notify_event(GdkEventMotion *event)
     bool
     TimelineBody::on_expose_event(GdkEventExpose* event)
     {
    +  Cairo::Matrix view_matrix;
    +  
       REQUIRE(event != NULL);
       REQUIRE(timelineWidget != NULL);
       
    @@ -196,6 +261,7 @@ TimelineBody::on_expose_event(GdkEventExpose* event)
       
       // Translate the view by the scroll distance
       cairo->translate(0, -get_vertical_offset());
    +  cairo->get_matrix(view_matrix);
       
       // Interate drawing each track
       BOOST_FOREACH( Track* track, timelineWidget->tracks )
    @@ -217,8 +283,44 @@ TimelineBody::on_expose_event(GdkEventExpose* event)
           
           // Shift for the next track
           cairo->translate(0, height + TimelineWidget::TrackPadding);
    -    }   
    +    }
    +    
    +  //----- Draw the selection -----//
    +  const int start_x = timelineWidget->time_to_x(
    +    timelineWidget->get_selection_start());
    +  const int end_x = timelineWidget->time_to_x(
    +    timelineWidget->get_selection_end());
     
    +  cairo->set_matrix(view_matrix);
    +  
    +  // Draw the cover
    +  if(end_x > 0 && start_x < allocation.get_width())
    +    {
    +      cairo->set_source_rgba(1.0, 0, 0, 0.5);
    +      cairo->rectangle(start_x + 0.5, 0,
    +        end_x - start_x, allocation.get_height());
    +      cairo->fill();
    +    }
    +  
    +  cairo->set_source_rgb(1.0, 0, 0);
    +  cairo->set_line_width(1);
    +  
    +  // Draw the start
    +  if(start_x >= 0 && start_x < allocation.get_width())
    +    {
    +      cairo->move_to(start_x + 0.5, 0);
    +      cairo->line_to(start_x + 0.5, allocation.get_height());
    +      cairo->stroke_preserve();
    +    }
    +    
    +  // Draw the end
    +  if(end_x >= 0 && end_x < allocation.get_width())
    +    {
    +      cairo->move_to(end_x + 0.5, 0);
    +      cairo->line_to(end_x + 0.5, allocation.get_height());
    +      cairo->stroke_preserve();
    +    } 
    +  
       return true;
     }
     
    diff --git a/src/gui/widgets/timeline/timeline-body.hpp b/src/gui/widgets/timeline/timeline-body.hpp
    index 86ce40a47..cebe4d5e1 100644
    --- a/src/gui/widgets/timeline/timeline-body.hpp
    +++ b/src/gui/widgets/timeline/timeline-body.hpp
    @@ -27,6 +27,7 @@
     #define TIMELINE_BODY_HPP
     
     #include "../../gtk-lumiera.hpp"
    +#include "timeline-tool.hpp"
     
     namespace lumiera {
     namespace gui {
    @@ -40,6 +41,12 @@ class TimelineBody : public Gtk::DrawingArea
     {
     public:
       TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widget);
    +  
    +  ~TimelineBody();
    +  
    +  ToolType get_tool() const;
    +  
    +  void set_tool(ToolType tool_type);
     
       /* ===== Events ===== */
     protected:
    @@ -76,15 +83,20 @@ private:
         Shift
       };
       
    -  // UI State Data
    -  DragType dragType;
    +  timeline::Tool *tool;
       double mouseDownX, mouseDownY;
    +  
    +  // Scroll State
    +  DragType dragType;
       gavl_time_t beginShiftTimeOffset;
    -  int beginShiftVerticalOffset;  
    +  int beginShiftVerticalOffset; 
     
       GdkColor background;
       
       lumiera::gui::widgets::TimelineWidget *timelineWidget;
    +
    +  friend class ArrowTool;
    +  friend class IBeamTool;
     };
     
     }   // namespace timeline
    diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp
    index 8225ced80..1940a04b1 100644
    --- a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp
    +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp
    @@ -21,14 +21,15 @@
     * *****************************************************/
     
     #include "timeline-ibeam-tool.hpp"
    +#include "../timeline-widget.hpp"
     
     namespace lumiera {
     namespace gui {
     namespace widgets {
     namespace timeline {
     
    -IBeamTool::IBeamTool(TimelineWidget *timeline_widget) :
    -  Tool(timeline_widget)
    +IBeamTool::IBeamTool(TimelineBody *timeline_body) :
    +  Tool(timeline_body)
     {
     }
     
    @@ -44,6 +45,55 @@ IBeamTool::get_cursor() const
       return Gdk::Cursor(Gdk::XTERM);
     }
     
    +void
    +IBeamTool::on_button_press_event(GdkEventButton* event)
    +{
    +  Tool::on_button_press_event(event);
    +  
    +  REQUIRE(timelineBody != NULL);
    +  lumiera::gui::widgets::TimelineWidget *timeline_widget =
    +    timelineBody->timelineWidget;
    +  REQUIRE(timeline_widget != NULL); 
    +  
    +  if(event->button == 1)
    +  {
    +    drag_start_time = timeline_widget->x_to_time(event->x);
    +    timeline_widget->set_selection(drag_start_time, drag_start_time);
    +  }
    +}
    +
    +void
    +IBeamTool::on_button_release_event(GdkEventButton* event)
    +{
    +  Tool::on_button_release_event(event);
    +    
    +  if(event->button == 1)
    +    set_leading_x(event->x);
    +}
    +
    +void
    +IBeamTool::on_motion_notify_event(GdkEventMotion *event)
    +{
    +  Tool::on_motion_notify_event(event);
    +    
    +  if(isDragging)
    +    set_leading_x(event->x);
    +}
    +
    +void IBeamTool::set_leading_x(const int x)
    +{
    +  REQUIRE(timelineBody != NULL);
    +  lumiera::gui::widgets::TimelineWidget *timeline_widget =
    +    timelineBody->timelineWidget;
    +  REQUIRE(timeline_widget != NULL); 
    +  
    +  const gavl_time_t time = timeline_widget->x_to_time(x);
    +  if(time > drag_start_time)
    +    timeline_widget->set_selection(drag_start_time, time);
    +  else
    +    timeline_widget->set_selection(time, drag_start_time);
    +}
    +
     }   // namespace timeline
     }   // namespace widgets
     }   // namespace gui
    diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp
    index 79eb36c8c..fa0021ce1 100644
    --- a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp
    +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp
    @@ -38,12 +38,24 @@ namespace timeline {
     class IBeamTool : public Tool
     {
     public:
    -  IBeamTool(TimelineWidget *timeline_widget);
    +  IBeamTool(TimelineBody *timeline_body);
     
       ToolType get_type() const;
       
     protected:
       Gdk::Cursor get_cursor() const;
    +  
    +protected:
    +  void on_button_press_event(GdkEventButton* event);
    +  void on_button_release_event(GdkEventButton* event);
    +  void on_motion_notify_event(GdkEventMotion *event);
    +  
    +private:
    +  void set_leading_x(const int x);
    +  
    +protected:
    +  //----- Internals -----//
    +  gavl_time_t drag_start_time;
     };
     
     }   // namespace timeline
    diff --git a/src/gui/widgets/timeline/timeline-ruler.cpp b/src/gui/widgets/timeline/timeline-ruler.cpp
    index 44cf4e307..0b28472b9 100644
    --- a/src/gui/widgets/timeline/timeline-ruler.cpp
    +++ b/src/gui/widgets/timeline/timeline-ruler.cpp
    @@ -23,6 +23,7 @@
     #include 
     
     #include "timeline-ruler.hpp"
    +#include "../timeline-widget.hpp"
     #include "../../window-manager.hpp"
     
     extern "C" {
    @@ -41,39 +42,24 @@ namespace gui {
     namespace widgets {
     namespace timeline {
     
    -TimelineRuler::TimelineRuler() :
    +TimelineRuler::TimelineRuler(
    +  lumiera::gui::widgets::TimelineWidget *timeline_widget) :
       Glib::ObjectBase("TimelineRuler"),
    -  timeOffset(-1),
    -  timeScale(1),
       mouseChevronOffset(0),
       annotationHorzMargin(0),
       annotationVertMargin(0),
       majorTickHeight(0),
       minorLongTickHeight(0),
       minorShortTickHeight(0),
    -  minDivisionWidth(100)
    -{  
    +  minDivisionWidth(100),
    +  timelineWidget(timeline_widget)
    +{
    +  REQUIRE(timelineWidget != NULL);
    +  
       // Install style properties
       register_styles();
     }
     
    -void
    -TimelineRuler::set_time_offset(gavl_time_t time_offset)
    -{ 
    -  timeOffset = time_offset;
    -  rulerImage.clear();
    -  queue_draw();
    -}
    -
    -void
    -TimelineRuler::set_time_scale(int64_t time_scale)
    -{
    -  REQUIRE(time_scale > 0);
    -  timeScale = time_scale;
    -  rulerImage.clear();
    -  queue_draw();
    -}
    -
     void
     TimelineRuler::set_mouse_chevron_offset(int offset)
     {
    @@ -81,6 +67,13 @@ TimelineRuler::set_mouse_chevron_offset(int offset)
       queue_draw();
     }
     
    +void
    +TimelineRuler::update_view()
    +{
    +  rulerImage.clear();
    +  queue_draw();
    +}
    +
     void
     TimelineRuler::on_realize()
     {
    @@ -132,8 +125,9 @@ TimelineRuler::on_expose_event(GdkEventExpose* event)
       cairo->set_source(rulerImage, 0, 0);
       cairo->paint();
       
    -  // Draw the mouse chevron
    +  // Draw the overlays
       draw_mouse_chevron(cairo, allocation);
    +  draw_selection(cairo, allocation);
     
       return true;
     }
    @@ -168,11 +162,15 @@ TimelineRuler::on_size_allocate(Gtk::Allocation& allocation)
     
     void
     TimelineRuler::draw_ruler(Cairo::RefPtr cairo,
    -    Gdk::Rectangle ruler_rect)
    +    const Gdk::Rectangle ruler_rect)
     {
       REQUIRE(cairo);
       REQUIRE(ruler_rect.get_width() > 0);
       REQUIRE(ruler_rect.get_height() > 0);
    +  REQUIRE(timelineWidget != NULL);
    +  
    +  const gavl_time_t left_offset = timelineWidget->timeOffset;
    +  const int64_t time_scale = timelineWidget->timeScale;
       
       // Preparation steps
       const int height = ruler_rect.get_height();
    @@ -187,7 +185,7 @@ TimelineRuler::draw_ruler(Cairo::RefPtr cairo,
       cairo->clip();
       
       // Make sure we don't have impossible zoom
    -  if(timeScale <= 0)
    +  if(time_scale <= 0)
         return;
       
       // Render ruler annotations
    @@ -196,16 +194,16 @@ TimelineRuler::draw_ruler(Cairo::RefPtr cairo,
       const gavl_time_t major_spacing = calculate_major_spacing();
       const gavl_time_t minor_spacing = major_spacing / 10;
       
    -  int64_t time_offset = timeOffset - timeOffset % major_spacing;
    -  if(timeOffset < 0)
    +  int64_t time_offset = left_offset - left_offset % major_spacing;
    +  if(left_offset < 0)
         time_offset -= major_spacing;
         
       int x = 0;
    -  const int64_t x_offset = timeOffset / timeScale;
    +  const int64_t x_offset = left_offset / time_scale;
     
       do
         {    
    -      x = (int)(time_offset / timeScale - x_offset);
    +      x = (int)(time_offset / time_scale - x_offset);
           
           cairo->set_line_width(1);
           
    @@ -241,7 +239,7 @@ TimelineRuler::draw_ruler(Cairo::RefPtr cairo,
     
     void
     TimelineRuler::draw_mouse_chevron(Cairo::RefPtr cairo,
    -    Gdk::Rectangle ruler_rect)
    +    const Gdk::Rectangle ruler_rect)
     {
       REQUIRE(cairo);
       REQUIRE(ruler_rect.get_width() > 0);
    @@ -258,19 +256,55 @@ TimelineRuler::draw_mouse_chevron(Cairo::RefPtr cairo,
       
       cairo->move_to(mouseChevronOffset + 0.5,
         ruler_rect.get_height());
    -  cairo->line_to(mouseChevronOffset + mouseChevronSize + 0.5,
    -    ruler_rect.get_height() - mouseChevronSize);
    -  cairo->line_to(mouseChevronOffset - mouseChevronSize + 0.5,
    -    ruler_rect.get_height() - mouseChevronSize);
    +  cairo->rel_line_to(-mouseChevronSize, -mouseChevronSize);
    +  cairo->rel_line_to(2 * mouseChevronSize, 0);
         
       cairo->fill();
     }
     
    +void
    +TimelineRuler::draw_selection(Cairo::RefPtr cairo,
    +  const Gdk::Rectangle ruler_rect)
    +{
    +  REQUIRE(cairo);
    +  REQUIRE(ruler_rect.get_width() > 0);
    +  REQUIRE(ruler_rect.get_height() > 0);
    +  REQUIRE(timelineWidget != NULL);
    +
    +  Glib::RefPtr