diff --git a/.gitignore b/.gitignore index 5c6dc182c..9cfd32598 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ semantic.cache wiki/backups/* doc/devel/draw/*.png doc/devel/uml/fig128309.png +doc/devel/lumiera.tag m4/* diff --git a/admin/scons/BuilderDoxygen.py b/admin/scons/BuilderDoxygen.py index 7c9514f2c..6c336372b 100644 --- a/admin/scons/BuilderDoxygen.py +++ b/admin/scons/BuilderDoxygen.py @@ -59,30 +59,30 @@ def DoxyfileParse(file_contents): data[key][-1] += token while token: - if token in ['\n']: - if last_token not in ['\\']: - key_token = True - elif token in ['\\']: - pass - elif key_token: - key = token - key_token = False - else: - if token == "+=": - if not data.has_key(key): - data[key] = list() - elif token == "=": - data[key] = list() - else: - append_data( data, key, new_data, token ) - new_data = True - - last_token = token - token = lex.get_token() - - if last_token == '\\' and token != '\n': - new_data = False - append_data( data, key, new_data, '\\' ) + if token in ['\n']: + if last_token not in ['\\']: + key_token = True + elif token in ['\\']: + pass + elif key_token: + key = token + key_token = False + else: + if token == "+=": + if not data.has_key(key): + data[key] = list() + elif token == "=": + data[key] = list() + else: + append_data(data, key, new_data, token) + new_data = True + + last_token = token + token = lex.get_token() + + if last_token == '\\' and token != '\n': + new_data = False + append_data(data, key, new_data, '\\') # compress lists of len 1 into single strings for (k, v) in data.items(): diff --git a/admin/scons/IconSvgRenderer.py b/admin/scons/IconSvgRenderer.py old mode 100755 new mode 100644 diff --git a/doc/SConscript b/doc/SConscript index 60c0964ab..e20bb4eb0 100644 --- a/doc/SConscript +++ b/doc/SConscript @@ -3,7 +3,6 @@ ## SConscript - SCons buildscript for Documentation ## -from Buildhelper import scanSubtree Import('env') diff --git a/doc/devel/Doxyfile b/doc/devel/Doxyfile index 52c2f2d1a..8a3182c79 100644 --- a/doc/devel/Doxyfile +++ b/doc/devel/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.5.6 +# Doxyfile 1.8.1.2 #--------------------------------------------------------------------------- # Project related configuration options @@ -6,7 +6,9 @@ DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = Lumiera PROJECT_NUMBER = 0.1+pre -OUTPUT_DIRECTORY = +PROJECT_BRIEF = +PROJECT_LOGO = draw/rendered/LumiLogo-small.png +OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES @@ -24,63 +26,62 @@ ABBREVIATE_BRIEF = "The $name class" \ the ALWAYS_DETAILED_SEC = YES INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES +FULL_PATH_NAMES = NO STRIP_FROM_PATH = ../../src/ \ ../../tests/ -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = ../../src/ SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = YES INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -OPTIMIZE_FOR_FORTRAN = NO -OPTIMIZE_OUTPUT_VHDL = NO +ALIASES = +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES BUILTIN_STL_SUPPORT = YES -CPP_CLI_SUPPORT = NO -SIP_SUPPORT = NO -IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES -TYPEDEF_HIDES_STRUCT = NO +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = YES +TYPEDEF_HIDES_STRUCT = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = YES +EXTRACT_PACKAGE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = YES +EXTRACT_ANON_NSPACES = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO +HIDE_SCOPE_NAMES = YES SHOW_INCLUDE_FILES = YES +FORCE_LOCAL_INCLUDES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = NO SORT_BRIEF_DOCS = YES +SORT_MEMBERS_CTORS_1ST = YES SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = NO -GENERATE_TESTLIST = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES GENERATE_BUGLIST = NO GENERATE_DEPRECATEDLIST= NO -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 0 SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO SHOW_FILES = YES SHOW_NAMESPACES = YES -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- @@ -88,67 +89,38 @@ QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = NO WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = YES +WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = warnings.txt +WARN_LOGFILE = html/doxygen-warnings.txt #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ../../src/ INPUT_ENCODING = UTF-8 +INPUT = ../../src/ \ + ../../tests \ + ../../admin/scons FILE_PATTERNS = *.c \ *.cc \ - *.cxx \ *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ *.h \ *.hh \ - *.hxx \ *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ *.inc \ - *.m \ - *.mm \ *.dox \ - *.py \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY + *.py RECURSIVE = YES -EXCLUDE = +EXCLUDE = EXCLUDE_SYMLINKS = YES -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- @@ -157,14 +129,14 @@ INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES +REFERENCES_LINK_SOURCE = NO USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 +COLS_IN_ALPHA_INDEX = 1 IGNORE_PREFIX = lumiera:: \ lumiera_ \ lumi_ \ @@ -175,26 +147,27 @@ IGNORE_PREFIX = lumiera:: \ GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 344 +HTML_COLORSTYLE_SAT = 68 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = YES +HTML_DYNAMIC_SECTIONS = YES +HTML_INDEX_NUM_ENTRIES = 100 GENERATE_HTMLHELP = NO -GENERATE_DOCSET = NO -DOCSET_FEEDNAME = "Lumiera Doxygen docs" -DOCSET_BUNDLE_ID = org.doxygen.Project -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -CHM_INDEX_ENCODING = -BINARY_TOC = NO -TOC_EXPAND = NO +GENERATE_ECLIPSEHELP = NO +TOC_EXPAND = YES DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -FORMULA_FONTSIZE = 10 +TREEVIEW_WIDTH = 200 +ENUM_VALUES_PER_LINE = 1 +FORMULA_FONTSIZE = 9 +FORMULA_TRANSPARENT = YES +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -204,80 +177,58 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = YES PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = YES LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- -# configuration options related to the RTF output +# configuration options related to other output formats #--------------------------------------------------------------------------- GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = +TAGFILES = +GENERATE_TAGFILE = lumiera.tag ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES -MSCGEN_PATH = +MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES DOT_FONTNAME = FreeSans -DOT_FONTPATH = +DOT_FONTSIZE = 8 +DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = YES +UML_LIMIT_NUM_FIELDS = 8 TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = NO INCLUDED_BY_GRAPH = NO @@ -285,16 +236,11 @@ CALL_GRAPH = YES CALLER_GRAPH = YES GRAPHICAL_HIERARCHY = NO DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 +DOT_IMAGE_FORMAT = svg +INTERACTIVE_SVG = YES +DOT_GRAPH_MAX_NODES = 80 MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO +DOT_TRANSPARENT = YES DOT_MULTI_TARGETS = YES GENERATE_LEGEND = YES DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/doc/devel/DoxygenLayout.xml b/doc/devel/DoxygenLayout.xml new file mode 100644 index 000000000..60ce05bbe --- /dev/null +++ b/doc/devel/DoxygenLayout.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/devel/draw/LumiLogo.svg b/doc/devel/draw/LumiLogo.svg index a4d60254d..2b52ea366 100644 --- a/doc/devel/draw/LumiLogo.svg +++ b/doc/devel/draw/LumiLogo.svg @@ -1,118 +1,97 @@ + - - - - - - - - + inkscape:export-filename="/Werk/devel/lumi/doc/devel/draw/rendered/LumiLogo.png" + inkscape:export-xdpi="130.048" + inkscape:export-ydpi="130.048"> + Lumiera Video Editor + id="metadata59"> image/svg+xml - Lumiera Logo - 8/2008 + Lumiera Video Editor + + 2009 - Lumiera.org + Lumiera.org project - + Logo of the Lumiera.org project + rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"> + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + rdf:resource="http://creativecommons.org/ns#Distribution" /> + rdf:resource="http://creativecommons.org/ns#Notice" /> + rdf:resource="http://creativecommons.org/ns#Attribution" /> + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> - + + + + + diff --git a/doc/index.txt b/doc/index.txt index 4063cb80b..e0d807089 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -1,5 +1,7 @@ +Documentation +============= -= Documentation = +// Menu : append child 'doxy' This documentation section contains documentation for both users and developers. @@ -32,6 +34,11 @@ moved over to the documentation section(s) of the Lumiera website. -> access the Proc-Layer link:http://lumiera.org/wiki/renderengine.html[TiddlyWiki online here] +=== API Documentation === +We use the link:http://www.doxygen.org/index.html[Doxygen] tool to extract +code comments and generate code level API and reference documentation. + +-> link:http://lumiera.org/doxy/index.html[Doxygen generated documentation] == Media and Presentations == diff --git a/src/backend/engine/scheduler-frontend.hpp b/src/backend/engine/scheduler-frontend.hpp index c0452c681..1b0b23cce 100644 --- a/src/backend/engine/scheduler-frontend.hpp +++ b/src/backend/engine/scheduler-frontend.hpp @@ -44,6 +44,8 @@ namespace engine { * handed over to the scheduler for time-bound or bandwidth-controlled * execution * + * @ingroup engine + * @ingroup scheduler * @todo this is planned to become the frontend * to the render node network, which can be considered * at the lower end of the middle layer; the actual diff --git a/src/backend/resourcecollector.h b/src/backend/resourcecollector.h index 6a90ddb7a..770b6769a 100644 --- a/src/backend/resourcecollector.h +++ b/src/backend/resourcecollector.h @@ -126,13 +126,14 @@ lumiera_resourcecollector_destroy (void); * (to find out about the device) for STORAGE and CACHE resources * @return either returns 1 or calls _exit() * - * @example + * @code * void* data; * size_t size = 1000; * enum lumiera_resource_try iteration = LUMIERA_RESOURCE_ONE; * do { * data = malloc (size); * } while (!data && lumiera_resourcecollector_run (LUMIERA_RESOURCE_MEMORY, &iteration, &size)); + * @endcode */ int lumiera_resourcecollector_run (enum lumiera_resource which, enum lumiera_resource_try* iteration, void* context); diff --git a/src/doxygen.dox b/src/doxygen.dox new file mode 100644 index 000000000..fe06eac9b --- /dev/null +++ b/src/doxygen.dox @@ -0,0 +1,101 @@ +/* + DOXYGEN.dox - font page for the Doxygen API documentation + + + Copyright (C) Lumiera.org + 2013, Hermann Vosseler + 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. + +*/ + + +/** @mainpage Lumiera API Documentation + +This section contains the API and reference documentation +of the Lumiera code base. It is generated automatically from the +source code comments. + +Lumiera Documentation Structure +=============================== +Lumiera comes with extensive documentation, which is organised into several tiers or layers, +according to the target audience, the degree of detail and the level of technicality. +Mostly, the sources of the documentation are kept in-tree; documentation pages are generated +with the *ASCIIDOC* tool and published at the [Lumiera website](http://Lumiera.org/documentation) + +- as a general introduction, you should read the [»outer space« document](http://Lumiera.org/documentation/user/intro/intro.html) +- further user documentation -- mostly tutorials -- is available in the [user section](http://Lumiera.org/documentation/user/) +- Architecture and specification documents can be found in the [design section](http://www.lumiera.org/documentation/design/) +- fundamental discussions and decisions are documented in the form of [RfC entries](http://www.lumiera.org/documentation/devel/design_process.html) +- as entrance to the *technical level*, developers should read the [»inner core«](http://www.lumiera.org/documentation/technical/overview.html) document +- from there, various pages in the [technical documentation](http://www.lumiera.org/documentation/technical) detail specific aspects + of implementation and technology. They treat some topics in a coherent fashion and introduce the concepts and abstractions + necessary to understand the actual code +- right now, you are looking at the **API Documentation**, which is the entrance point to the actual code +- on your exploration path down to the internal details, you might want to follow the overview given + + by the [Layer and Subsystem](modules.html) overview + + the file level comments of relevant interfaces + +*/ + +/* ==== Layers ==== */ + +/** @defgroup backend Backend-Layer +*/ + +/** @defgroup proc Proc-Layer +*/ + +/** @defgroup gui Graphical User Interface +*/ + +/* ==== Subsystems ==== */ + +/** @defgroup asset Asset Management + @ingroup proc +*/ + +/** @defgroup session Session + @ingroup proc +*/ + +/** @defgroup player Playback and Render Control + @ingroup proc +*/ + +/** @defgroup engine Render Engine + @ingroup proc +*/ + +/** @defgroup scheduler Scheduler + @ingroup backend +*/ + + +/* ==== Global Namespaces ==== */ + +/** @namespace lumiera +Lumiera public interface. +Global interfaces and facilities accessible from plugins and scripts. +It's probably a good idea to pull it in explicitly and to avoid nesting +implementation namespaces within \c lumiera:: +*/ + + +/** @namespace lib +Implementation namespace for support and library code. +*/ + diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index 2c2cca44a..b6ce64e44 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -59,7 +59,7 @@ public: /** * Definition of the layout track tree type. */ - typedef lumiera::tree< std::tr1::shared_ptr > TrackTree; + typedef lib::Tree< std::tr1::shared_ptr > TrackTree; public: /** diff --git a/src/include/play-facade.h b/src/include/play-facade.h index 7b281518d..2981c5ea0 100644 --- a/src/include/play-facade.h +++ b/src/include/play-facade.h @@ -64,6 +64,7 @@ namespace lumiera { * Global access point for starting playback and render processes, * calculating media data by running the render engine. * + * @ingroup player * @todo WIP-WIP-WIP 6/2011 * @note Lumiera is not yet able actually to deliver rendered data. * @todo there should be an accompanying CL Interface defined for @@ -90,6 +91,7 @@ namespace lumiera { * through this handle (by ref count). Client code is supposed to use the * API on this handle to navigate and control the playback mode. * + * @ingroup player * @see handle.hpp * @see player-service.cpp implementation */ diff --git a/src/lib/depend.hpp b/src/lib/depend.hpp index 8fbfd77d2..a12c998e5 100644 --- a/src/lib/depend.hpp +++ b/src/lib/depend.hpp @@ -67,8 +67,8 @@ This code is heavily inspired by ** work besides releasing references, and we acknowledge that singletons can be released ** in \em arbitrary order. ** - ** @see Depend - ** @see DependencyFactory + ** @see lib::Depend + ** @see lib::DependencyFactory ** @see lib::test::Depend4Test ** @see singleton-test.cpp ** @see dependency-factory-test.cpp @@ -99,8 +99,6 @@ namespace lib { * To my understanding, the answer is yes. See * [POSIX](http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_10) * @param SI the class of the Singleton instance - * @param Create policy defining how to create/destroy the instance - * @param Life policy defining how to manage Singleton Lifecycle */ template class Depend diff --git a/src/lib/iter-adapter.hpp b/src/lib/iter-adapter.hpp index 0177eab3c..d5e2bfbc7 100644 --- a/src/lib/iter-adapter.hpp +++ b/src/lib/iter-adapter.hpp @@ -617,9 +617,9 @@ namespace lib { /** explicit builder to allow creating a const variant from the basic srcIter type. * Again, the reason necessitating this "backdoor" is that we want to swallow one level - * of indirection. Generally speaking \code const T ** \endcode is not the same as - * \code T * const * \endcode, but in our specific case the API ensures that a - * PtrDerefIter only exposes const elements. + * of indirection. Generally speaking `const T **` is not the same as `T * const *`, + * but in our specific case the API ensures that a `PtrDerefIter` + * only exposes const elements. */ static PtrDerefIter build_by_cast (WrappedIterType const& srcIter) diff --git a/src/lib/lockerror.c b/src/lib/lockerror.c index d115f8d7f..3295eff52 100644 --- a/src/lib/lockerror.c +++ b/src/lib/lockerror.c @@ -17,7 +17,9 @@ 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 "lib/lockerror.h" @@ -29,7 +31,7 @@ LUMIERA_ERROR_DEFINE (LOCK_RELEASE, "unlocking failed"); LUMIERA_ERROR_DEFINE (LOCK_DESTROY, "lock destroy failed"); /* runtime errors */ -LUMIERA_ERROR_DEFINE (LOCK_INVAL, "lock initialization error"); +LUMIERA_ERROR_DEFINE (LOCK_INVAL, "lock initialisation error"); LUMIERA_ERROR_DEFINE (LOCK_BUSY, "already locked"); LUMIERA_ERROR_DEFINE (LOCK_DEADLK, "already locked by this thread"); LUMIERA_ERROR_DEFINE (LOCK_PERM, "not locked by this thread"); diff --git a/src/lib/opaque-holder.hpp b/src/lib/opaque-holder.hpp index 555e49a22..ce0cd6bd1 100644 --- a/src/lib/opaque-holder.hpp +++ b/src/lib/opaque-holder.hpp @@ -196,8 +196,8 @@ namespace lib { * or cleared afterwards, and this #empty() state may be detected * at runtime. In a similar vein, when the stored object has a * \c bool validity check, this can be accessed though #isValid(). - * Moreover \code !empty() && isValid() \endcode may be tested - * as by \bool conversion of the Holder object. The whole compound + * Moreover `!empty() && isValid()` may be tested as by `bool` + * conversion of the Holder object. The whole compound * is copyable if and only if the contained object is copyable. * * @note assertion failure when trying to place an instance not diff --git a/src/lib/ppmpl.h b/src/lib/ppmpl.h index db47b9920..f86d0fe00 100644 --- a/src/lib/ppmpl.h +++ b/src/lib/ppmpl.h @@ -37,18 +37,18 @@ * * This user defined macro shall be undefed after use. * - * @example + * @code * #define PPMPL_FOREACH_P1_FOO(arg) arg, * * {PPMPL_FOREACH(P1, FOO(1), FOO(2), FOO(3)), -1} * * #undef PPMPL_FOREACH_P1_FOO + * @endcode * - * Would expand to the sequence: - * {1, 2, 3, -1} + * This definition would be expanded to the sequence `{1, 2, 3, -1}` * * One can not recursively nest preprocessor macros. To allow this we define PPMPL_FOREACH_L1 - * to PPMPL_FOREACH_L2 with the same semantics as PPMPL_FOREACH, This allowes to nest the + * to PPMPL_FOREACH_L2 with the same semantics as PPMPL_FOREACH, This allows to nest the * FOREACH loop up to three nesting levels. */ #define PPMPL_FOREACH(p, ...) PPMPL_FOREACH0(p, __VA_ARGS__, PPMPL_FOREACH_NIL)) diff --git a/src/lib/query-util.cpp b/src/lib/query-util.cpp index 20dedb0fd..b6fdc6421 100644 --- a/src/lib/query-util.cpp +++ b/src/lib/query-util.cpp @@ -89,8 +89,7 @@ namespace lib { /** (preliminary) helper: instead of really parsing and evaluating the terms, * just do a regular expression match to extract the literal argument * behind the given predicate symbol. e.g calling - * \code extractID ("stream", "id(abc), stream(mpeg)") \endcode - * yields \c "mpeg" + * `extractID ("stream", "id(abc), stream(mpeg)")` yields \c "mpeg" */ string extractID (Symbol sym, const string& termString) diff --git a/src/lib/sync.hpp b/src/lib/sync.hpp index 332817ccf..f80f236bb 100644 --- a/src/lib/sync.hpp +++ b/src/lib/sync.hpp @@ -59,8 +59,8 @@ ** @see mutex.h ** @see sync-locking-test.cpp ** @see sync-waiting-test.cpp - ** @see asset::AssetManager::reg() usage example - ** @see subsystemrunner.hpp usage example + ** @see \ref asset::AssetManager::reg() "usage example: asset registration" + ** @see \ref subsystem-runner.hpp "usage example: subsystem start/shutdown" */ @@ -74,6 +74,7 @@ extern "C" { #include "lib/lockerror.h" } +#include #include #include #include @@ -421,7 +422,11 @@ namespace lib { public: + /*****************************************//** + * scoped object to control the actual locking. + */ class Lock + : boost::noncopyable { Monitor& mon_; diff --git a/src/lib/tree.hpp b/src/lib/tree.hpp index be7ff8e52..204a37072 100644 --- a/src/lib/tree.hpp +++ b/src/lib/tree.hpp @@ -1,48 +1,54 @@ -/* - - $Id: tree.hpp,v 1.151 2008/05/07 15:46:14 peekas Exp $ - - STL-like templated tree class. - Copyright (C) 2001-2006 Kasper Peeters . - Copyright (C) 2009 Joel Holdsworth . - -*/ - /* - The tree.hpp code 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; version 2 or 3. - - 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + TREE.hpp - STL-style tree implementation + + Copyright (C) Lumiera.org + 2001-2006, Kasper Peeters . + 2009, 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. + */ -/** \todo - - New-style move members are not completely finished yet. - - It would be good to have an iterator which can iterate over all - nodes below a given node. Something similar to the leaf iterator - we have right now, but not restricted to the leaves. - - If a range uses const iter_base& as end iterator, things will - inevitably go wrong, because upcast from iter_base to a non-sibling_iter - is incorrect. This upcast should be removed (and then all illegal uses - as previously in 'equal' will be flagged by the compiler). This requires - new copy constructors though. - - There's a bug in replace(sibling_iterator, ...) when the ranges - sit next to each other. Turned up in append_child(iter,iter) - but has been avoided now. - - "std::operator<" does not work correctly on our iterators, and for some - reason a globally defined template operator< did not get picked up. - Using a comparison class now, but this should be investigated. -*/ +/** @file tree.hpp + ** A tree implementation class in STL style. + ** The tree class provides an STL-like container class for n-ary trees, + ** templated over the data stored at the nodes. + ** + ** @todo + ** - New-style move members are not completely finished yet. + ** - It would be good to have an iterator which can iterate over all + ** nodes below a given node. Something similar to the leaf iterator + ** we have right now, but not restricted to the leaves. + ** - If a range uses const iter_base& as end iterator, things will + ** inevitably go wrong, because upcast from iter_base to a non-sibling_iter + ** is incorrect. This upcast should be removed (and then all illegal uses + ** as previously in 'equal' will be flagged by the compiler). This requires + ** new copy constructors though. + ** - There's a bug in `replace(sibling_iterator, ...)` when the ranges + ** sit next to each other. Turned up in append_child(iter,iter) + ** but has been avoided now. + ** - `std::operator<` does not work correctly on our iterators, and for some + ** reason a globally defined template operator< did not get picked up. + ** Using a comparison class now, but this should be investigated. + ** + ** @see timeline-layout-helper.cpp + */ -#ifndef tree_hh_ -#define tree_hh_ + +#ifndef LIB_TREE_HPP +#define LIB_TREE_HPP #include #include @@ -55,7 +61,7 @@ // HP-style construct/destroy have gone from the standard, // so here is a copy. -namespace lumiera { +namespace lib { template void constructor(T1* p, T2& val) @@ -87,7 +93,7 @@ class tree_node_ { // size: 5*4=20 bytes (on 32 bit arch), can be reduced by 8. /** * A STL-like tree implementation class - * @remarks The tree class provides an STL-like container + * @remarks The Tree class provides an STL-like container * class for n-ary trees, templated over the data stored at the * nodes. Various types of iterators are provided (post-order, * pre-order, and others). Where possible the access methods are @@ -95,7 +101,7 @@ class tree_node_ { // size: 5*4=20 bytes (on 32 bit arch), can be reduced by 8. * available. */ template > > -class tree { +class Tree { protected: typedef tree_node_ tree_node; public: @@ -108,12 +114,12 @@ class tree { class sibling_iterator; class leaf_iterator; - tree(); - tree(const T&); - tree(const iterator_base&); - tree(const tree&); - ~tree(); - void operator=(const tree&); + Tree(); + Tree(const T&); + Tree(const iterator_base&); + Tree(const Tree&); + ~Tree(); + void operator=(const Tree&); /// Base class for iterators, only pointers stored, no traversal logic. #ifdef __SGI_STL_PORT @@ -390,8 +396,8 @@ class tree { template bool equal_subtree(const iter& one, const iter& two, BinaryPredicate) const; /// Extract a new tree formed by the range of siblings plus all their children. - tree subtree(sibling_iterator from, sibling_iterator to) const; - void subtree(tree&, sibling_iterator from, sibling_iterator to) const; + Tree subtree(sibling_iterator from, sibling_iterator to) const; + void subtree(Tree&, sibling_iterator from, sibling_iterator to) const; /// Exchange the node (plus subtree) with its sibling node (do nothing if no sibling present). void swap(sibling_iterator it); /// Exchange two nodes (plus subtrees) @@ -428,8 +434,8 @@ class tree { /// Comparator class for iterators (compares pointer values; why doesn't this work automatically?) class iterator_base_less { public: - bool operator()(const typename tree::iterator_base& one, - const typename tree::iterator_base& two) const + bool operator()(const typename Tree::iterator_base& one, + const typename Tree::iterator_base& two) const { return one.node < two.node; } @@ -438,7 +444,7 @@ class tree { private: tree_node_allocator alloc_; void head_initialise_(); - void copy_(const tree& other); + void copy_(const Tree& other); /// Comparator class for two nodes of a tree (used for sorting and searching). template @@ -459,8 +465,8 @@ class tree { //template //class iterator_base_less { // public: -// bool operator()(const typename tree::iterator_base& one, -// const typename tree::iterator_base& two) const +// bool operator()(const typename Tree::iterator_base& one, +// const typename Tree::iterator_base& two) const // { // txtout << "operatorclass<" << one.node < two.node << std::endl; // return one.node < two.node; @@ -468,8 +474,8 @@ class tree { //}; // template -// bool operator<(const typename tree::iterator& one, -// const typename tree::iterator& two) +// bool operator<(const typename Tree::iterator& one, +// const typename Tree::iterator& two) // { // txtout << "operator< " << one.node < two.node << std::endl; // if(one.node < two.node) return true; @@ -477,8 +483,8 @@ class tree { // } // // template -// bool operator==(const typename tree::iterator& one, -// const typename tree::iterator& two) +// bool operator==(const typename Tree::iterator& one, +// const typename Tree::iterator& two) // { // txtout << "operator== " << one.node == two.node << std::endl; // if(one.node == two.node) return true; @@ -486,8 +492,8 @@ class tree { // } // // template -// bool operator>(const typename tree::iterator_base& one, -// const typename tree::iterator_base& two) +// bool operator>(const typename Tree::iterator_base& one, +// const typename Tree::iterator_base& two) // { // txtout << "operator> " << one.node < two.node << std::endl; // if(one.node > two.node) return true; @@ -499,20 +505,20 @@ class tree { // Tree template -tree::tree() +Tree::Tree() { head_initialise_(); } template -tree::tree(const T& x) +Tree::Tree(const T& x) { head_initialise_(); set_head(x); } template -tree::tree(const iterator_base& other) +Tree::Tree(const iterator_base& other) { head_initialise_(); set_head((*other)); @@ -520,7 +526,7 @@ tree::tree(const iterator_base& other) } template -tree::~tree() +Tree::~Tree() { clear(); alloc_.deallocate(head,1); @@ -528,7 +534,7 @@ tree::~tree() } template -void tree::head_initialise_() +void Tree::head_initialise_() { head = alloc_.allocate(1,0); // MSVC does not have default second argument feet = alloc_.allocate(1,0); @@ -547,20 +553,20 @@ void tree::head_initialise_() } template -void tree::operator=(const tree& other) +void Tree::operator=(const Tree& other) { copy_(other); } template -tree::tree(const tree& other) +Tree::Tree(const Tree& other) { head_initialise_(); copy_(other); } template -void tree::copy_(const tree& other) +void Tree::copy_(const Tree& other) { clear(); pre_order_iterator it=other.begin(), to=begin(); @@ -581,7 +587,7 @@ void tree::copy_(const tree& oth } template -void tree::clear() +void Tree::clear() { if(head) while(head->next_sibling!=feet) @@ -589,7 +595,7 @@ void tree::clear() } template -void tree::erase_children(const iterator_base& it) +void Tree::erase_children(const iterator_base& it) { // std::cout << "erase_children " << it.node << std::endl; if(it.node==0) return; @@ -601,7 +607,7 @@ void tree::erase_children(const iterator_base& it) prev=cur; cur=cur->next_sibling; erase_children(pre_order_iterator(prev)); - lumiera::destructor(&prev->data); + lib::destructor(&prev->data); alloc_.deallocate(prev,1); } it.node->first_child=0; @@ -611,7 +617,7 @@ void tree::erase_children(const iterator_base& it) template template -iter tree::erase(iter it) +iter Tree::erase(iter it) { tree_node *cur=it.node; assert(cur!=head); @@ -632,37 +638,37 @@ iter tree::erase(iter it) cur->next_sibling->prev_sibling=cur->prev_sibling; } - lumiera::destructor(&cur->data); + lib::destructor(&cur->data); alloc_.deallocate(cur,1); return ret; } template -typename tree::pre_order_iterator tree::begin() const +typename Tree::pre_order_iterator Tree::begin() const { return pre_order_iterator(head->next_sibling); } template -typename tree::pre_order_iterator tree::end() const +typename Tree::pre_order_iterator Tree::end() const { return pre_order_iterator(feet); } template -typename tree::breadth_first_queued_iterator tree::begin_breadth_first() const +typename Tree::breadth_first_queued_iterator Tree::begin_breadth_first() const { return breadth_first_queued_iterator(head->next_sibling); } template -typename tree::breadth_first_queued_iterator tree::end_breadth_first() const +typename Tree::breadth_first_queued_iterator Tree::end_breadth_first() const { return breadth_first_queued_iterator(); } template -typename tree::post_order_iterator tree::begin_post() const +typename Tree::post_order_iterator Tree::begin_post() const { tree_node *tmp=head->next_sibling; if(tmp!=feet) { @@ -673,15 +679,15 @@ typename tree::post_order_iterator tree -typename tree::post_order_iterator tree::end_post() const +typename Tree::post_order_iterator Tree::end_post() const { return post_order_iterator(feet); } template -typename tree::fixed_depth_iterator tree::begin_fixed(const iterator_base& pos, unsigned int dp) const +typename Tree::fixed_depth_iterator Tree::begin_fixed(const iterator_base& pos, unsigned int dp) const { - typename tree::fixed_depth_iterator ret; + typename Tree::fixed_depth_iterator ret; ret.top_node=pos.node; tree_node *tmp=pos.node; @@ -710,7 +716,7 @@ typename tree::fixed_depth_iterator tree -typename tree::fixed_depth_iterator tree::end_fixed(const iterator_base& pos, unsigned int dp) const +typename Tree::fixed_depth_iterator Tree::end_fixed(const iterator_base& pos, unsigned int dp) const { assert(1==0); // FIXME: not correct yet: use is_valid() as a temporary workaround tree_node *tmp=pos.node; @@ -728,7 +734,7 @@ typename tree::fixed_depth_iterator tree -typename tree::sibling_iterator tree::begin(const iterator_base& pos) const +typename Tree::sibling_iterator Tree::begin(const iterator_base& pos) const { assert(pos.node!=0); if(pos.node->first_child==0) { @@ -738,7 +744,7 @@ typename tree::sibling_iterator tree -typename tree::sibling_iterator tree::end(const iterator_base& pos) const +typename Tree::sibling_iterator Tree::end(const iterator_base& pos) const { sibling_iterator ret(0); ret.parent_=pos.node; @@ -746,7 +752,7 @@ typename tree::sibling_iterator tree -typename tree::leaf_iterator tree::begin_leaf() const +typename Tree::leaf_iterator Tree::begin_leaf() const { tree_node *tmp=head->next_sibling; if(tmp!=feet) { @@ -757,13 +763,13 @@ typename tree::leaf_iterator tree -typename tree::leaf_iterator tree::end_leaf() const +typename Tree::leaf_iterator Tree::end_leaf() const { return leaf_iterator(feet); } template -typename tree::leaf_iterator tree::begin_leaf(const iterator_base& top) const +typename Tree::leaf_iterator Tree::begin_leaf(const iterator_base& top) const { tree_node *tmp=top.node; while(tmp->first_child) @@ -772,14 +778,14 @@ typename tree::leaf_iterator tree -typename tree::leaf_iterator tree::end_leaf(const iterator_base& top) const +typename Tree::leaf_iterator Tree::end_leaf(const iterator_base& top) const { return leaf_iterator(top.node, top.node); } template template -iter tree::parent(iter position) +iter Tree::parent(iter position) { assert(position.node!=0); return iter(position.node->parent); @@ -787,7 +793,7 @@ iter tree::parent(iter position) template template -iter tree::previous_sibling(iter position) const +iter Tree::previous_sibling(iter position) const { assert(position.node!=0); iter ret(position); @@ -797,7 +803,7 @@ iter tree::previous_sibling(iter position) const template template -iter tree::next_sibling(iter position) const +iter Tree::next_sibling(iter position) const { assert(position.node!=0); iter ret(position); @@ -807,11 +813,11 @@ iter tree::next_sibling(iter position) const template template -iter tree::next_at_same_depth(iter position) const +iter Tree::next_at_same_depth(iter position) const { // We make use of a temporary fixed_depth iterator to implement this. - typename tree::fixed_depth_iterator tmp(position.node); + typename Tree::fixed_depth_iterator tmp(position.node); ++tmp; return iter(tmp); @@ -852,13 +858,13 @@ iter tree::next_at_same_depth(iter position) const template template -iter tree::append_child(iter position) +iter Tree::append_child(iter position) { assert(position.node!=head); assert(position.node); tree_node *tmp=alloc_.allocate(1,0); - lumiera::constructor(&tmp->data); + lib::constructor(&tmp->data); tmp->first_child=0; tmp->last_child=0; @@ -877,13 +883,13 @@ iter tree::append_child(iter position) template template -iter tree::prepend_child(iter position) +iter Tree::prepend_child(iter position) { assert(position.node!=head); assert(position.node); tree_node *tmp=alloc_.allocate(1,0); - lumiera::constructor(&tmp->data); + lib::constructor(&tmp->data); tmp->first_child=0; tmp->last_child=0; @@ -902,7 +908,7 @@ iter tree::prepend_child(iter position) template template -iter tree::append_child(iter position, const T& x) +iter Tree::append_child(iter position, const T& x) { // If your program fails here you probably used 'append_child' to add the top // node to an empty tree. From version 1.45 the top element should be added @@ -912,7 +918,7 @@ iter tree::append_child(iter position, const T& x) assert(position.node); tree_node* tmp = alloc_.allocate(1,0); - lumiera::constructor(&tmp->data, x); + lib::constructor(&tmp->data, x); tmp->first_child=0; tmp->last_child=0; @@ -931,13 +937,13 @@ iter tree::append_child(iter position, const T& x) template template -iter tree::prepend_child(iter position, const T& x) +iter Tree::prepend_child(iter position, const T& x) { assert(position.node!=head); assert(position.node); tree_node* tmp = alloc_.allocate(1,0); - lumiera::constructor(&tmp->data, x); + lib::constructor(&tmp->data, x); tmp->first_child=0; tmp->last_child=0; @@ -956,7 +962,7 @@ iter tree::prepend_child(iter position, const T& x) template template -iter tree::append_child(iter position, iter other) +iter Tree::append_child(iter position, iter other) { assert(position.node!=head); assert(position.node); @@ -967,7 +973,7 @@ iter tree::append_child(iter position, iter other) template template -iter tree::prepend_child(iter position, iter other) +iter Tree::prepend_child(iter position, iter other) { assert(position.node!=head); assert(position.node); @@ -978,7 +984,7 @@ iter tree::prepend_child(iter position, iter other) template template -iter tree::append_children(iter position, sibling_iterator from, sibling_iterator to) +iter Tree::append_children(iter position, sibling_iterator from, sibling_iterator to) { assert(position.node!=head); assert(position.node); @@ -994,7 +1000,7 @@ iter tree::append_children(iter position, sibling_iterat template template -iter tree::prepend_children(iter position, sibling_iterator from, sibling_iterator to) +iter Tree::prepend_children(iter position, sibling_iterator from, sibling_iterator to) { assert(position.node!=head); assert(position.node); @@ -1009,7 +1015,7 @@ iter tree::prepend_children(iter position, sibling_itera } template -typename tree::pre_order_iterator tree::set_head(const T& x) +typename Tree::pre_order_iterator Tree::set_head(const T& x) { assert(head->next_sibling==feet); return insert(iterator(feet), x); @@ -1017,14 +1023,14 @@ typename tree::pre_order_iterator tree template -iter tree::insert(iter position, const T& x) +iter Tree::insert(iter position, const T& x) { if(position.node==0) { position.node=feet; // Backward compatibility: when calling insert on a null node, // insert before the feet. } tree_node* tmp = alloc_.allocate(1,0); - lumiera::constructor(&tmp->data, x); + lib::constructor(&tmp->data, x); tmp->first_child=0; tmp->last_child=0; @@ -1043,10 +1049,10 @@ iter tree::insert(iter position, const T& x) } template -typename tree::sibling_iterator tree::insert(sibling_iterator position, const T& x) +typename Tree::sibling_iterator Tree::insert(sibling_iterator position, const T& x) { tree_node* tmp = alloc_.allocate(1,0); - lumiera::constructor(&tmp->data, x); + lib::constructor(&tmp->data, x); tmp->first_child=0; tmp->last_child=0; @@ -1073,10 +1079,10 @@ typename tree::sibling_iterator tree template -iter tree::insert_after(iter position, const T& x) +iter Tree::insert_after(iter position, const T& x) { tree_node* tmp = alloc_.allocate(1,0); - lumiera::constructor(&tmp->data, x); + lib::constructor(&tmp->data, x); tmp->first_child=0; tmp->last_child=0; @@ -1097,7 +1103,7 @@ iter tree::insert_after(iter position, const T& x) template template -iter tree::insert_subtree(iter position, const iterator_base& subtree) +iter Tree::insert_subtree(iter position, const iterator_base& subtree) { // insert dummy iter it=insert(position, value_type()); @@ -1107,7 +1113,7 @@ iter tree::insert_subtree(iter position, const iterator_ template template -iter tree::insert_subtree_after(iter position, const iterator_base& subtree) +iter Tree::insert_subtree_after(iter position, const iterator_base& subtree) { // insert dummy iter it=insert_after(position, value_type()); @@ -1117,7 +1123,7 @@ iter tree::insert_subtree_after(iter position, const ite // template // template -// iter tree::insert_subtree(sibling_iterator position, iter subtree) +// iter Tree::insert_subtree(sibling_iterator position, iter subtree) // { // // insert dummy // iter it(insert(position, value_type())); @@ -1127,16 +1133,16 @@ iter tree::insert_subtree_after(iter position, const ite template template -iter tree::replace(iter position, const T& x) +iter Tree::replace(iter position, const T& x) { - lumiera::destructor(&position.node->data); - lumiera::constructor(&position.node->data, x); + lib::destructor(&position.node->data); + lib::constructor(&position.node->data, x); return position; } template template -iter tree::replace(iter position, const iterator_base& from) +iter Tree::replace(iter position, const iterator_base& from) { assert(position.node!=head); tree_node *current_from=from.node; @@ -1148,7 +1154,7 @@ iter tree::replace(iter position, const iterator_base& f erase_children(position); // std::cout << "no warning!" << std::endl; tree_node* tmp = alloc_.allocate(1,0); - lumiera::constructor(&tmp->data, (*from)); + lib::constructor(&tmp->data, (*from)); tmp->first_child=0; tmp->last_child=0; if(current_to->prev_sibling==0) { @@ -1168,7 +1174,7 @@ iter tree::replace(iter position, const iterator_base& f } tmp->next_sibling=current_to->next_sibling; tmp->parent=current_to->parent; - lumiera::destructor(¤t_to->data); + lib::destructor(¤t_to->data); alloc_.deallocate(current_to,1); current_to=tmp; @@ -1200,7 +1206,7 @@ iter tree::replace(iter position, const iterator_base& f } template -typename tree::sibling_iterator tree::replace( +typename Tree::sibling_iterator Tree::replace( sibling_iterator orig_begin, sibling_iterator orig_end, sibling_iterator new_begin, @@ -1246,7 +1252,7 @@ typename tree::sibling_iterator tree template -iter tree::flatten(iter position) +iter Tree::flatten(iter position) { if(position.node->first_child==0) return position; @@ -1274,7 +1280,7 @@ iter tree::flatten(iter position) template template -iter tree::reparent(iter position, sibling_iterator begin, sibling_iterator end) +iter Tree::reparent(iter position, sibling_iterator begin, sibling_iterator end) { tree_node *first=begin.node; tree_node *last=first; @@ -1322,14 +1328,14 @@ iter tree::reparent(iter position, sibling_iterator begi } template -template iter tree::reparent(iter position, iter from) +template iter Tree::reparent(iter position, iter from) { if(from.node->first_child==0) return position; return reparent(position, from.node->first_child, end(from)); } template -template iter tree::wrap(iter position, const T& x) +template iter Tree::wrap(iter position, const T& x) { assert(position.node!=0); sibling_iterator fr=position, to=position; @@ -1340,7 +1346,7 @@ template iter tree::wrap(iter position, } template -template iter tree::move_after(iter target, iter source) +template iter Tree::move_after(iter target, iter source) { tree_node *dst=target.node; tree_node *src=source.node; @@ -1369,7 +1375,7 @@ template iter tree::move_after(iter targ } template -template iter tree::move_before(iter target, iter source) +template iter Tree::move_before(iter target, iter source) { tree_node *dst=target.node; tree_node *src=source.node; @@ -1399,7 +1405,7 @@ template iter tree::move_before(iter tar // specialisation for sibling_iterators template -typename tree::sibling_iterator tree::move_before(sibling_iterator target, +typename Tree::sibling_iterator Tree::move_before(sibling_iterator target, sibling_iterator source) { tree_node *dst=target.node; @@ -1436,7 +1442,7 @@ typename tree::sibling_iterator tree -template iter tree::move_ontop(iter target, iter source) +template iter Tree::move_ontop(iter target, iter source) { tree_node *dst=target.node; tree_node *src=source.node; @@ -1471,7 +1477,7 @@ template iter tree::move_ontop(iter targ } template -void tree::merge(sibling_iterator to1, sibling_iterator to2, +void Tree::merge(sibling_iterator to1, sibling_iterator to2, sibling_iterator from1, sibling_iterator from2, bool duplicate_leaves) { @@ -1495,7 +1501,7 @@ void tree::merge(sibling_iterator to1, sibling_iterato template -void tree::sort(sibling_iterator from, sibling_iterator to, bool deep) +void Tree::sort(sibling_iterator from, sibling_iterator to, bool deep) { std::less comp; sort(from, to, comp, deep); @@ -1503,7 +1509,7 @@ void tree::sort(sibling_iterator from, sibling_iterator template template -void tree::sort(sibling_iterator from, sibling_iterator to, +void Tree::sort(sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep) { if(from==to) return; @@ -1563,7 +1569,7 @@ void tree::sort(sibling_iterator from, sibling_iterator template template -bool tree::equal(const iter& one_, const iter& two, const iter& three_) const +bool Tree::equal(const iter& one_, const iter& two, const iter& three_) const { std::equal_to comp; return equal(one_, two, three_, comp); @@ -1571,7 +1577,7 @@ bool tree::equal(const iter& one_, const iter& two, cons template template -bool tree::equal_subtree(const iter& one_, const iter& two_) const +bool Tree::equal_subtree(const iter& one_, const iter& two_) const { std::equal_to comp; return equal_subtree(one_, two_, comp); @@ -1579,7 +1585,7 @@ bool tree::equal_subtree(const iter& one_, const iter& t template template -bool tree::equal(const iter& one_, const iter& two, const iter& three_, BinaryPredicate fun) const +bool Tree::equal(const iter& one_, const iter& two, const iter& three_, BinaryPredicate fun) const { pre_order_iterator one(one_), three(three_); @@ -1598,7 +1604,7 @@ bool tree::equal(const iter& one_, const iter& two, cons template template -bool tree::equal_subtree(const iter& one_, const iter& two_, BinaryPredicate fun) const +bool Tree::equal_subtree(const iter& one_, const iter& two_, BinaryPredicate fun) const { pre_order_iterator one(one_), two(two_); @@ -1608,23 +1614,23 @@ bool tree::equal_subtree(const iter& one_, const iter& t } template -tree tree::subtree(sibling_iterator from, sibling_iterator to) const +Tree Tree::subtree(sibling_iterator from, sibling_iterator to) const { - tree tmp; + Tree tmp; tmp.set_head(value_type()); tmp.replace(tmp.begin(), tmp.end(), from, to); return tmp; } template -void tree::subtree(tree& tmp, sibling_iterator from, sibling_iterator to) const +void Tree::subtree(Tree& tmp, sibling_iterator from, sibling_iterator to) const { tmp.set_head(value_type()); tmp.replace(tmp.begin(), tmp.end(), from, to); } template -size_t tree::size() const +size_t Tree::size() const { size_t i=0; pre_order_iterator it=begin(), eit=end(); @@ -1636,7 +1642,7 @@ size_t tree::size() const } template -size_t tree::size(const iterator_base& top) const +size_t Tree::size(const iterator_base& top) const { size_t i=0; pre_order_iterator it=top, eit=top; @@ -1650,14 +1656,14 @@ size_t tree::size(const iterator_base& top) const } template -bool tree::empty() const +bool Tree::empty() const { pre_order_iterator it=begin(), eit=end(); return (it==eit); } template -int tree::depth(const iterator_base& it) +int Tree::depth(const iterator_base& it) { tree_node* pos=it.node; assert(pos!=0); @@ -1670,7 +1676,7 @@ int tree::depth(const iterator_base& it) } template -int tree::depth(const iterator_base& it, const iterator_base& root) +int Tree::depth(const iterator_base& it, const iterator_base& root) { tree_node* pos=it.node; assert(pos!=0); @@ -1683,7 +1689,7 @@ int tree::depth(const iterator_base& it, const iterator_ } template -int tree::max_depth() const +int Tree::max_depth() const { int maxd=-1; for(tree_node *it = head->next_sibling; it!=feet; it=it->next_sibling) @@ -1694,7 +1700,7 @@ int tree::max_depth() const template -int tree::max_depth(const iterator_base& pos) const +int Tree::max_depth(const iterator_base& pos) const { tree_node *tmp=pos.node; @@ -1722,7 +1728,7 @@ int tree::max_depth(const iterator_base& pos) const } template -unsigned int tree::number_of_children(const iterator_base& it) +unsigned int Tree::number_of_children(const iterator_base& it) { tree_node *pos=it.node->first_child; if(pos==0) return 0; @@ -1738,7 +1744,7 @@ unsigned int tree::number_of_children(const iterator_bas } template -unsigned int tree::number_of_siblings(const iterator_base& it) const +unsigned int Tree::number_of_siblings(const iterator_base& it) const { tree_node *pos=it.node; unsigned int ret=0; @@ -1762,7 +1768,7 @@ unsigned int tree::number_of_siblings(const iterator_bas } template -void tree::swap(sibling_iterator it) +void Tree::swap(sibling_iterator it) { tree_node *nxt=it.node->next_sibling; if(nxt) { @@ -1783,7 +1789,7 @@ void tree::swap(sibling_iterator it) } template -void tree::swap(iterator one, iterator two) +void Tree::swap(iterator one, iterator two) { // if one and two are adjacent siblings, use the sibling swap if(one.node->next_sibling==two.node) swap(one); @@ -1816,7 +1822,7 @@ void tree::swap(iterator one, iterator two) } // template -// tree::iterator tree::find_subtree( +// Tree::iterator Tree::find_subtree( // sibling_iterator subfrom, sibling_iterator subto, iterator from, iterator to, // BinaryPredicate fun) const // { @@ -1830,7 +1836,7 @@ void tree::swap(iterator one, iterator two) // } template -bool tree::is_in_subtree(const iterator_base& it, const iterator_base& begin, +bool Tree::is_in_subtree(const iterator_base& it, const iterator_base& begin, const iterator_base& end) const { // FIXME: this should be optimised. @@ -1843,14 +1849,14 @@ bool tree::is_in_subtree(const iterator_base& it, const } template -bool tree::is_valid(const iterator_base& it) const +bool Tree::is_valid(const iterator_base& it) const { if(it.node==0 || it.node==feet || it.node==head) return false; else return true; } template -unsigned int tree::index(sibling_iterator it) const +unsigned int Tree::index(sibling_iterator it) const { unsigned int ind=0; if(it.node->parent==0) { @@ -1870,7 +1876,7 @@ unsigned int tree::index(sibling_iterator it) const template -typename tree::sibling_iterator tree::child(const iterator_base& it, unsigned int num) +typename Tree::sibling_iterator Tree::child(const iterator_base& it, unsigned int num) { tree_node *tmp=it.node->first_child; while(num--) { @@ -1886,87 +1892,87 @@ typename tree::sibling_iterator tree -tree::iterator_base::iterator_base() +Tree::iterator_base::iterator_base() : node(0), skip_current_children_(false) { } template -tree::iterator_base::iterator_base(tree_node *tn) +Tree::iterator_base::iterator_base(tree_node *tn) : node(tn), skip_current_children_(false) { } template -T& tree::iterator_base::operator*() const +T& Tree::iterator_base::operator*() const { return node->data; } template -T* tree::iterator_base::operator->() const +T* Tree::iterator_base::operator->() const { return &(node->data); } template -bool tree::post_order_iterator::operator!=(const post_order_iterator& other) const +bool Tree::post_order_iterator::operator!=(const post_order_iterator& other) const { if(other.node!=this->node) return true; else return false; } template -bool tree::post_order_iterator::operator==(const post_order_iterator& other) const +bool Tree::post_order_iterator::operator==(const post_order_iterator& other) const { if(other.node==this->node) return true; else return false; } template -bool tree::pre_order_iterator::operator!=(const pre_order_iterator& other) const +bool Tree::pre_order_iterator::operator!=(const pre_order_iterator& other) const { if(other.node!=this->node) return true; else return false; } template -bool tree::pre_order_iterator::operator==(const pre_order_iterator& other) const +bool Tree::pre_order_iterator::operator==(const pre_order_iterator& other) const { if(other.node==this->node) return true; else return false; } template -bool tree::sibling_iterator::operator!=(const sibling_iterator& other) const +bool Tree::sibling_iterator::operator!=(const sibling_iterator& other) const { if(other.node!=this->node) return true; else return false; } template -bool tree::sibling_iterator::operator==(const sibling_iterator& other) const +bool Tree::sibling_iterator::operator==(const sibling_iterator& other) const { if(other.node==this->node) return true; else return false; } template -bool tree::leaf_iterator::operator!=(const leaf_iterator& other) const +bool Tree::leaf_iterator::operator!=(const leaf_iterator& other) const { if(other.node!=this->node) return true; else return false; } template -bool tree::leaf_iterator::operator==(const leaf_iterator& other) const +bool Tree::leaf_iterator::operator==(const leaf_iterator& other) const { if(other.node==this->node && other.top_node==this->top_node) return true; else return false; } template -typename tree::sibling_iterator tree::iterator_base::begin() const +typename Tree::sibling_iterator Tree::iterator_base::begin() const { if(node->first_child==0) return end(); @@ -1977,7 +1983,7 @@ typename tree::sibling_iterator tree -typename tree::sibling_iterator tree::iterator_base::end() const +typename Tree::sibling_iterator Tree::iterator_base::end() const { sibling_iterator ret(0); ret.parent_=node; @@ -1985,13 +1991,13 @@ typename tree::sibling_iterator tree -void tree::iterator_base::skip_children() +void Tree::iterator_base::skip_children() { skip_current_children_=true; } template -unsigned int tree::iterator_base::number_of_children() const +unsigned int Tree::iterator_base::number_of_children() const { tree_node *pos=node->first_child; if(pos==0) return 0; @@ -2005,7 +2011,7 @@ unsigned int tree::iterator_base::number_of_children() c } template -bool tree::iterator_base::is_descendant_of(iterator_base parent) const +bool Tree::iterator_base::is_descendant_of(iterator_base parent) const { const tree_node *node = this->node; while(node != NULL) { @@ -2020,25 +2026,25 @@ bool tree::iterator_base::is_descendant_of(iterator_base // Pre-order iterator template -tree::pre_order_iterator::pre_order_iterator() +Tree::pre_order_iterator::pre_order_iterator() : iterator_base(0) { } template -tree::pre_order_iterator::pre_order_iterator(tree_node *tn) +Tree::pre_order_iterator::pre_order_iterator(tree_node *tn) : iterator_base(tn) { } template -tree::pre_order_iterator::pre_order_iterator(const iterator_base &other) +Tree::pre_order_iterator::pre_order_iterator(const iterator_base &other) : iterator_base(other.node) { } template -tree::pre_order_iterator::pre_order_iterator(const sibling_iterator& other) +Tree::pre_order_iterator::pre_order_iterator(const sibling_iterator& other) : iterator_base(other.node) { if(this->node==0) { @@ -2052,7 +2058,7 @@ tree::pre_order_iterator::pre_order_iterator(const sibli } template -typename tree::pre_order_iterator& tree::pre_order_iterator::operator++() +typename Tree::pre_order_iterator& Tree::pre_order_iterator::operator++() { assert(this->node!=0); if(!this->skip_current_children_ && this->node->first_child != 0) { @@ -2071,7 +2077,7 @@ typename tree::pre_order_iterator& tree -typename tree::pre_order_iterator& tree::pre_order_iterator::operator--() +typename Tree::pre_order_iterator& Tree::pre_order_iterator::operator--() { assert(this->node!=0); if(this->node->prev_sibling) { @@ -2088,7 +2094,7 @@ typename tree::pre_order_iterator& tree -typename tree::pre_order_iterator tree::pre_order_iterator::operator++(int) +typename Tree::pre_order_iterator Tree::pre_order_iterator::operator++(int) { pre_order_iterator copy = *this; ++(*this); @@ -2096,7 +2102,7 @@ typename tree::pre_order_iterator tree -typename tree::pre_order_iterator tree::pre_order_iterator::operator--(int) +typename Tree::pre_order_iterator Tree::pre_order_iterator::operator--(int) { pre_order_iterator copy = *this; --(*this); @@ -2104,7 +2110,7 @@ typename tree::pre_order_iterator tree -typename tree::pre_order_iterator& tree::pre_order_iterator::operator+=(unsigned int num) +typename Tree::pre_order_iterator& Tree::pre_order_iterator::operator+=(unsigned int num) { while(num>0) { ++(*this); @@ -2114,7 +2120,7 @@ typename tree::pre_order_iterator& tree -typename tree::pre_order_iterator& tree::pre_order_iterator::operator-=(unsigned int num) +typename Tree::pre_order_iterator& Tree::pre_order_iterator::operator-=(unsigned int num) { while(num>0) { --(*this); @@ -2128,25 +2134,25 @@ typename tree::pre_order_iterator& tree -tree::post_order_iterator::post_order_iterator() +Tree::post_order_iterator::post_order_iterator() : iterator_base(0) { } template -tree::post_order_iterator::post_order_iterator(tree_node *tn) +Tree::post_order_iterator::post_order_iterator(tree_node *tn) : iterator_base(tn) { } template -tree::post_order_iterator::post_order_iterator(const iterator_base &other) +Tree::post_order_iterator::post_order_iterator(const iterator_base &other) : iterator_base(other.node) { } template -tree::post_order_iterator::post_order_iterator(const sibling_iterator& other) +Tree::post_order_iterator::post_order_iterator(const sibling_iterator& other) : iterator_base(other.node) { if(this->node==0) { @@ -2160,7 +2166,7 @@ tree::post_order_iterator::post_order_iterator(const sib } template -typename tree::post_order_iterator& tree::post_order_iterator::operator++() +typename Tree::post_order_iterator& Tree::post_order_iterator::operator++() { assert(this->node!=0); if(this->node->next_sibling==0) { @@ -2181,7 +2187,7 @@ typename tree::post_order_iterator& tree -typename tree::post_order_iterator& tree::post_order_iterator::operator--() +typename Tree::post_order_iterator& Tree::post_order_iterator::operator--() { assert(this->node!=0); if(this->skip_current_children_ || this->node->last_child==0) { @@ -2197,7 +2203,7 @@ typename tree::post_order_iterator& tree -typename tree::post_order_iterator tree::post_order_iterator::operator++(int) +typename Tree::post_order_iterator Tree::post_order_iterator::operator++(int) { post_order_iterator copy = *this; ++(*this); @@ -2205,7 +2211,7 @@ typename tree::post_order_iterator tree -typename tree::post_order_iterator tree::post_order_iterator::operator--(int) +typename Tree::post_order_iterator Tree::post_order_iterator::operator--(int) { post_order_iterator copy = *this; --(*this); @@ -2214,7 +2220,7 @@ typename tree::post_order_iterator tree -typename tree::post_order_iterator& tree::post_order_iterator::operator+=(unsigned int num) +typename Tree::post_order_iterator& Tree::post_order_iterator::operator+=(unsigned int num) { while(num>0) { ++(*this); @@ -2224,7 +2230,7 @@ typename tree::post_order_iterator& tree -typename tree::post_order_iterator& tree::post_order_iterator::operator-=(unsigned int num) +typename Tree::post_order_iterator& Tree::post_order_iterator::operator-=(unsigned int num) { while(num>0) { --(*this); @@ -2234,7 +2240,7 @@ typename tree::post_order_iterator& tree -void tree::post_order_iterator::descend_all() +void Tree::post_order_iterator::descend_all() { assert(this->node!=0); while(this->node->first_child) @@ -2245,41 +2251,41 @@ void tree::post_order_iterator::descend_all() // Breadth-first iterator template -tree::breadth_first_queued_iterator::breadth_first_queued_iterator() +Tree::breadth_first_queued_iterator::breadth_first_queued_iterator() : iterator_base() { } template -tree::breadth_first_queued_iterator::breadth_first_queued_iterator(tree_node *tn) +Tree::breadth_first_queued_iterator::breadth_first_queued_iterator(tree_node *tn) : iterator_base(tn) { traversal_queue.push(tn); } template -tree::breadth_first_queued_iterator::breadth_first_queued_iterator(const iterator_base& other) +Tree::breadth_first_queued_iterator::breadth_first_queued_iterator(const iterator_base& other) : iterator_base(other.node) { traversal_queue.push(other.node); } template -bool tree::breadth_first_queued_iterator::operator!=(const breadth_first_queued_iterator& other) const +bool Tree::breadth_first_queued_iterator::operator!=(const breadth_first_queued_iterator& other) const { if(other.node!=this->node) return true; else return false; } template -bool tree::breadth_first_queued_iterator::operator==(const breadth_first_queued_iterator& other) const +bool Tree::breadth_first_queued_iterator::operator==(const breadth_first_queued_iterator& other) const { if(other.node==this->node) return true; else return false; } template -typename tree::breadth_first_queued_iterator& tree::breadth_first_queued_iterator::operator++() +typename Tree::breadth_first_queued_iterator& Tree::breadth_first_queued_iterator::operator++() { assert(this->node!=0); @@ -2298,7 +2304,7 @@ typename tree::breadth_first_queued_iterator& tree -typename tree::breadth_first_queued_iterator tree::breadth_first_queued_iterator::operator++(int) +typename Tree::breadth_first_queued_iterator Tree::breadth_first_queued_iterator::operator++(int) { breadth_first_queued_iterator copy = *this; ++(*this); @@ -2306,7 +2312,7 @@ typename tree::breadth_first_queued_iterator tree -typename tree::breadth_first_queued_iterator& tree::breadth_first_queued_iterator::operator+=(unsigned int num) +typename Tree::breadth_first_queued_iterator& Tree::breadth_first_queued_iterator::operator+=(unsigned int num) { while(num>0) { ++(*this); @@ -2320,51 +2326,51 @@ typename tree::breadth_first_queued_iterator& tree -tree::fixed_depth_iterator::fixed_depth_iterator() +Tree::fixed_depth_iterator::fixed_depth_iterator() : iterator_base() { } template -tree::fixed_depth_iterator::fixed_depth_iterator(tree_node *tn) +Tree::fixed_depth_iterator::fixed_depth_iterator(tree_node *tn) : iterator_base(tn), top_node(0) { } template -tree::fixed_depth_iterator::fixed_depth_iterator(const iterator_base& other) +Tree::fixed_depth_iterator::fixed_depth_iterator(const iterator_base& other) : iterator_base(other.node), top_node(0) { } template -tree::fixed_depth_iterator::fixed_depth_iterator(const sibling_iterator& other) +Tree::fixed_depth_iterator::fixed_depth_iterator(const sibling_iterator& other) : iterator_base(other.node), top_node(0) { } template -tree::fixed_depth_iterator::fixed_depth_iterator(const fixed_depth_iterator& other) +Tree::fixed_depth_iterator::fixed_depth_iterator(const fixed_depth_iterator& other) : iterator_base(other.node), top_node(other.top_node) { } template -bool tree::fixed_depth_iterator::operator==(const fixed_depth_iterator& other) const +bool Tree::fixed_depth_iterator::operator==(const fixed_depth_iterator& other) const { if(other.node==this->node && other.top_node==top_node) return true; else return false; } template -bool tree::fixed_depth_iterator::operator!=(const fixed_depth_iterator& other) const +bool Tree::fixed_depth_iterator::operator!=(const fixed_depth_iterator& other) const { if(other.node!=this->node || other.top_node!=top_node) return true; else return false; } template -typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator++() +typename Tree::fixed_depth_iterator& Tree::fixed_depth_iterator::operator++() { assert(this->node!=0); @@ -2404,7 +2410,7 @@ typename tree::fixed_depth_iterator& tree -typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator--() +typename Tree::fixed_depth_iterator& Tree::fixed_depth_iterator::operator--() { assert(this->node!=0); @@ -2466,7 +2472,7 @@ typename tree::fixed_depth_iterator& tree -typename tree::fixed_depth_iterator tree::fixed_depth_iterator::operator++(int) +typename Tree::fixed_depth_iterator Tree::fixed_depth_iterator::operator++(int) { fixed_depth_iterator copy = *this; ++(*this); @@ -2474,7 +2480,7 @@ typename tree::fixed_depth_iterator tree -typename tree::fixed_depth_iterator tree::fixed_depth_iterator::operator--(int) +typename Tree::fixed_depth_iterator Tree::fixed_depth_iterator::operator--(int) { fixed_depth_iterator copy = *this; --(*this); @@ -2482,7 +2488,7 @@ typename tree::fixed_depth_iterator tree -typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator-=(unsigned int num) +typename Tree::fixed_depth_iterator& Tree::fixed_depth_iterator::operator-=(unsigned int num) { while(num>0) { --(*this); @@ -2492,7 +2498,7 @@ typename tree::fixed_depth_iterator& tree -typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator+=(unsigned int num) +typename Tree::fixed_depth_iterator& Tree::fixed_depth_iterator::operator+=(unsigned int num) { while(num>0) { ++(*this); @@ -2505,34 +2511,34 @@ typename tree::fixed_depth_iterator& tree -tree::sibling_iterator::sibling_iterator() +Tree::sibling_iterator::sibling_iterator() : iterator_base() { set_parent_(); } template -tree::sibling_iterator::sibling_iterator(tree_node *tn) +Tree::sibling_iterator::sibling_iterator(tree_node *tn) : iterator_base(tn) { set_parent_(); } template -tree::sibling_iterator::sibling_iterator(const iterator_base& other) +Tree::sibling_iterator::sibling_iterator(const iterator_base& other) : iterator_base(other.node) { set_parent_(); } template -tree::sibling_iterator::sibling_iterator(const sibling_iterator& other) +Tree::sibling_iterator::sibling_iterator(const sibling_iterator& other) : iterator_base(other), parent_(other.parent_) { } template -void tree::sibling_iterator::set_parent_() +void Tree::sibling_iterator::set_parent_() { parent_=0; if(this->node==0) return; @@ -2541,7 +2547,7 @@ void tree::sibling_iterator::set_parent_() } template -typename tree::sibling_iterator& tree::sibling_iterator::operator++() +typename Tree::sibling_iterator& Tree::sibling_iterator::operator++() { if(this->node) this->node=this->node->next_sibling; @@ -2549,7 +2555,7 @@ typename tree::sibling_iterator& tree -typename tree::sibling_iterator& tree::sibling_iterator::operator--() +typename Tree::sibling_iterator& Tree::sibling_iterator::operator--() { if(this->node) this->node=this->node->prev_sibling; else { @@ -2560,7 +2566,7 @@ typename tree::sibling_iterator& tree -typename tree::sibling_iterator tree::sibling_iterator::operator++(int) +typename Tree::sibling_iterator Tree::sibling_iterator::operator++(int) { sibling_iterator copy = *this; ++(*this); @@ -2568,7 +2574,7 @@ typename tree::sibling_iterator tree -typename tree::sibling_iterator tree::sibling_iterator::operator--(int) +typename Tree::sibling_iterator Tree::sibling_iterator::operator--(int) { sibling_iterator copy = *this; --(*this); @@ -2576,7 +2582,7 @@ typename tree::sibling_iterator tree -typename tree::sibling_iterator& tree::sibling_iterator::operator+=(unsigned int num) +typename Tree::sibling_iterator& Tree::sibling_iterator::operator+=(unsigned int num) { while(num>0) { ++(*this); @@ -2586,7 +2592,7 @@ typename tree::sibling_iterator& tree -typename tree::sibling_iterator& tree::sibling_iterator::operator-=(unsigned int num) +typename Tree::sibling_iterator& Tree::sibling_iterator::operator-=(unsigned int num) { while(num>0) { --(*this); @@ -2596,14 +2602,14 @@ typename tree::sibling_iterator& tree -typename tree::tree_node *tree::sibling_iterator::range_first() const +typename Tree::tree_node *Tree::sibling_iterator::range_first() const { tree_node *tmp=parent_->first_child; return tmp; } template -typename tree::tree_node *tree::sibling_iterator::range_last() const +typename Tree::tree_node *Tree::sibling_iterator::range_last() const { return parent_->last_child; } @@ -2611,25 +2617,25 @@ typename tree::tree_node *tree:: // Leaf iterator template -tree::leaf_iterator::leaf_iterator() +Tree::leaf_iterator::leaf_iterator() : iterator_base(0), top_node(0) { } template -tree::leaf_iterator::leaf_iterator(tree_node *tn, tree_node *top) +Tree::leaf_iterator::leaf_iterator(tree_node *tn, tree_node *top) : iterator_base(tn), top_node(top) { } template -tree::leaf_iterator::leaf_iterator(const iterator_base &other) +Tree::leaf_iterator::leaf_iterator(const iterator_base &other) : iterator_base(other.node), top_node(0) { } template -tree::leaf_iterator::leaf_iterator(const sibling_iterator& other) +Tree::leaf_iterator::leaf_iterator(const sibling_iterator& other) : iterator_base(other.node), top_node(0) { if(this->node==0) { @@ -2642,7 +2648,7 @@ tree::leaf_iterator::leaf_iterator(const sibling_iterato } template -typename tree::leaf_iterator& tree::leaf_iterator::operator++() +typename Tree::leaf_iterator& Tree::leaf_iterator::operator++() { assert(this->node!=0); if(this->node->first_child!=0) { // current node is no longer leaf (children got added) @@ -2663,7 +2669,7 @@ typename tree::leaf_iterator& tree -typename tree::leaf_iterator& tree::leaf_iterator::operator--() +typename Tree::leaf_iterator& Tree::leaf_iterator::operator--() { assert(this->node!=0); while (this->node->prev_sibling==0) { @@ -2678,7 +2684,7 @@ typename tree::leaf_iterator& tree -typename tree::leaf_iterator tree::leaf_iterator::operator++(int) +typename Tree::leaf_iterator Tree::leaf_iterator::operator++(int) { leaf_iterator copy = *this; ++(*this); @@ -2686,7 +2692,7 @@ typename tree::leaf_iterator tree -typename tree::leaf_iterator tree::leaf_iterator::operator--(int) +typename Tree::leaf_iterator Tree::leaf_iterator::operator--(int) { leaf_iterator copy = *this; --(*this); @@ -2695,7 +2701,7 @@ typename tree::leaf_iterator tree -typename tree::leaf_iterator& tree::leaf_iterator::operator+=(unsigned int num) +typename Tree::leaf_iterator& Tree::leaf_iterator::operator+=(unsigned int num) { while(num>0) { ++(*this); @@ -2705,7 +2711,7 @@ typename tree::leaf_iterator& tree -typename tree::leaf_iterator& tree::leaf_iterator::operator-=(unsigned int num) +typename Tree::leaf_iterator& Tree::leaf_iterator::operator-=(unsigned int num) { while(num>0) { --(*this); @@ -2714,10 +2720,5 @@ typename tree::leaf_iterator& tree ** ** @todo the instance handling for the accessor seems somewhat diff --git a/src/lib/visitor.hpp b/src/lib/visitor.hpp index 29fefeb65..08b3a8abc 100644 --- a/src/lib/visitor.hpp +++ b/src/lib/visitor.hpp @@ -59,7 +59,7 @@ Credits for many further implementation ideas go to ** on some treat(VisitableInterface&) function. **
  • any concrete Visitable subclass wanting to be treated by some concrete tool ** needs to use the DECLARE_PROCESSABLE_BY(TOOLBASE) macro. By this, it gets an - ** virtual \code apply(TOOLBASE&) function. Otherwise, it will be treated by the + ** virtual `apply(TOOLBASE&)` function. Otherwise, it will be treated by the ** interface of the next base class using this macro.
  • ** ** For design questions and more detailed implementation notes, see the Proc Layer Tiddly Wiki. diff --git a/src/proc/asset.hpp b/src/proc/asset.hpp index 10e505d05..8b7e3990e 100644 --- a/src/proc/asset.hpp +++ b/src/proc/asset.hpp @@ -21,6 +21,7 @@ */ /** @file asset.hpp + ** @ingroup asset ** Proc-Layer Interface: Assets. ** Declares the Asset top level Interface, the Asset::Ident identification tuple ** and the asset::ID primary key wrapper. Normally, Assets should be handled @@ -45,7 +46,7 @@ ** (Implementation detail: as g++ is not able to handle member function template ** instantiations completely automatic, we need to trigger some template instantiations ** at the end of assetmanager.cpp ) - ** + ** ** @see assetmanager.hpp ** @see media.hpp */ diff --git a/src/proc/asset/media.hpp b/src/proc/asset/media.hpp index 73c5b3329..ed0a42071 100644 --- a/src/proc/asset/media.hpp +++ b/src/proc/asset/media.hpp @@ -23,10 +23,11 @@ /** @file media.hpp ** Media data is a specific kind of Asset. - ** For the different kinds of Assets, we use sub-intefaces inheriting + ** For the different kinds of Assets, we use sub-interfaces inheriting ** from the general Asset interface. To be able to get asset::Media instances - ** directly from the AssetManager, we define a specialization of the Asset ID. - ** + ** directly from the AssetManager, we define a specialisation of the Asset ID. + ** + ** @ingroup asset ** @see asset.hpp for explanation ** @see MediaFactory creating concrete asset::Media instances ** @@ -119,7 +120,7 @@ namespace asset { /** predicate to decide if this asset::Media * is part of a compound (multichannel) media. - * @return pointer to parent, or \code null + * @return pointer to parent, or `null` */ virtual PMedia checkCompound () const; friend class proc::asset::Clip; ////////////////////////TODO better interface!!! diff --git a/src/proc/asset/meta.hpp b/src/proc/asset/meta.hpp index 24b56c81a..4b719e6e1 100644 --- a/src/proc/asset/meta.hpp +++ b/src/proc/asset/meta.hpp @@ -50,6 +50,7 @@ ** or changed metadata entry, finally \em committing this builder to yield a new ** asset::Meta (which, in case of a mutation, might supersede an existing one). ** + ** @ingroup asset ** @see asset.hpp explanation of assets in general ** @see MetaFactory creating concrete asset::Meta instances ** diff --git a/src/proc/asset/proc.hpp b/src/proc/asset/proc.hpp index 60486da19..13dfa8439 100644 --- a/src/proc/asset/proc.hpp +++ b/src/proc/asset/proc.hpp @@ -27,6 +27,7 @@ ** from the general Asset interface. To be able to get asset::Proc instances ** directly from the AssetManager, we define a specialisation of the Asset ID. ** + ** @ingroup asset ** @see asset.hpp for explanation ** @see ProcFactory creating concrete asset::Proc instances ** @@ -66,6 +67,8 @@ namespace asset { /** * key abstraction: data processing asset * @todo just a stub, have to figure out what a asset::Proc is + * @ingroup asset + * @ingroup session */ class Proc : public Asset { diff --git a/src/proc/asset/struct.hpp b/src/proc/asset/struct.hpp index 64b7ce616..6ee1e3cd7 100644 --- a/src/proc/asset/struct.hpp +++ b/src/proc/asset/struct.hpp @@ -48,6 +48,7 @@ ** all placements referring to this track, which could be sub tracks, clips, ** effects, automation or labels. ** + ** @ingroup asset ** @see asset.hpp for explanation regarding asset IDs ** @see StructFactory creating concrete asset::Struct instances ** diff --git a/src/proc/common.hpp b/src/proc/common.hpp index 6e6e2e491..df2d1ef7e 100644 --- a/src/proc/common.hpp +++ b/src/proc/common.hpp @@ -50,27 +50,6 @@ #include "lib/error.hpp" // pulls in NoBug via loggging.h -/** - * Lumiera public interface. - * Global interfaces and facilities accessible from plugins and scripts. - * It's probably a good idea to pull it in explicitly and to avoid nesting - * implementation namespaces within \c lumiera:: - */ -namespace lumiera { - - /* additional global configuration goes here... */ - - -} // namespace lumiera - - -/** - * Implementation namespace for support and library code. - */ -namespace lib { - -} - /** * Proc-Layer implementation namespace root. diff --git a/src/proc/engine/engine-service.hpp b/src/proc/engine/engine-service.hpp index 1bc4a3f55..6ec05f06f 100644 --- a/src/proc/engine/engine-service.hpp +++ b/src/proc/engine/engine-service.hpp @@ -38,6 +38,7 @@ ** switch and continuation; under the hood, there is a mechanism to discard resources ** tied to the original CalcStream, once the switch to the new definition is complete. ** + ** @ingroup engine ** @see EngineInterface_test ** @see CalcStream_test ** @see proc::play::PlayerService @@ -94,6 +95,8 @@ namespace engine{ * backend layer. The implementation of this service is * responsible for creating the right job entries in the * correct order and to enqueue these into the scheduler. + * @ingroup engine + * @ingroup player */ class EngineService : boost::noncopyable diff --git a/src/proc/mobject/mobject.hpp b/src/proc/mobject/mobject.hpp index c860c52a0..5929d31e5 100644 --- a/src/proc/mobject/mobject.hpp +++ b/src/proc/mobject/mobject.hpp @@ -61,6 +61,7 @@ namespace mobject { * All the contents and elements that can be placed and * manipulated and finally rendered within Lumiera's * high-level model and Session are MObjects. + * @ingroup session */ class MObject : public Buildable, diff --git a/src/proc/mobject/session.hpp b/src/proc/mobject/session.hpp index b0155b134..8d1ac1e5a 100644 --- a/src/proc/mobject/session.hpp +++ b/src/proc/mobject/session.hpp @@ -22,6 +22,7 @@ /** @file session.hpp + ** @ingroup session ** Primary Interface to the current Session. ** The session interface can be used to discover session's contents. ** Mostly, these objects within the session are MObject subclasses, but they @@ -101,7 +102,8 @@ namespace mobject { * a reference to the SessManager and is accessible as the static * field Session::current). Clients shouldn't try to get a direct * pointer or reference to the Session object. - * + * @ingroup session + * */ class Session : boost::noncopyable diff --git a/src/proc/mobject/session/element-query.hpp b/src/proc/mobject/session/element-query.hpp index d99b9669f..8f902ccb3 100644 --- a/src/proc/mobject/session/element-query.hpp +++ b/src/proc/mobject/session/element-query.hpp @@ -102,7 +102,7 @@ namespace session { * @return MObject ref to the fist suitable element. Might be an empty MObjectRef. * @note the embedded MObject subtype (MO) causes an additional filtering * on that specific kind of MObject (e.g. considering just Clips) - * @warning be sure the passed predicate actually takes a \code Placement const& \endcode + * @warning be sure the passed predicate actually takes a `Placement const&` * with XX being the correct type. Note the \c const& -- Failing to do so shows up as * compiler error "no suitable function pick(.....)" */ diff --git a/src/proc/mobject/session/session.cpp b/src/proc/mobject/session/session.cpp index cf5c7b758..b8a1bcc23 100644 --- a/src/proc/mobject/session/session.cpp +++ b/src/proc/mobject/session/session.cpp @@ -64,7 +64,7 @@ namespace mobject { * * Consequently, if you want to talk to the session manager, * you use dot-notation, while you access the session object - * via arrow notation (e.g. \code Session::current->getFixture() ) + * via arrow notation (e.g. `Session::current->getFixture()` ) */ SessManager& Session::current = lib::Depend()(); diff --git a/src/proc/play/timings.hpp b/src/proc/play/timings.hpp index b8bf55390..0a406e53b 100644 --- a/src/proc/play/timings.hpp +++ b/src/proc/play/timings.hpp @@ -140,7 +140,7 @@ namespace play { /** real time deadline for the given frame, without any latency. * This value is provided in case of scheduled time of delivery, - * which is signalled by \code playbackUrgency == TIMEBOUND \endcode + * which is signalled by `playbackUrgency == TIMEBOUND` * @return wall clock time to expect delivery of data * corresponding to a frame specified relative * to \link #getOrigin time axis origin \endlink diff --git a/tests/library/opaque-holder-test.cpp b/tests/library/opaque-holder-test.cpp index 95a69d968..017f215a2 100644 --- a/tests/library/opaque-holder-test.cpp +++ b/tests/library/opaque-holder-test.cpp @@ -111,7 +111,7 @@ namespace test{ * or a custom allocator. * * @todo this test doesn't cover automatic conversions and conversions using RTTI - * from the target objects, while \code OpaqueHolder.template get() \endcode + * from the target objects, while `OpaqueHolder.template get()` * would allow for such conversions. This is similar to Ticket #141, and * actually based on the same code as variant.hpp (access-casted.hpp) */ diff --git a/wiki/draw/LumiLogo-small.png b/wiki/draw/LumiLogo-small.png new file mode 100644 index 000000000..59c9e3b2f Binary files /dev/null and b/wiki/draw/LumiLogo-small.png differ diff --git a/wiki/draw/LumiLogo.png b/wiki/draw/LumiLogo.png new file mode 100644 index 000000000..2cd230106 Binary files /dev/null and b/wiki/draw/LumiLogo.png differ