From 685a9b84ee4cbbd9d5bb6b23c976fb5fbe7f4050 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 24 Mar 2018 05:35:13 +0100 Subject: [PATCH] Library: replace boost::noncopyable by our own library solution Benefits - get rid of yet another pervasive Boost dependency - define additional more fine grained policies (move only, clonable) --- admin/scons/Platform.py | 2 - doc/technical/howto/UsingBoost.txt | 44 +++---------- src/backend/engine/job.h | 2 +- src/backend/engine/scheduler-diagnostics.hpp | 6 +- src/backend/real-clock.hpp | 1 - src/backend/thread-wrapper.hpp | 10 +-- src/common/advice.hpp | 5 +- src/common/advice/advice.cpp | 4 +- src/common/appstate.hpp | 5 +- src/common/basic-setup.hpp | 4 +- src/common/guifacade.cpp | 2 +- src/common/instancehandle.hpp | 8 +-- src/common/interface-facade-link.hpp | 4 +- src/common/option.hpp | 2 +- src/common/query.hpp | 2 +- src/common/query/defs-manager.hpp | 5 +- src/common/query/defs-registry.hpp | 4 +- src/common/query/query-resolver.hpp | 7 +- src/common/subsys.hpp | 5 +- src/gui/ctrl/actions.hpp | 4 +- src/gui/ctrl/bus-term.hpp | 6 +- src/gui/ctrl/core-service.hpp | 5 +- src/gui/ctrl/facade.hpp | 4 +- src/gui/ctrl/global-ctx.hpp | 4 +- src/gui/ctrl/nexus.hpp | 4 +- src/gui/ctrl/panel-locator.hpp | 4 +- src/gui/ctrl/playback-controller.hpp | 4 +- src/gui/ctrl/state-manager.hpp | 4 +- src/gui/ctrl/state-map-grouping-storage.hpp | 4 +- src/gui/ctrl/ui-dispatcher.hpp | 4 +- src/gui/ctrl/ui-manager.hpp | 4 +- src/gui/ctrl/ui-state.hpp | 4 +- src/gui/ctrl/window-locator.hpp | 4 +- src/gui/demo-gui-roundtrip.cpp | 4 +- src/gui/display-service.hpp | 6 +- src/gui/gtk-lumiera.cpp | 4 +- src/gui/guifacade.hpp | 4 +- src/gui/interact/cmd-context.cpp | 1 - src/gui/interact/cmd-context.hpp | 4 +- src/gui/interact/focus-tracker.hpp | 4 +- src/gui/interact/interaction-director.hpp | 1 - src/gui/interact/interaction-state.cpp | 1 - src/gui/interact/interaction-state.hpp | 5 +- src/gui/interact/navigator.hpp | 4 +- src/gui/interact/spot-locator.hpp | 4 +- src/gui/interact/ui-coord.hpp | 6 +- src/gui/interact/ui-location-solver.hpp | 8 +-- src/gui/interact/view-locator.hpp | 4 +- src/gui/interact/wizard.hpp | 4 +- src/gui/interact/work-site-trail.hpp | 4 +- src/gui/interact/work-site.hpp | 4 +- src/gui/model/diagnostics.hpp | 4 +- src/gui/model/element.hpp | 2 +- src/gui/model/session-facade.cpp | 1 - src/gui/model/session-facade.hpp | 4 +- src/gui/model/tangible.hpp | 6 +- src/gui/setting/asset-controller.hpp | 1 - src/gui/ui-bus.hpp | 4 +- src/gui/widget/timeline/draw-strategy.hpp | 2 +- .../timeline/timeline-layout-helper.hpp | 2 +- src/gui/widget/timeline/timeline-state.hpp | 2 +- src/gui/workspace/style-manager.hpp | 4 +- src/include/display-facade.h | 1 - src/include/lifecycle.h | 4 +- src/lib/allocation-cluster.hpp | 4 +- src/lib/call-queue.hpp | 4 +- src/lib/del-stash.hpp | 4 +- src/lib/depend-inject.hpp | 15 ++--- src/lib/depend2.hpp | 4 +- src/lib/dependency-factory.hpp | 2 +- src/lib/diagnostic-context.hpp | 4 +- src/lib/diff/diff-language.hpp | 4 +- src/lib/diff/list-diff-detector.hpp | 4 +- src/lib/diff/record.hpp | 5 +- src/lib/diff/test-mutation-target.hpp | 4 +- src/lib/diff/tree-diff-application.hpp | 2 +- .../diff/tree-mutator-collection-binding.hpp | 8 +-- src/lib/diff/tree-mutator.hpp | 8 +-- src/lib/format-string.hpp | 4 +- src/lib/iter-source.hpp | 4 +- src/lib/iter-stack.hpp | 2 +- src/lib/lifecycleregistry.hpp | 5 +- src/lib/linked-elements.hpp | 4 +- src/lib/meta/tuple-record-init.hpp | 2 +- src/lib/meta/virtual-copy-support.hpp | 2 +- src/lib/nobug-resource-handle-context.hpp | 4 +- src/lib/nocopy.hpp | 66 ++++++++++++------- src/lib/opaque-holder.hpp | 6 +- src/lib/ref-array.hpp | 4 +- src/lib/scoped-collection.hpp | 10 +-- src/lib/scoped-ptrvect.hpp | 4 +- src/lib/searchpath.hpp | 4 +- src/lib/singleton-ref.hpp | 7 +- src/lib/symbol-table.hpp | 4 +- src/lib/sync.hpp | 4 +- src/lib/test/depend-4test.hpp | 3 +- src/lib/test/testdummy.hpp | 4 +- src/lib/test/testoption.hpp | 4 +- src/lib/thread-local.hpp | 5 +- src/lib/time/mutation.hpp | 2 +- src/lib/variant-o.hpp | 4 +- src/lib/wrapper.hpp | 6 +- src/proc/asset.hpp | 6 +- src/proc/asset/db.hpp | 4 +- src/proc/asset/media.hpp | 4 +- src/proc/asset/meta.hpp | 5 +- src/proc/asset/proc.hpp | 5 +- src/proc/asset/struct.hpp | 4 +- src/proc/assetmanager.hpp | 2 +- src/proc/cmd.hpp | 1 - src/proc/common.hpp | 1 + src/proc/control/command-def.hpp | 4 +- .../control/command-impl-clone-builder.hpp | 5 +- src/proc/control/command-impl.hpp | 4 +- src/proc/control/command-instance-manager.hpp | 4 +- src/proc/control/command-registry.hpp | 5 +- src/proc/control/command-setup.hpp | 5 +- src/proc/control/session-command-service.hpp | 4 +- src/proc/control/styperegistry.hpp | 4 +- src/proc/engine/buffer-metadata.hpp | 4 +- src/proc/engine/buffer-provider.hpp | 4 +- src/proc/engine/bufftable-obsolete.hpp | 4 +- src/proc/engine/bufftable.hpp | 1 - src/proc/engine/calc-plan-continuation.hpp | 2 - src/proc/engine/calc-stream.hpp | 1 - .../engine/diagnostic-buffer-provider.hpp | 4 +- src/proc/engine/dispatcher.hpp | 1 - src/proc/engine/engine-diagnostics.hpp | 4 +- src/proc/engine/engine-service-mock.hpp | 2 - src/proc/engine/engine-service.hpp | 6 +- src/proc/engine/frame-coord.hpp | 2 +- src/proc/engine/job-ticket.hpp | 3 +- src/proc/engine/nodewiring-def.hpp | 5 +- src/proc/engine/nodewiring.hpp | 2 - src/proc/engine/procnode.hpp | 3 +- .../engine/tracking-heap-block-provider.cpp | 3 - .../engine/tracking-heap-block-provider.hpp | 2 +- src/proc/engine/worker/tick-service.hpp | 2 + .../builder/fixture-change-detector.hpp | 2 +- .../mobject/builder/model-port-registry.hpp | 2 +- src/proc/mobject/builder/toolfactory.cpp | 1 - src/proc/mobject/mobject.hpp | 3 +- src/proc/mobject/output-mapping.hpp | 13 ++-- src/proc/mobject/session.hpp | 6 +- .../session/dummy-session-connection.cpp | 1 - .../session/dummy-session-connection.hpp | 5 +- src/proc/mobject/session/element-query.hpp | 4 +- src/proc/mobject/session/fixture.hpp | 4 +- .../mobject/session/lifecycle-advisor.hpp | 5 +- src/proc/mobject/session/placement-index.cpp | 2 - src/proc/mobject/session/placement-index.hpp | 4 +- .../mobject/session/query-focus-stack.hpp | 4 +- .../session/session-interface-modules.hpp | 2 +- src/proc/play/dummy-play-connection.hpp | 10 ++- src/proc/play/dummy-player-service.hpp | 6 +- src/proc/play/output-director.hpp | 6 +- src/proc/play/output-manager.hpp | 4 +- src/proc/play/output-slot-connection.hpp | 6 +- src/proc/play/output-slot.cpp | 1 - src/proc/play/output-slot.hpp | 4 +- src/proc/play/play-controller.hpp | 4 +- src/proc/play/play-process.hpp | 6 +- src/proc/play/play-service.hpp | 4 +- src/proc/play/render-configurator.hpp | 6 +- src/proc/play/sound/jack-output.hpp | 1 - src/proc/play/timings.hpp | 1 - src/proc/streamtype.hpp | 4 +- tests/basics/time/time-control-test.cpp | 2 +- .../core/proc/play/diagnostic-output-slot.hpp | 6 +- tests/gui/bus-term-test.cpp | 2 +- tests/gui/test/placeholder-command.hpp | 5 +- tests/gui/test/test-nexus.hpp | 4 +- .../library/dependency-configuration-test.cpp | 4 +- tests/library/iter-source-test.cpp | 5 +- tests/library/meta/tuple-record-init-test.cpp | 1 - .../library/opaque-unchecked-buffer-test.cpp | 6 +- tests/library/scoped-holder-test.cpp | 4 +- 177 files changed, 369 insertions(+), 439 deletions(-) diff --git a/admin/scons/Platform.py b/admin/scons/Platform.py index 41d983ab3..8060c4630 100644 --- a/admin/scons/Platform.py +++ b/admin/scons/Platform.py @@ -82,8 +82,6 @@ def configure(env): if not conf.CheckCXXHeader('boost/config.hpp'): problems.append('We need the C++ boost-libraries.') else: - if not conf.CheckCXXHeader('boost/noncopyable.hpp'): - problems.append('We need boost::noncopyable') if not conf.CheckCXXHeader('boost/lexical_cast.hpp'): problems.append('We need boost::lexical_cast') if not conf.CheckCXXHeader('boost/format.hpp'): diff --git a/doc/technical/howto/UsingBoost.txt b/doc/technical/howto/UsingBoost.txt index 23c8de128..3c5e70ec5 100644 --- a/doc/technical/howto/UsingBoost.txt +++ b/doc/technical/howto/UsingBoost.txt @@ -54,41 +54,6 @@ source code comment near the static assertion statement to help solving the actu Relevant Bosst extensions ~~~~~~~~~~~~~~~~~~~~~~~~~ -.noncopyable -Inheriting from `boost::noncoypable` inhibits any copy, assignment and copy construction. It's a highly -recommended practice _by default to use that for every new class you create_ -- unless you know for sure -your class is going to have _value semantics_. The C++ language has kind of a ``fixation'' on value -semantics, passing objects by value, and the language adds a lot of magic on that behalf. Which might lead -to surprising results if you aren't aware of the fine details. - -.type traits -Boost provides a very elaborate collection of type trait templates, allowing to ``detect'' several -properties of a given type at compile time. Since C++ has no reflection and only a very weak introspection -feature (RTTI, run time type information), using these type traits is often indispensable. - -.enable_if -a simple but ingenious metaprogramming trick, allowing to control precisely in which cases the compiler -shall pick a specific class or function template specialisation. Basically this allows to control the -code generation, based on some type traits or other (metaprogramming) predicates you provide. Again, -since C++ is lacking introspection features, we're frequently forced to resort to metaprogramming -techniques, i.e to influence the way the compiler translates our code from within that very code. - -.metaprogramming library -A very elaborate, and sometimes mind-bending library and framework. While heavily used within -Boost to build the more advanced features, it seems too complicated and esoteric for general purpose -and everyday use. Code written using the MPL tends to be very abstract and almost unreadable for -people without math background. In Lumiera, we _try to avoid using MPL directly._ Instead, we -supplement some metaprogramming helpers (type lists and tuples), written in a simple LISP style, -which -- hopefully -- should be decipherable without having to learn an abstract academic -terminology and framework. - -.lambda -In a similar vein, the `boost::lambda` library might be worth exploring a bit, yet doesn't add -much value in practical use. It is stunning to see how this library adds the capability to define -real _lambda expressions_ on-the-fly, but since C++ was never designed for language extensions of -that kind, using lambda in practice is surprisingly tricky, sometimes even obscure and rarely -not worth the hassle. (An notable exception might be when it comes to defining parser combinators) - .operators The `boost::operators` library allows to build families of types/objects with consistent algebraic properties. Especially, it eases building _equality comparable_, _totally ordered_, @@ -109,6 +74,15 @@ quite some compilation overhead and size impact (-> see our own link:http://git.lumiera.org/gitweb?p=lumiera/ichthyo;a=blob;f=src/lib/format-string.hpp;h=716aa0e3d23f09269973b7659910d74b3ee334ea;hb=37384f1b681f5bbfa7dc4d50b8588ed801fbddb3[formatting front-end] to reduce this overhead) +.metaprogramming library +A very elaborate, and sometimes mind-bending library and framework. While heavily used within +Boost to build the more advanced features, it seems too complicated and esoteric for general purpose +and everyday use. Code written using the MPL tends to be very abstract and almost unreadable for +people without math background. In Lumiera, we _try to avoid using MPL directly._ Instead, we +supplement some metaprogramming helpers (type lists and tuples), written in a simple LISP style, +which -- hopefully -- should be decipherable without having to learn an abstract academic +terminology and framework. + .variant and any These library provide a nice option for building data structures able to hold a mixture of multiple types, especially types not directly related to each other. `boost::variant` is a diff --git a/src/backend/engine/job.h b/src/backend/engine/job.h index cd77fcb7f..d294878d3 100644 --- a/src/backend/engine/job.h +++ b/src/backend/engine/job.h @@ -213,7 +213,7 @@ namespace engine { */ class JobClosure : public lumiera_jobClosure - , boost::noncopyable // ....has distinct identity and stable address + , util::NonCopyable // ....has distinct identity and stable address { public: virtual ~JobClosure(); ///< this is an interface diff --git a/src/backend/engine/scheduler-diagnostics.hpp b/src/backend/engine/scheduler-diagnostics.hpp index efa01a85d..2e9b83708 100644 --- a/src/backend/engine/scheduler-diagnostics.hpp +++ b/src/backend/engine/scheduler-diagnostics.hpp @@ -38,13 +38,11 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/hash-value.h" #include "lib/time/timevalue.hpp" #include "backend/engine/scheduler-frontend.hpp" -#include -//#include - namespace backend{ namespace engine { @@ -68,7 +66,7 @@ namespace engine { * of SchedulerDiagnostics may be used. */ class SchedulerDiagnostics - : boost::noncopyable + : util::NonCopyable { SchedulerFrontend& scheduler_; diff --git a/src/backend/real-clock.hpp b/src/backend/real-clock.hpp index b17efd4ae..a227aa6ae 100644 --- a/src/backend/real-clock.hpp +++ b/src/backend/real-clock.hpp @@ -49,7 +49,6 @@ //#include "lib/iter-source.hpp" //#include "lib/sync.hpp" -//#include //#include //#include //#include diff --git a/src/backend/thread-wrapper.hpp b/src/backend/thread-wrapper.hpp index f6b264906..76ae00792 100644 --- a/src/backend/thread-wrapper.hpp +++ b/src/backend/thread-wrapper.hpp @@ -41,6 +41,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/logging.h" #include "lib/meta/function.hpp" #include "lib/result.hpp" @@ -107,6 +108,7 @@ namespace backend { * If this doesn't happen, you'll block forever. */ class Thread + : util::MoveOnly { /** @internal perfect forwarding through a C-style `void*` */ template @@ -179,14 +181,6 @@ namespace backend { public: - // Threads can be moved only - Thread (Thread &&) = default; - - // Threads must not be copied and assigned - Thread (Thread const&) = delete; - Thread& operator= (Thread &&) = delete; - Thread& operator= (Thread const&) = delete; - /** Create a new thread to execute the given operation. * The new thread starts up synchronously, can't be cancelled and it can't be joined. * @param purpose fixed char string used to denote the thread for diagnostics diff --git a/src/common/advice.hpp b/src/common/advice.hpp index a188b6610..b8e31541e 100644 --- a/src/common/advice.hpp +++ b/src/common/advice.hpp @@ -95,14 +95,13 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/null-value.hpp" #include "lib/symbol.hpp" #include "lib/util.hpp" #include "common/advice/binding.hpp" -#include - namespace lumiera{ namespace advice { @@ -315,7 +314,7 @@ namespace advice { template class ActiveProvision : public PointOfAdvice - , boost::noncopyable + , util::NonCopyable { AD theAdvice_; diff --git a/src/common/advice/advice.cpp b/src/common/advice/advice.cpp index 23e10bf1a..8e1543cd9 100644 --- a/src/common/advice/advice.cpp +++ b/src/common/advice/advice.cpp @@ -90,6 +90,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/del-stash.hpp" #include "lib/depend.hpp" #include "lib/symbol.hpp" @@ -99,7 +100,6 @@ #include "common/advice.hpp" #include "common/advice/index.hpp" -#include using lib::Literal; using lib::DelStash; @@ -121,7 +121,7 @@ namespace advice { */ class AdviceSystem : public lib::Sync<> - , boost::noncopyable + , util::NonCopyable { DelStash adviceDataRegistry_; diff --git a/src/common/appstate.hpp b/src/common/appstate.hpp index b68b47f29..1490afcd7 100644 --- a/src/common/appstate.hpp +++ b/src/common/appstate.hpp @@ -41,11 +41,11 @@ #define LUMIERA_APPSTATE_H #include "lib/symbol.hpp" +#include "lib/nocopy.hpp" #include "common/option.hpp" #include "common/subsys.hpp" #include "common/basic-setup.hpp" -#include #include #include #include @@ -55,7 +55,6 @@ namespace lumiera { using std::string; - using boost::noncopyable; class SubsystemRunner; @@ -68,7 +67,7 @@ namespace lumiera { * @warning don't use AppState in destructors. */ class AppState - : private noncopyable + : util::NonCopyable { private: AppState (); diff --git a/src/common/basic-setup.hpp b/src/common/basic-setup.hpp index c018e2389..5dbdb2622 100644 --- a/src/common/basic-setup.hpp +++ b/src/common/basic-setup.hpp @@ -55,10 +55,10 @@ #include "lib/error.hpp" #include "lib/symbol.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" #include -#include #include @@ -95,7 +95,7 @@ namespace lumiera { * @see AppState */ class BasicSetup - : boost::noncopyable + : util::NonCopyable { opt::options_description syntax; opt::variables_map settings; diff --git a/src/common/guifacade.cpp b/src/common/guifacade.cpp index ec69b2c6c..bde729f1e 100644 --- a/src/common/guifacade.cpp +++ b/src/common/guifacade.cpp @@ -57,7 +57,7 @@ namespace gui { /** load and start the GUI as a plugin */ struct GuiRunner - : boost::noncopyable + : util::NonCopyable { typedef InstanceHandle GuiHandle; diff --git a/src/common/instancehandle.hpp b/src/common/instancehandle.hpp index 08f26e7b5..e69e5d0c0 100644 --- a/src/common/instancehandle.hpp +++ b/src/common/instancehandle.hpp @@ -43,6 +43,7 @@ #include "include/logging.h" #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/interfaceproxy.hpp" extern "C" { @@ -50,7 +51,6 @@ extern "C" { #include "common/interfaceregistry.h" } -#include #include @@ -118,7 +118,7 @@ namespace lumiera { */ template struct Link - : boost::noncopyable + : util::NonCopyable { typedef InstanceHandle IH; @@ -140,7 +140,7 @@ namespace lumiera { */ template struct Link - : boost::noncopyable + : util::NonCopyable { typedef InstanceHandle IH; @@ -174,7 +174,7 @@ namespace lumiera { , class FA = I ///< facade interface type to be used by clients > class InstanceHandle - : private boost::noncopyable + : util::NonCopyable { LumieraInterface desc_; I* instance_; diff --git a/src/common/interface-facade-link.hpp b/src/common/interface-facade-link.hpp index 2811043ac..7ba6704c5 100644 --- a/src/common/interface-facade-link.hpp +++ b/src/common/interface-facade-link.hpp @@ -51,11 +51,11 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/meta/util.hpp" #include "include/interfaceproxy.hpp" #include "lib/symbol.hpp" -#include @@ -83,7 +83,7 @@ namespace facade { template class InterfaceFacadeLink : protected Accessor - , boost::noncopyable + , util::NonCopyable { string displayName_; diff --git a/src/common/option.hpp b/src/common/option.hpp index e03f4e19d..432a41821 100644 --- a/src/common/option.hpp +++ b/src/common/option.hpp @@ -74,7 +74,7 @@ namespace lumiera { * unrecognised parts. */ class Option - : boost::noncopyable + : util::NonCopyable { public: Option (lib::Cmdline& cmdline); diff --git a/src/common/query.hpp b/src/common/query.hpp index 55347b3a3..34196fdfa 100644 --- a/src/common/query.hpp +++ b/src/common/query.hpp @@ -123,7 +123,7 @@ namespace lumiera { * of the type of query. */ class Goal - : util::no_copy_by_client + : util::Cloneable { public: virtual ~Goal(); ///< this is a marker baseclass diff --git a/src/common/query/defs-manager.hpp b/src/common/query/defs-manager.hpp index f941249d1..a61817bfb 100644 --- a/src/common/query/defs-manager.hpp +++ b/src/common/query/defs-manager.hpp @@ -96,9 +96,9 @@ #include "lib/p.hpp" +#include "lib/nocopy.hpp" #include "common/query.hpp" -#include #include @@ -127,7 +127,8 @@ namespace query { * roughly final, as of 12/09 most of the actual object * handling is placeholder code. */ - class DefsManager : private boost::noncopyable + class DefsManager + : util::NonCopyable { unique_ptr defsRegistry_; diff --git a/src/common/query/defs-registry.hpp b/src/common/query/defs-registry.hpp index dbc9cbde7..e694636df 100644 --- a/src/common/query/defs-registry.hpp +++ b/src/common/query/defs-registry.hpp @@ -55,11 +55,11 @@ #include "lib/format-string.hpp" #include "lib/query-util.hpp" #include "common/query.hpp" +#include "lib/nocopy.hpp" #include #include #include -#include namespace lumiera{ @@ -193,7 +193,7 @@ namespace query { * exact behaviour has to be defined. */ class DefsRegistry - : boost::noncopyable + : util::NonCopyable { Table table_; diff --git a/src/common/query/query-resolver.hpp b/src/common/query/query-resolver.hpp index 288cde2b2..52ea1f231 100644 --- a/src/common/query/query-resolver.hpp +++ b/src/common/query/query-resolver.hpp @@ -37,8 +37,8 @@ #include "lib/iter-adapter.hpp" #include "common/query.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -47,7 +47,6 @@ using std::function; namespace lumiera { - using boost::noncopyable; using std::unique_ptr; using std::string; @@ -65,7 +64,7 @@ namespace lumiera { * of an individual query resolution */ class Resolution - : boost::noncopyable + : util::NonCopyable { public: typedef Goal::Result Result; @@ -106,7 +105,7 @@ namespace lumiera { * Thus the implementation might downcast query and resultset. */ class QueryResolver - : noncopyable + : util::NonCopyable { unique_ptr dispatcher_; diff --git a/src/common/subsys.hpp b/src/common/subsys.hpp index aabad653b..33fe237ce 100644 --- a/src/common/subsys.hpp +++ b/src/common/subsys.hpp @@ -44,8 +44,8 @@ #define LUMIERA_SUBSYS_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -55,7 +55,6 @@ namespace lumiera { using std::string; - using boost::noncopyable; using std::function; class Option; @@ -69,7 +68,7 @@ namespace lumiera { * @note synchronisation is up to the implementor. */ class Subsys - : private noncopyable + : util::NonCopyable { public: typedef function SigTerm; diff --git a/src/gui/ctrl/actions.hpp b/src/gui/ctrl/actions.hpp index 772e11d1e..1cf4d3539 100644 --- a/src/gui/ctrl/actions.hpp +++ b/src/gui/ctrl/actions.hpp @@ -47,8 +47,8 @@ #include "gui/workspace/workspace-window.hpp" #include "gui/workspace/panel-manager.hpp" #include "lib/format-string.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -74,7 +74,7 @@ namespace ctrl { * user action events. */ class Actions - : boost::noncopyable + : util::NonCopyable { GlobalCtx& globalCtx_; diff --git a/src/gui/ctrl/bus-term.hpp b/src/gui/ctrl/bus-term.hpp index 9aae4415d..b2deb406d 100644 --- a/src/gui/ctrl/bus-term.hpp +++ b/src/gui/ctrl/bus-term.hpp @@ -60,10 +60,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/idi/entry-id.hpp" #include "lib/diff/gen-node.hpp" -#include #include #include @@ -103,6 +103,7 @@ namespace ctrl{ * some element. */ class BusTerm + : util::MoveOnly { protected: using EntryID = lib::idi::BareEntryID; @@ -135,9 +136,6 @@ namespace ctrl{ /** may be moved, but not copied, * due to the embedded identity */ BusTerm(BusTerm&&) = default; - BusTerm(BusTerm const&) = delete; - - BusTerm& operator= (BusTerm const&) = delete; protected: /** diff --git a/src/gui/ctrl/core-service.hpp b/src/gui/ctrl/core-service.hpp index 19b39d86b..61cb7775a 100644 --- a/src/gui/ctrl/core-service.hpp +++ b/src/gui/ctrl/core-service.hpp @@ -81,6 +81,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/idi/entry-id.hpp" #include "lib/diff/gen-node.hpp" #include "include/session-command-facade.h" @@ -88,8 +89,6 @@ #include "gui/ctrl/bus-term.hpp" #include "gui/ctrl/nexus.hpp" -#include - namespace gui { namespace ctrl{ @@ -107,7 +106,7 @@ namespace ctrl{ */ class CoreService : public BusTerm - , boost::noncopyable + , util::NonCopyable { Nexus uiBusBackbone_; diff --git a/src/gui/ctrl/facade.hpp b/src/gui/ctrl/facade.hpp index 173cd8b62..b380b71bd 100644 --- a/src/gui/ctrl/facade.hpp +++ b/src/gui/ctrl/facade.hpp @@ -43,8 +43,8 @@ #define GUI_CTRL_FACADE_H #include "gui/notification-service.hpp" +#include "lib/nocopy.hpp" -#include namespace gui { @@ -59,7 +59,7 @@ namespace ctrl { * @remark the UiManager is responsible to activate and deactivate those interfaces */ class Facade - : boost::noncopyable + : util::NonCopyable { NotificationService notificationService_; diff --git a/src/gui/ctrl/global-ctx.hpp b/src/gui/ctrl/global-ctx.hpp index d32d1f20e..36f728f79 100644 --- a/src/gui/ctrl/global-ctx.hpp +++ b/src/gui/ctrl/global-ctx.hpp @@ -59,8 +59,8 @@ #include "gui/ctrl/window-locator.hpp" #include "gui/interact/wizard.hpp" #include "gui/interact/interaction-director.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -80,7 +80,7 @@ namespace ctrl { * @remark the UiManager is responsible to install this top-level context */ class GlobalCtx - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/ctrl/nexus.hpp b/src/gui/ctrl/nexus.hpp index d76a4e23a..3d6a93a9f 100644 --- a/src/gui/ctrl/nexus.hpp +++ b/src/gui/ctrl/nexus.hpp @@ -41,6 +41,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/idi/genfunc.hpp" #include "lib/diff/mutation-message.hpp" #include "lib/diff/tree-diff-application.hpp" @@ -48,7 +49,6 @@ #include "gui/model/tangible.hpp" #include "lib/idi/entry-id.hpp" -#include #include @@ -75,7 +75,7 @@ namespace ctrl{ */ class Nexus : public BusTerm - , boost::noncopyable + , util::NonCopyable { typedef std::unordered_map RoutingTable; diff --git a/src/gui/ctrl/panel-locator.hpp b/src/gui/ctrl/panel-locator.hpp index 5a64596e4..a618e4901 100644 --- a/src/gui/ctrl/panel-locator.hpp +++ b/src/gui/ctrl/panel-locator.hpp @@ -36,8 +36,8 @@ #define GUI_CTRL_PANEL_LOCATOR_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -57,7 +57,7 @@ namespace ctrl { * located within the top-level windows. */ class PanelLocator - : boost::noncopyable + : util::NonCopyable { using PWindow = std::shared_ptr; using WindowList = list; diff --git a/src/gui/ctrl/playback-controller.hpp b/src/gui/ctrl/playback-controller.hpp index c55a1e733..e745875a4 100644 --- a/src/gui/ctrl/playback-controller.hpp +++ b/src/gui/ctrl/playback-controller.hpp @@ -42,8 +42,8 @@ #include "gui/gtk-base.hpp" #include "include/dummy-player-facade.h" #include "include/display-facade.h" +#include "lib/nocopy.hpp" -#include namespace gui { @@ -53,7 +53,7 @@ namespace ctrl { /** @deprecated we need a durable design for the playback process */ class PlaybackController - : boost::noncopyable + : util::NonCopyable { volatile bool playing_; diff --git a/src/gui/ctrl/state-manager.hpp b/src/gui/ctrl/state-manager.hpp index 0362fd7d3..7f2546a58 100644 --- a/src/gui/ctrl/state-manager.hpp +++ b/src/gui/ctrl/state-manager.hpp @@ -55,8 +55,8 @@ #include "lib/idi/entry-id.hpp" #include "lib/diff/gen-node.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -77,7 +77,7 @@ namespace ctrl { * element. */ class StateManager - : boost::noncopyable + : util::NonCopyable { protected: virtual ~StateManager(); ///< this is an interface diff --git a/src/gui/ctrl/state-map-grouping-storage.hpp b/src/gui/ctrl/state-map-grouping-storage.hpp index c20184a9a..31025ae74 100644 --- a/src/gui/ctrl/state-map-grouping-storage.hpp +++ b/src/gui/ctrl/state-map-grouping-storage.hpp @@ -38,11 +38,11 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/idi/entry-id.hpp" #include "lib/diff/gen-node.hpp" #include "lib/util.hpp" -#include #include #include #include @@ -72,7 +72,7 @@ namespace ctrl { * @see StateMapGroupingStorage_test */ class StateMapGroupingStorage - : boost::noncopyable + : util::NonCopyable { using StateData = std::set; using Storage = std::unordered_map; diff --git a/src/gui/ctrl/ui-dispatcher.hpp b/src/gui/ctrl/ui-dispatcher.hpp index e48d1247b..38eb70e23 100644 --- a/src/gui/ctrl/ui-dispatcher.hpp +++ b/src/gui/ctrl/ui-dispatcher.hpp @@ -78,8 +78,8 @@ #include "gui/gtk-base.hpp" #include "lib/call-queue.hpp" #include "lib/format-string.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -109,7 +109,7 @@ namespace ctrl { * it outlives the GTK event loop */ class UiDispatcher - : boost::noncopyable + : util::NonCopyable { lib::CallQueue queue_; Glib::Dispatcher dispatcher_; diff --git a/src/gui/ctrl/ui-manager.hpp b/src/gui/ctrl/ui-manager.hpp index fa28a51ac..4a17512ef 100644 --- a/src/gui/ctrl/ui-manager.hpp +++ b/src/gui/ctrl/ui-manager.hpp @@ -48,8 +48,8 @@ #define GUI_CTRL_UI_MANAGER_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -72,7 +72,7 @@ namespace ctrl { /** Framework initialisation base */ class ApplicationBase - : boost::noncopyable + : util::NonCopyable { protected: ApplicationBase(); diff --git a/src/gui/ctrl/ui-state.hpp b/src/gui/ctrl/ui-state.hpp index 87ee14a71..2cbb6859f 100644 --- a/src/gui/ctrl/ui-state.hpp +++ b/src/gui/ctrl/ui-state.hpp @@ -55,8 +55,8 @@ #define GUI__H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -82,7 +82,7 @@ namespace ctrl { * @todo initial draft as of 2/2017 -- actual implementation has to be filled in */ class UiState - : boost::noncopyable + : util::NonCopyable { StateManager& stateManager_; interact::FocusTracker& tracker_; diff --git a/src/gui/ctrl/window-locator.hpp b/src/gui/ctrl/window-locator.hpp index d1879340e..43c7d76c6 100644 --- a/src/gui/ctrl/window-locator.hpp +++ b/src/gui/ctrl/window-locator.hpp @@ -37,8 +37,8 @@ #include "gui/gtk-base.hpp" #include "gui/ctrl/panel-locator.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -61,7 +61,7 @@ namespace ctrl { * A centralised manager of all top level application windows. */ class WindowLocator - : boost::noncopyable + : util::NonCopyable { using PWindow = std::shared_ptr; diff --git a/src/gui/demo-gui-roundtrip.cpp b/src/gui/demo-gui-roundtrip.cpp index 77c217dc6..2bd2181cc 100644 --- a/src/gui/demo-gui-roundtrip.cpp +++ b/src/gui/demo-gui-roundtrip.cpp @@ -43,8 +43,8 @@ #include "lib/depend.hpp" #include "gui/ui-bus.hpp" #include "gui/ctrl/ui-manager.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -77,7 +77,7 @@ namespace gui { * @see CallQueue_test */ class DemoGuiRoundtrip - : boost::noncopyable + : util::NonCopyable { string nothing_; diff --git a/src/gui/display-service.hpp b/src/gui/display-service.hpp index e7750bb3f..9b753c464 100644 --- a/src/gui/display-service.hpp +++ b/src/gui/display-service.hpp @@ -55,10 +55,10 @@ #include "lib/singleton-ref.hpp" #include "lib/scoped-ptrvect.hpp" #include "include/logging.h" +#include "lib/nocopy.hpp" #include #include -#include #include #include @@ -84,7 +84,7 @@ namespace gui { */ class DisplayerSlot : public lumiera_displaySlot, - boost::noncopyable + util::NonCopyable { Dispatcher dispatcher_; FrameSignal hasFrame_; @@ -128,7 +128,7 @@ namespace gui { * course of the play process for outputting frames. */ class DisplayService - : boost::noncopyable + : util::NonCopyable { string error_; diff --git a/src/gui/gtk-lumiera.cpp b/src/gui/gtk-lumiera.cpp index a566b3de1..ae5cf9390 100644 --- a/src/gui/gtk-lumiera.cpp +++ b/src/gui/gtk-lumiera.cpp @@ -55,13 +55,13 @@ #include "gui/display-service.hpp" #include "backend/thread-wrapper.hpp" #include "common/subsys.hpp" +#include "lib/nocopy.hpp" extern "C" { #include "common/interface.h" #include "common/interface-descriptor.h" } -#include #include @@ -89,7 +89,7 @@ namespace gui { * open other interfaces here...) ///////////////////////////TICKET #82 */ class GtkLumiera - : boost::noncopyable + : util::NonCopyable { UiBus uiBus_; UiManager uiManager_; diff --git a/src/gui/guifacade.hpp b/src/gui/guifacade.hpp index ce8318088..67958a343 100644 --- a/src/gui/guifacade.hpp +++ b/src/gui/guifacade.hpp @@ -39,12 +39,12 @@ #include "common/subsys.hpp" +#include "lib/nocopy.hpp" extern "C" { #include "common/interface.h" } -#include namespace gui { @@ -77,7 +77,7 @@ namespace gui { * */ class GuiFacade - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/interact/cmd-context.cpp b/src/gui/interact/cmd-context.cpp index c9f9c7f88..b95c7bece 100644 --- a/src/gui/interact/cmd-context.cpp +++ b/src/gui/interact/cmd-context.cpp @@ -34,7 +34,6 @@ //#include "include/logging.h" #include "gui/interact/cmd-context.hpp" -//#include //#include //#include diff --git a/src/gui/interact/cmd-context.hpp b/src/gui/interact/cmd-context.hpp index f82541813..5adbdb279 100644 --- a/src/gui/interact/cmd-context.hpp +++ b/src/gui/interact/cmd-context.hpp @@ -55,13 +55,13 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" //#include "gui/ctrl/bus-term.hpp" //#include "lib/idi/entry-id.hpp" #include "lib/hash-indexed.hpp" #include "lib/symbol.hpp" //#include "lib/util.hpp" -#include #include @@ -81,7 +81,7 @@ namespace interact { * @todo write type comment... */ class CmdContext - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/interact/focus-tracker.hpp b/src/gui/interact/focus-tracker.hpp index dd1dd1c08..862194e6c 100644 --- a/src/gui/interact/focus-tracker.hpp +++ b/src/gui/interact/focus-tracker.hpp @@ -55,8 +55,8 @@ #define GUI_INTERACT_FOCUS_TRACKER_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -81,7 +81,7 @@ namespace interact { * @todo initial draft as of 2/2017 -- actual implementation has to be filled in */ class FocusTracker - : boost::noncopyable + : util::NonCopyable { Navigator& navigator_; diff --git a/src/gui/interact/interaction-director.hpp b/src/gui/interact/interaction-director.hpp index 84067ae8b..b75213dbf 100644 --- a/src/gui/interact/interaction-director.hpp +++ b/src/gui/interact/interaction-director.hpp @@ -56,7 +56,6 @@ //#include "gui/gtk-base.hpp" #include "gui/model/controller.hpp" -//#include //#include //#include #include diff --git a/src/gui/interact/interaction-state.cpp b/src/gui/interact/interaction-state.cpp index 427ac6b20..1f70fc529 100644 --- a/src/gui/interact/interaction-state.cpp +++ b/src/gui/interact/interaction-state.cpp @@ -34,7 +34,6 @@ //#include "include/logging.h" #include "gui/interact/interaction-state.hpp" -//#include //#include //#include diff --git a/src/gui/interact/interaction-state.hpp b/src/gui/interact/interaction-state.hpp index 2c176b2d7..0c287d336 100644 --- a/src/gui/interact/interaction-state.hpp +++ b/src/gui/interact/interaction-state.hpp @@ -39,12 +39,12 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "gui/ctrl/bus-term.hpp" #include "lib/idi/entry-id.hpp" //#include "lib/symbol.hpp" //#include "lib/util.hpp" -#include #include @@ -59,9 +59,10 @@ namespace interact { /** * Abstract foundation of UI state tracking components. * @todo write type comment... + * ///////////////////////////////////TODO do we need a translation unit interaction-state.cpp (otherwise delete it!) */ class InteractionState - : boost::noncopyable + : util::NonCopyable { protected: diff --git a/src/gui/interact/navigator.hpp b/src/gui/interact/navigator.hpp index 475e49802..93b80603f 100644 --- a/src/gui/interact/navigator.hpp +++ b/src/gui/interact/navigator.hpp @@ -40,8 +40,8 @@ #include "gui/gtk-base.hpp" #include "gui/interact/ui-coord-resolver.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -66,7 +66,7 @@ namespace interact { */ class Navigator : public LocationQuery - , boost::noncopyable + , util::NonCopyable { SpotLocator& spotLocator_; ViewLocator& viewLocator_; diff --git a/src/gui/interact/spot-locator.hpp b/src/gui/interact/spot-locator.hpp index 98f92f967..fe5ccbef9 100644 --- a/src/gui/interact/spot-locator.hpp +++ b/src/gui/interact/spot-locator.hpp @@ -40,8 +40,8 @@ #define GUI_INTERACT_SPOT_LOCATOR_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -62,7 +62,7 @@ namespace interact { * @todo initial draft as of 2/2017 -- actual implementation has to be filled in */ class SpotLocator - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/interact/ui-coord.hpp b/src/gui/interact/ui-coord.hpp index daab564cb..6d3f4fabb 100644 --- a/src/gui/interact/ui-coord.hpp +++ b/src/gui/interact/ui-coord.hpp @@ -85,6 +85,7 @@ #include "lib/error.hpp" #include "lib/symbol.hpp" #include "lib/path-array.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" #include @@ -500,6 +501,7 @@ namespace interact { class LocationClause; class UICoord::Builder + : util::MoveOnly { protected: UICoord uic_; @@ -510,10 +512,6 @@ namespace interact { Builder (UICoord && anonRef) : uic_{std::move(anonRef)} { } Builder (UICoord const& base) : uic_{base} { } - Builder (Builder const&) = delete; - Builder& operator= (Builder const&) = delete; - Builder& operator= (Builder &&) = delete; - /** builder instances created by UICoord */ friend class UICoord; diff --git a/src/gui/interact/ui-location-solver.hpp b/src/gui/interact/ui-location-solver.hpp index b8e356d96..a1f8c216c 100644 --- a/src/gui/interact/ui-location-solver.hpp +++ b/src/gui/interact/ui-location-solver.hpp @@ -73,8 +73,8 @@ #include "lib/format-util.hpp" #include "gui/interact/ui-coord.hpp" #include "gui/interact/ui-coord-resolver.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -103,7 +103,7 @@ namespace interact { * @todo maybe add a flag to require the current query goal to exist in tree //////////////////////////////TICKET #1130 */ struct LocationClause - : boost::noncopyable + : util::NonCopyable { UICoord pattern; bool createParents; @@ -129,7 +129,7 @@ namespace interact { * in order and the first successfully matched clause wins. */ class LocationRule - : boost::noncopyable + : util::NonCopyable { using Clauses = std::vector; @@ -233,7 +233,7 @@ namespace interact { * @see UILocationResolver_test::simple_usage_example() */ class UILocationSolver - : boost::noncopyable + : util::NonCopyable { LocationQueryAccess getLocationQuery; diff --git a/src/gui/interact/view-locator.hpp b/src/gui/interact/view-locator.hpp index 762245bbf..7ce49285b 100644 --- a/src/gui/interact/view-locator.hpp +++ b/src/gui/interact/view-locator.hpp @@ -59,8 +59,8 @@ #include "gui/gtk-base.hpp" #include "gui/interact/view-spec-dsl.hpp" #include "gui/id-scheme.hpp" +#include "lib/nocopy.hpp" -#include #include //#include #include @@ -87,7 +87,7 @@ namespace interact { * @todo initial draft as of 9/2017 -- actual implementation need to be filled in */ class ViewLocator - : boost::noncopyable + : util::NonCopyable { ctrl::GlobalCtx& globals_; unique_ptr locResolver_; diff --git a/src/gui/interact/wizard.hpp b/src/gui/interact/wizard.hpp index 8d7fed8c8..f134d62ef 100644 --- a/src/gui/interact/wizard.hpp +++ b/src/gui/interact/wizard.hpp @@ -43,8 +43,8 @@ #define GUI_INTERACT_WIZARD_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -69,7 +69,7 @@ namespace interact { * @todo initial draft as of 2/2017 -- actual implementation has to be filled in */ class Wizard - : boost::noncopyable + : util::NonCopyable { ctrl::GlobalCtx& globalCtx_; diff --git a/src/gui/interact/work-site-trail.hpp b/src/gui/interact/work-site-trail.hpp index 698dee13f..c136696a4 100644 --- a/src/gui/interact/work-site-trail.hpp +++ b/src/gui/interact/work-site-trail.hpp @@ -41,8 +41,8 @@ #define GUI_INTERACT_WORK_SITE_TRAIL_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -63,7 +63,7 @@ namespace interact { * @todo initial draft as of 2/2017 -- actual implementation has to be filled in */ class WorkSiteTrail - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/interact/work-site.hpp b/src/gui/interact/work-site.hpp index 7d06546ec..ac7a69da3 100644 --- a/src/gui/interact/work-site.hpp +++ b/src/gui/interact/work-site.hpp @@ -46,8 +46,8 @@ #define GUI_INTERACT_WORK_SITE_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include //#include //#include @@ -70,7 +70,7 @@ namespace interact { * @todo initial draft as of 2/2017 -- actual implementation has to be filled in */ class WorkSite - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/model/diagnostics.hpp b/src/gui/model/diagnostics.hpp index 7019501d1..c2f359bc1 100644 --- a/src/gui/model/diagnostics.hpp +++ b/src/gui/model/diagnostics.hpp @@ -39,10 +39,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" //#include "lib/symbol.hpp" //#include "lib/util.hpp" -#include //#include @@ -64,7 +64,7 @@ namespace model { * @see NA_test */ class Diagnostics - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/gui/model/element.hpp b/src/gui/model/element.hpp index 24a7cdb06..e65a3ea93 100644 --- a/src/gui/model/element.hpp +++ b/src/gui/model/element.hpp @@ -43,11 +43,11 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/hash-value.h" //#include "lib/symbol.hpp" #include "lib/util.hpp" -#include #include diff --git a/src/gui/model/session-facade.cpp b/src/gui/model/session-facade.cpp index 2a457ccf7..d8b6d332c 100644 --- a/src/gui/model/session-facade.cpp +++ b/src/gui/model/session-facade.cpp @@ -41,7 +41,6 @@ #include "gui/model/session-facade.hpp" #include "lib/depend.hpp" -//#include //#include //#include diff --git a/src/gui/model/session-facade.hpp b/src/gui/model/session-facade.hpp index 7df641c2c..0bb26229d 100644 --- a/src/gui/model/session-facade.hpp +++ b/src/gui/model/session-facade.hpp @@ -39,10 +39,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" //#include "lib/symbol.hpp" //#include "lib/util.hpp" -#include #include @@ -61,7 +61,7 @@ namespace model { * @see NA_test */ class SessionFacade - : boost::noncopyable + : util::NonCopyable { string nothing_; diff --git a/src/gui/model/tangible.hpp b/src/gui/model/tangible.hpp index 4331035d3..fcaf2f1f9 100644 --- a/src/gui/model/tangible.hpp +++ b/src/gui/model/tangible.hpp @@ -131,12 +131,12 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "gui/ctrl/bus-term.hpp" #include "lib/diff/diff-mutable.hpp" #include "lib/idi/entry-id.hpp" #include "lib/symbol.hpp" -#include #include #include #include @@ -156,7 +156,7 @@ namespace model { * which is the [UI-Bus](ui-bus.hpp). Any tangible element acquires a distinct identity * and has to be formed starting from an already existing bus nexus. * @see [explanation of the basic interactions](tangible.hpp) - * @warning Tangible is `noncopyable` for good reason: the UI-Bus Nexus adds a direct + * @warning Tangible is `NonCopyable` for good reason: the UI-Bus Nexus adds a direct * reference into the routing table, tied to the given Tangible's ID (identity. * Consequently you must not store tangibles in STL containers, since these * might re-allocate and thus change the location in memory. @@ -164,7 +164,7 @@ namespace model { class Tangible : public sigc::trackable , public lib::diff::DiffMutable - , boost::noncopyable + , util::NonCopyable { public: using ID = ctrl::BusTerm::ID; diff --git a/src/gui/setting/asset-controller.hpp b/src/gui/setting/asset-controller.hpp index ca3b04cd8..fce280526 100644 --- a/src/gui/setting/asset-controller.hpp +++ b/src/gui/setting/asset-controller.hpp @@ -54,7 +54,6 @@ //#include "gui/gtk-base.hpp" #include "gui/model/controller.hpp" -//#include //#include //#include diff --git a/src/gui/ui-bus.hpp b/src/gui/ui-bus.hpp index f56c7f479..6455b9cfb 100644 --- a/src/gui/ui-bus.hpp +++ b/src/gui/ui-bus.hpp @@ -105,8 +105,8 @@ #include "gui/gtk-base.hpp" //////////////////////////////////////////////////////TODO remove any GTK dependency if possible #include "gui/ctrl/playback-controller.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -157,7 +157,7 @@ namespace gui { * and must not be accessed from anywhere else. */ class UiBus - : boost::noncopyable + : util::NonCopyable { unique_ptr coreService_; diff --git a/src/gui/widget/timeline/draw-strategy.hpp b/src/gui/widget/timeline/draw-strategy.hpp index 2fe308d5e..7cbb77d10 100644 --- a/src/gui/widget/timeline/draw-strategy.hpp +++ b/src/gui/widget/timeline/draw-strategy.hpp @@ -43,7 +43,7 @@ namespace timeline { /////////TODO some questions: ///////// 1) who is allowed to destroy DrawStrategy objects - ///////// 2) shouldn't DrawStragegy be boost::noncopyable? + ///////// 2) shouldn't DrawStragegy be util::NonCopyable? /** diff --git a/src/gui/widget/timeline/timeline-layout-helper.hpp b/src/gui/widget/timeline/timeline-layout-helper.hpp index a094e1da3..b9c9fe514 100644 --- a/src/gui/widget/timeline/timeline-layout-helper.hpp +++ b/src/gui/widget/timeline/timeline-layout-helper.hpp @@ -61,7 +61,7 @@ namespace gui { * @see gui::widget::TimelineWidget */ class TimelineLayoutHelper - : public boost::noncopyable + : util::NonCopyable { public: /** Definition of the layout track tree type.*/ diff --git a/src/gui/widget/timeline/timeline-state.hpp b/src/gui/widget/timeline/timeline-state.hpp index 35f60aab2..1cd2e0d3c 100644 --- a/src/gui/widget/timeline/timeline-state.hpp +++ b/src/gui/widget/timeline/timeline-state.hpp @@ -66,7 +66,7 @@ namespace gui { */ template class SelectionListener - : boost::noncopyable + : util::NonCopyable { sigc::signal valueChangedSignal_; diff --git a/src/gui/workspace/style-manager.hpp b/src/gui/workspace/style-manager.hpp index 14ab21c15..3330c64e5 100644 --- a/src/gui/workspace/style-manager.hpp +++ b/src/gui/workspace/style-manager.hpp @@ -37,8 +37,8 @@ #define GUI_WORKSPACE_STYLE_MANAGER_H #include "gui/gtk-base.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -64,7 +64,7 @@ namespace workspace { */ class StyleManager : public Gtk::UIManager - , boost::noncopyable + , util::NonCopyable { string iconSearchPath_; diff --git a/src/include/display-facade.h b/src/include/display-facade.h index 13e14eb90..c29900a83 100644 --- a/src/include/display-facade.h +++ b/src/include/display-facade.h @@ -54,7 +54,6 @@ #include "include/interfaceproxy.hpp" #include "lib/handle.hpp" -#include diff --git a/src/include/lifecycle.h b/src/include/lifecycle.h index da4c526b3..342e07207 100644 --- a/src/include/lifecycle.h +++ b/src/include/lifecycle.h @@ -41,7 +41,7 @@ #ifdef __cplusplus #include "lib/symbol.hpp" -#include +#include "lib/nocopy.hpp" @@ -74,7 +74,7 @@ namespace lumiera { * @note duplicate or repeated calls with the same callback are NOP */ class LifecycleHook - : private boost::noncopyable + : util::NonCopyable { public: typedef void (*Hook)(void); diff --git a/src/lib/allocation-cluster.hpp b/src/lib/allocation-cluster.hpp index 1a2928b37..f2e7e6d13 100644 --- a/src/lib/allocation-cluster.hpp +++ b/src/lib/allocation-cluster.hpp @@ -48,11 +48,11 @@ #define LIB_ALLOCATION_CLUSTER_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/sync-classlock.hpp" #include "lib/scoped-holder.hpp" #include "lib/scoped-holder-transfer.hpp" -#include #include @@ -88,7 +88,7 @@ namespace lib { * Is this issue worth the hassle? //////////////////////////////TICKET #169 */ class AllocationCluster - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/lib/call-queue.hpp b/src/lib/call-queue.hpp index 9be6e9483..1b20ee381 100644 --- a/src/lib/call-queue.hpp +++ b/src/lib/call-queue.hpp @@ -40,8 +40,8 @@ #include "lib/error.hpp" #include "lib/sync.hpp" #include "lib/iter-stack.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -56,7 +56,7 @@ namespace lib { * their concrete parameters into another thread for invocation. */ class CallQueue - : boost::noncopyable + : util::NonCopyable , public Sync<> { public: diff --git a/src/lib/del-stash.hpp b/src/lib/del-stash.hpp index 629b5da49..b263268e1 100644 --- a/src/lib/del-stash.hpp +++ b/src/lib/del-stash.hpp @@ -45,10 +45,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include #include -#include #include #include @@ -66,7 +66,7 @@ namespace lib { * @warning clients must not add a given object more than once */ class DelStash - : boost::noncopyable + : util::NonCopyable { typedef void KillFun(void*); diff --git a/src/lib/depend-inject.hpp b/src/lib/depend-inject.hpp index cd478abe0..47589cee6 100644 --- a/src/lib/depend-inject.hpp +++ b/src/lib/depend-inject.hpp @@ -36,6 +36,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/depend2.hpp" #include "lib/meta/function.hpp" #include "lib/sync-classlock.hpp" @@ -110,7 +111,7 @@ namespace lib { /** * Configuration handle to expose a service implementation through the `Depend` front-end. - * This noncopyable (but movable) handle shall be planted within the context operating the service + * This non-copyable (but movable) handle shall be planted within the context operating the service * to be exposed. It will immediately create (in RAII style) and manage a heap-allocated instance * of the subclass `IMP` and expose a baseclass pointer to this specific instance through `Depend`. * Moreover, the implementation subclass can be accessed through this handle, which acts as smart-ptr. @@ -122,6 +123,7 @@ namespace lib { */ template class ServiceInstance + : util::MoveOnly { std::unique_ptr instance_; @@ -139,10 +141,6 @@ namespace lib { deactivateServiceAccess(); } - ServiceInstance (ServiceInstance&&) = default; - ServiceInstance (ServiceInstance const&) = delete; - ServiceInstance& operator= (ServiceInstance&&) = delete; - explicit operator bool() const { @@ -167,7 +165,7 @@ namespace lib { /** * Configuration handle for temporarily shadowing a dependency by a test mock instance. - * This noncopyable (but movable) handle shall be planted within the immediate test context. + * This non-copyable (but movable) handle shall be planted within the immediate test context. * It immediately stashes away the existing state and configuration from `Depend`, but * waits for actual invocation of the `Depend`-front-end to create a heap-allocated * instance of the `MOC` subclass, which it manages and exposes like a smart-ptr. @@ -175,6 +173,7 @@ namespace lib { */ template class Local + : util::MoveOnly { std::unique_ptr mock_; @@ -205,10 +204,6 @@ namespace lib { restoreOriginalFactory (origInstance_, origFactory_); } - Local (Local&&) = default; - Local (Local const&) = delete; - Local& operator= (Local&&) = delete; - explicit operator bool() const { diff --git a/src/lib/depend2.hpp b/src/lib/depend2.hpp index abbbd64b0..3a3d16301 100644 --- a/src/lib/depend2.hpp +++ b/src/lib/depend2.hpp @@ -73,11 +73,11 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/nobug-init.hpp" #include "lib/sync-classlock.hpp" #include "lib/meta/util.hpp" -#include #include #include #include @@ -93,7 +93,7 @@ namespace lib { template class InstanceHolder - : boost::noncopyable + : util::NonCopyable { std::unique_ptr instance_; diff --git a/src/lib/dependency-factory.hpp b/src/lib/dependency-factory.hpp index 0afb5a693..7330e710b 100644 --- a/src/lib/dependency-factory.hpp +++ b/src/lib/dependency-factory.hpp @@ -145,7 +145,7 @@ namespace lib { */ template class InstanceHolder - : boost::noncopyable + : util::NonCopyable { /** storage for the service instance */ char buff_[sizeof(TAR)]; diff --git a/src/lib/diagnostic-context.hpp b/src/lib/diagnostic-context.hpp index 5d3167fee..0a0ba9045 100644 --- a/src/lib/diagnostic-context.hpp +++ b/src/lib/diagnostic-context.hpp @@ -46,9 +46,9 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/thread-local.hpp" -#include #include @@ -68,7 +68,7 @@ namespace lib { */ template class DiagnosticContext - : boost::noncopyable + : util::NonCopyable { typedef ThreadLocalPtr ThreadLocalAccess; typedef std::vector ValSequence; diff --git a/src/lib/diff/diff-language.hpp b/src/lib/diff/diff-language.hpp index 6229cb401..f4683c2a5 100644 --- a/src/lib/diff/diff-language.hpp +++ b/src/lib/diff/diff-language.hpp @@ -85,10 +85,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/verb-token.hpp" #include "lib/util.hpp" -#include #include @@ -285,7 +285,7 @@ namespace diff{ */ template class DiffApplicator - : boost::noncopyable + : util::NonCopyable { using Interpreter = DiffApplicationStrategy; diff --git a/src/lib/diff/list-diff-detector.hpp b/src/lib/diff/list-diff-detector.hpp index a185d07c9..5e0bc394b 100644 --- a/src/lib/diff/list-diff-detector.hpp +++ b/src/lib/diff/list-diff-detector.hpp @@ -61,8 +61,8 @@ #include "lib/diff/list-diff.hpp" #include "lib/diff/index-table.hpp" #include "lib/iter-adapter.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -85,7 +85,7 @@ namespace diff{ */ template class DiffDetector - : boost::noncopyable + : util::NonCopyable { using Val = typename SEQ::value_type; using Idx = IndexTable; diff --git a/src/lib/diff/record.hpp b/src/lib/diff/record.hpp index 1158ec304..0e2f8ce03 100644 --- a/src/lib/diff/record.hpp +++ b/src/lib/diff/record.hpp @@ -87,6 +87,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/iter-adapter.hpp" #include "lib/iter-adapter-stl.hpp" #include "lib/itertools.hpp" @@ -94,8 +95,6 @@ #include "lib/util.hpp" -#include - #include #include #include @@ -399,7 +398,7 @@ namespace diff{ template class Record::Mutator - : boost::noncopyable + : util::NonCopyable { using Rec = Record; diff --git a/src/lib/diff/test-mutation-target.hpp b/src/lib/diff/test-mutation-target.hpp index aacfbc61d..0b97a3896 100644 --- a/src/lib/diff/test-mutation-target.hpp +++ b/src/lib/diff/test-mutation-target.hpp @@ -53,9 +53,9 @@ #include "lib/format-string.hpp" #include "lib/format-util.hpp" #include "lib/test/event-log.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" -#include #include #include #include @@ -193,7 +193,7 @@ namespace diff{ * @see TreeMutatorBinding_test::mutateDummy() */ class TestMutationTarget - : boost::noncopyable + : util::NonCopyable { using VecG = std::vector; diff --git a/src/lib/diff/tree-diff-application.hpp b/src/lib/diff/tree-diff-application.hpp index 642cd9d09..e5e275495 100644 --- a/src/lib/diff/tree-diff-application.hpp +++ b/src/lib/diff/tree-diff-application.hpp @@ -153,7 +153,7 @@ namespace diff{ * TreeMutators dedicated to nested scopes */ class ScopeManager - : boost::noncopyable + : util::NonCopyable { public: virtual ~ScopeManager(); ///< this is an interface diff --git a/src/lib/diff/tree-mutator-collection-binding.hpp b/src/lib/diff/tree-mutator-collection-binding.hpp index 138a5854d..268effc16 100644 --- a/src/lib/diff/tree-mutator-collection-binding.hpp +++ b/src/lib/diff/tree-mutator-collection-binding.hpp @@ -52,6 +52,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/meta/trait.hpp" #include "lib/diff/gen-node.hpp" #include "lib/diff/tree-mutator.hpp" @@ -96,6 +97,7 @@ namespace diff{ */ template struct CollectionBinding + : util::MoveOnly { using Coll = typename Strip::TypeReferred; using Elm = typename Coll::value_type; @@ -128,10 +130,8 @@ namespace diff{ , openSub(u) { } - // allow move construction only, + // only move construction allowed, // to enable use of unique_ptr in collections - CollectionBinding(CollectionBinding&&) = default; - CollectionBinding(CollectionBinding&) = delete; @@ -172,7 +172,7 @@ namespace diff{ } - private: /* === technicallities of container access === */ + private: /* === Technicalities of container access === */ /** @internal technicality * Our iterator is actually a Lumiera RangeIter, and thus we need diff --git a/src/lib/diff/tree-mutator.hpp b/src/lib/diff/tree-mutator.hpp index f03ade540..4a5c0df61 100644 --- a/src/lib/diff/tree-mutator.hpp +++ b/src/lib/diff/tree-mutator.hpp @@ -94,6 +94,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/symbol.hpp" #include "lib/meta/trait.hpp" #include "lib/diff/gen-node.hpp" @@ -139,18 +140,15 @@ namespace diff{ * activities to concrete manipulations known within target scope. */ class TreeMutator + : util::MoveOnly { public: virtual ~TreeMutator(); ///< this is an interface - /** only allow default and move construction */ + // only default and move construction allowed TreeMutator () =default; TreeMutator (TreeMutator&&) =default; - TreeMutator (TreeMutator const&) =delete; - - TreeMutator& operator= (TreeMutator const&) =delete; - TreeMutator& operator= (TreeMutator&&) =delete; diff --git a/src/lib/format-string.hpp b/src/lib/format-string.hpp index a781f9ee3..079ba8067 100644 --- a/src/lib/format-string.hpp +++ b/src/lib/format-string.hpp @@ -106,10 +106,10 @@ #define UTIL_FORMAT_STRING_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/meta/util.hpp" #include "lib/meta/size-trait.hpp" -#include #include @@ -152,7 +152,7 @@ namespace util { * @see FormatString_test */ class _Fmt - : boost::noncopyable + : util::NonCopyable { /** size of an opaque implementation Buffer */ enum{ FORMATTER_SIZE = lib::meta::SizeTrait::BOOST_FORMAT }; diff --git a/src/lib/iter-source.hpp b/src/lib/iter-source.hpp index 318bbfe35..e3239aa4f 100644 --- a/src/lib/iter-source.hpp +++ b/src/lib/iter-source.hpp @@ -55,8 +55,8 @@ #include "lib/meta/util.hpp" #include "lib/iter-adapter.hpp" #include "lib/itertools.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -232,7 +232,7 @@ namespace lib { template> class WrappedLumieraIter : public ISO - , boost::noncopyable + , util::NonCopyable { IT src_; diff --git a/src/lib/iter-stack.hpp b/src/lib/iter-stack.hpp index 44c4c15aa..39220f291 100644 --- a/src/lib/iter-stack.hpp +++ b/src/lib/iter-stack.hpp @@ -245,7 +245,7 @@ namespace lib { * to prepare and pre-fill a sequence */ struct Builder - : util::no_copy_by_client + : util::Cloneable { Builder(IterQueue& initialElements) : queue_(initialElements) diff --git a/src/lib/lifecycleregistry.hpp b/src/lib/lifecycleregistry.hpp index 50f8947c3..5b9be4a10 100644 --- a/src/lib/lifecycleregistry.hpp +++ b/src/lib/lifecycleregistry.hpp @@ -40,8 +40,8 @@ #include "lib/util.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -50,7 +50,6 @@ namespace lumiera { - using boost::noncopyable; using util::contains; using std::function; using std::string; @@ -64,7 +63,7 @@ namespace lumiera { * to implement the lumiera lifecycle (init, shutdown) hooks. */ class LifecycleRegistry - : private noncopyable + : util::NonCopyable { public: typedef void (*Hook)(void); diff --git a/src/lib/linked-elements.hpp b/src/lib/linked-elements.hpp index 0b32e0f41..f4dfc186c 100644 --- a/src/lib/linked-elements.hpp +++ b/src/lib/linked-elements.hpp @@ -61,10 +61,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/iter-adapter.hpp" #include "lib/util.hpp" -#include #include @@ -315,7 +315,7 @@ namespace lib { , class ALO = linked_elements::OwningHeapAllocated > class LinkedElements - : boost::noncopyable + : util::NonCopyable , ALO { N* head_; diff --git a/src/lib/meta/tuple-record-init.hpp b/src/lib/meta/tuple-record-init.hpp index 28d0f0fe1..5ee885508 100644 --- a/src/lib/meta/tuple-record-init.hpp +++ b/src/lib/meta/tuple-record-init.hpp @@ -98,7 +98,7 @@ namespace meta { */ template struct GenNodeAccessor - : boost::noncopyable + : util::NonCopyable { template diff --git a/src/lib/meta/virtual-copy-support.hpp b/src/lib/meta/virtual-copy-support.hpp index 47720630f..ff3ae4877 100644 --- a/src/lib/meta/virtual-copy-support.hpp +++ b/src/lib/meta/virtual-copy-support.hpp @@ -45,7 +45,7 @@ ** - full copy support ** - copy construction but no assignment ** - only move construction allowed - ** - noncopyable type + ** - non-copyable type ** - we use type traits and a policy template to pick the correct implementation ** for a given data type. Any assignment or copy operations not supported by the ** target type will be replaced by an implementation which raises a runtime error diff --git a/src/lib/nobug-resource-handle-context.hpp b/src/lib/nobug-resource-handle-context.hpp index ac4ccca52..8ad11549c 100644 --- a/src/lib/nobug-resource-handle-context.hpp +++ b/src/lib/nobug-resource-handle-context.hpp @@ -45,9 +45,9 @@ #include "lib/error.hpp" +#include "lib/diagnostic-context.hpp" #include "lib/thread-local.hpp" -#include #include @@ -77,7 +77,7 @@ namespace lib { * Disabled placeholder for the Diagnostic context, not used in release builds. */ class NobugResourceHandleContext - : boost::noncopyable + : util::NonCopyable { typedef nobug_resource_user* Handle; diff --git a/src/lib/nocopy.hpp b/src/lib/nocopy.hpp index e916306a3..dbc4a52fc 100644 --- a/src/lib/nocopy.hpp +++ b/src/lib/nocopy.hpp @@ -23,44 +23,66 @@ /** @file nocopy.hpp ** Mix-Ins to allow or prohibit various degrees of copying and cloning. - ** @todo 2016 this could be organised way better. Also C++11 offers a way more - ** elegant way of expressing the intention. We could get rid of `boost::noncopyable` - ** The basic idea of using a marker mixin seems very reasonable though. ////////////////////////////TICKET #1084 + ** Whenever a class is conceived as entity with a well-defined "identity", + ** or whenever a service has to manage resources, we consider it good practice + ** to define it by default as "non copyable". This rules out a lot of complexities + ** with mutable state and confusion regarding equality. + ** @remark inspired by [Boost-Noncopyable] + ** + ** [Boost-Noncopyable]: http://www.boost.org/doc/libs/1_55_0/libs/utility/utility.htm#Class_noncopyable */ #ifndef LIB_NOCOPY_H #define LIB_NOCOPY_H -#include - namespace util { /** - * any copy and copy construction prohibited + * Any copy and copy construction prohibited */ - class no_copy - : boost::noncopyable - { }; + class NonCopyable + { + protected: + ~NonCopyable() = default; + NonCopyable() = default; + NonCopyable (NonCopyable const&) = delete; + NonCopyable& operator= (NonCopyable const&) = delete; + }; /** - * classes inheriting from this mixin - * may be created by copy-construction, - * but any copy-assignment is prohibited. - * @note especially this allows returning - * by-value from a builder function, - * while prohibiting any further copy + * Types marked with this mix-in may be moved but not copied */ - class no_copy_by_client + class MoveOnly { - protected: - ~no_copy_by_client() {} - no_copy_by_client() {} - no_copy_by_client (no_copy_by_client const&) {} - no_copy_by_client const& - operator=(no_copy_by_client const&) { return *this; } + protected: + ~MoveOnly() = default; + MoveOnly() = default; + MoveOnly (MoveOnly&&) = default; + MoveOnly (MoveOnly const&) = delete; + MoveOnly& operator= (MoveOnly&&) = delete; + MoveOnly& operator= (MoveOnly const&) = delete; + }; + + /** + * Types marked with this mix-in may be created by + * copy-construction (or move construction), + * but may be not reassigned thereafter. + * @remark especially this allows returning + * by-value from a builder function, + * while prohibiting any further copy + */ + class Cloneable + { + protected: + ~Cloneable() = default; + Cloneable() = default; + Cloneable (Cloneable&&) = default; + Cloneable (Cloneable const&) = default; + Cloneable& operator= (Cloneable&&) = delete; + Cloneable& operator= (Cloneable const&) = delete; }; } // namespace util diff --git a/src/lib/opaque-holder.hpp b/src/lib/opaque-holder.hpp index b2f3e4055..80e084672 100644 --- a/src/lib/opaque-holder.hpp +++ b/src/lib/opaque-holder.hpp @@ -68,13 +68,13 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/access-casted.hpp" #include "lib/meta/util.hpp" #include "lib/util.hpp" -#include #include -#include +#include namespace lib { @@ -593,7 +593,7 @@ namespace lib { , class DEFAULT = BA > class InPlaceBuffer - : boost::noncopyable + : util::NonCopyable { mutable char buf_[siz]; diff --git a/src/lib/ref-array.hpp b/src/lib/ref-array.hpp index 32084f3a2..5e70c768f 100644 --- a/src/lib/ref-array.hpp +++ b/src/lib/ref-array.hpp @@ -32,7 +32,7 @@ #define LIB_REF_ARRAY_H -#include +#include "lib/nocopy.hpp" namespace lib { @@ -46,7 +46,7 @@ namespace lib { */ template class RefArray - : boost::noncopyable + : util::NonCopyable { public: virtual ~RefArray() {} ///< this is an interface diff --git a/src/lib/scoped-collection.hpp b/src/lib/scoped-collection.hpp index 94baf2549..d58da5b11 100644 --- a/src/lib/scoped-collection.hpp +++ b/src/lib/scoped-collection.hpp @@ -21,7 +21,7 @@ */ /** @file scoped-collection.hpp - ** Managing a collection of noncopyable polymorphic objects in compact storage. + ** Managing a collection of non-copyable polymorphic objects in compact storage. ** This helper supports the frequently encountered situation where a service ** implementation internally manages a collection of implementation related ** sub-components with reference semantics. Typically, those objects are @@ -70,10 +70,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/meta/trait.hpp" #include "lib/iter-adapter.hpp" -#include #include @@ -86,7 +86,7 @@ namespace lib { /** - * A fixed collection of noncopyable polymorphic objects. + * A fixed collection of non-copyable polymorphic objects. * * All child objects reside in a common chunk of storage * and are owned and managed by this collection holder. @@ -99,7 +99,7 @@ namespace lib { , size_t siz = sizeof(I) > class ScopedCollection - : boost::noncopyable + : util::NonCopyable { public: @@ -110,7 +110,7 @@ namespace lib { * @note doesn't manage the Child */ class ElementHolder - : boost::noncopyable + : util::NonCopyable { mutable char buf_[siz]; diff --git a/src/lib/scoped-ptrvect.hpp b/src/lib/scoped-ptrvect.hpp index ce3ab1abc..f14267f93 100644 --- a/src/lib/scoped-ptrvect.hpp +++ b/src/lib/scoped-ptrvect.hpp @@ -49,12 +49,12 @@ #include "include/logging.h" #include "lib/iter-adapter-ptr-deref.hpp" +#include "lib/nocopy.hpp" #include "lib/error.hpp" #include "lib/util.hpp" #include #include -#include namespace lib { @@ -70,7 +70,7 @@ namespace lib { template class ScopedPtrVect : std::vector, - boost::noncopyable + util::NonCopyable { typedef std::vector _Vec; typedef typename _Vec::iterator VIter; diff --git a/src/lib/searchpath.hpp b/src/lib/searchpath.hpp index 822ae1b1e..aec13a3aa 100644 --- a/src/lib/searchpath.hpp +++ b/src/lib/searchpath.hpp @@ -34,8 +34,8 @@ #define COMMON_SEARCHPATH_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -74,7 +74,7 @@ namespace lib { * @note #next picks the current component and advances the iteration. */ class SearchPathSplitter - : boost::noncopyable + : util::NonCopyable { string pathSpec_; sregex_iterator pos_, diff --git a/src/lib/singleton-ref.hpp b/src/lib/singleton-ref.hpp index 35fba715c..a828218c5 100644 --- a/src/lib/singleton-ref.hpp +++ b/src/lib/singleton-ref.hpp @@ -42,8 +42,7 @@ #include "lib/error.hpp" - -#include +#include "lib/nocopy.hpp" namespace lib { @@ -56,7 +55,7 @@ namespace lib { */ template class AccessAsReference - : boost::noncopyable + : util::NonCopyable { TY* obj_; @@ -106,7 +105,7 @@ namespace lib { * @param Accessor how to implement the static instance access */ template< class TY - , class B = boost::noncopyable + , class B = util::NonCopyable , template class Access = singleton::AccessAsReference > struct SingletonRef diff --git a/src/lib/symbol-table.hpp b/src/lib/symbol-table.hpp index 245e04b9d..e252ffb68 100644 --- a/src/lib/symbol-table.hpp +++ b/src/lib/symbol-table.hpp @@ -50,8 +50,8 @@ #include "lib/sync.hpp" #include "lib/symbol.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -72,7 +72,7 @@ namespace lib { */ class SymbolTable : public Sync<> - , boost::noncopyable + , util::NonCopyable { std::unordered_set table_; diff --git a/src/lib/sync.hpp b/src/lib/sync.hpp index 3d4584fc6..0a9f8d56a 100644 --- a/src/lib/sync.hpp +++ b/src/lib/sync.hpp @@ -68,13 +68,13 @@ #define LIB_SYNC_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" extern "C" { #include "lib/lockerror.h" } -#include #include #include #include @@ -440,7 +440,7 @@ namespace lib { * scoped object to control the actual locking. */ class Lock - : boost::noncopyable + : util::NonCopyable { Monitor& mon_; diff --git a/src/lib/test/depend-4test.hpp b/src/lib/test/depend-4test.hpp index 66239c1d4..ebfa3468c 100644 --- a/src/lib/test/depend-4test.hpp +++ b/src/lib/test/depend-4test.hpp @@ -35,7 +35,6 @@ #include "lib/depend.hpp" #include "lib/meta/duck-detector.hpp" -#include #include @@ -100,7 +99,7 @@ namespace test{ */ template struct Depend4Test - : boost::noncopyable + : util::NonCopyable { typedef typename ServiceInterface::Type Interface; diff --git a/src/lib/test/testdummy.hpp b/src/lib/test/testdummy.hpp index 5a6744c25..9de21a0c8 100644 --- a/src/lib/test/testdummy.hpp +++ b/src/lib/test/testdummy.hpp @@ -29,8 +29,8 @@ */ +#include "lib/nocopy.hpp" -#include #include @@ -39,7 +39,7 @@ namespace test{ class Dummy - : boost::noncopyable + : util::NonCopyable { int val_; diff --git a/src/lib/test/testoption.hpp b/src/lib/test/testoption.hpp index 0963ca6b7..cb6427378 100644 --- a/src/lib/test/testoption.hpp +++ b/src/lib/test/testoption.hpp @@ -30,6 +30,7 @@ #define TESTHELPER_TESTOPTION_H #include "lib/cmdline.hpp" +#include "lib/nocopy.hpp" #include #include @@ -55,7 +56,8 @@ namespace test { * vector will contain only the remaining * unrecognised parts. */ - class TestOption : private boost::noncopyable + class TestOption + : util::NonCopyable { public: TestOption (lib::Cmdline& cmdline); diff --git a/src/lib/thread-local.hpp b/src/lib/thread-local.hpp index 530da6038..179c22291 100644 --- a/src/lib/thread-local.hpp +++ b/src/lib/thread-local.hpp @@ -28,6 +28,7 @@ ** ** @todo care for unit test coverage ** @todo WIP-WIP. Maybe add facilities similar to boost::specific_ptr + ** @deprecated C++11 has a `thread_local` storage class... **/ @@ -36,8 +37,8 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -54,7 +55,7 @@ namespace lib { */ template class ThreadLocalPtr - : boost::noncopyable + : util::NonCopyable { pthread_key_t key_; diff --git a/src/lib/time/mutation.hpp b/src/lib/time/mutation.hpp index 81b57c454..872f7976d 100644 --- a/src/lib/time/mutation.hpp +++ b/src/lib/time/mutation.hpp @@ -62,11 +62,11 @@ #define LIB_TIME_MUTATION_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/time/timevalue.hpp" #include "lib/polymorphic-value.hpp" #include "lib/symbol.hpp" -#include namespace lib { diff --git a/src/lib/variant-o.hpp b/src/lib/variant-o.hpp index 137a69c7d..11fdc5d41 100644 --- a/src/lib/variant-o.hpp +++ b/src/lib/variant-o.hpp @@ -54,8 +54,8 @@ #include "lib/meta/typelist-util.hpp" #include "lib/meta/generator.hpp" +#include "lib/nocopy.hpp" -#include @@ -251,7 +251,7 @@ namespace lib { , template class Access > class VariantO - : boost::noncopyable + : util::NonCopyable { typedef variant::Holder Holder; diff --git a/src/lib/wrapper.hpp b/src/lib/wrapper.hpp index e5bb564e6..954f52456 100644 --- a/src/lib/wrapper.hpp +++ b/src/lib/wrapper.hpp @@ -34,6 +34,8 @@ ** ** @see lib::TransformIter ** + ** @todo 2017 consider to split off the FunctionResult into a dedicated header to reduce includes + ** */ @@ -41,12 +43,12 @@ #define LIB_WRAPPER_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "lib/meta/function.hpp" #include "lib/meta/function-closure.hpp" #include "lib/meta/util.hpp" #include "lib/util.hpp" -#include #include @@ -388,7 +390,7 @@ namespace wrapper { template class FunctionResult : public function - , boost::noncopyable + , util::NonCopyable { using Res = typename _Fun::Ret; using ResWrapper = ItemWrapper; diff --git a/src/proc/asset.hpp b/src/proc/asset.hpp index 8f37faf69..f27e2237e 100644 --- a/src/proc/asset.hpp +++ b/src/proc/asset.hpp @@ -57,6 +57,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/logging.h" #include "proc/asset/category.hpp" #include "lib/hash-value.h" @@ -64,7 +65,6 @@ #include #include -#include #include #include @@ -144,8 +144,8 @@ namespace asset { * @author Ichthyo */ class Asset - : boost::totally_ordered1< Asset, - boost::noncopyable> + : public boost::totally_ordered1< Asset + , util::NonCopyable > { public: diff --git a/src/proc/asset/db.hpp b/src/proc/asset/db.hpp index b0f097605..1e94dac01 100644 --- a/src/proc/asset/db.hpp +++ b/src/proc/asset/db.hpp @@ -95,8 +95,8 @@ namespace asset { * As of 8/2007 implemented by a hashtable. */ class DB - : private boost::noncopyable, - public Sync + : util::NonCopyable + , public Sync { IdHashtable table; diff --git a/src/proc/asset/media.hpp b/src/proc/asset/media.hpp index a39b8647e..d1bac7333 100644 --- a/src/proc/asset/media.hpp +++ b/src/proc/asset/media.hpp @@ -40,8 +40,8 @@ #include "lib/time/timevalue.hpp" #include "proc/mobject/mobject.hpp" #include "proc/mobject/session/clip.hpp" +#include "lib/nocopy.hpp" -#include @@ -141,7 +141,7 @@ namespace asset { * Factory specialised for creating Media Asset objects. */ class MediaFactory - : boost::noncopyable + : util::NonCopyable { public: typedef lib::P PType; diff --git a/src/proc/asset/meta.hpp b/src/proc/asset/meta.hpp index bfb30628d..f701a665f 100644 --- a/src/proc/asset/meta.hpp +++ b/src/proc/asset/meta.hpp @@ -61,8 +61,7 @@ #include "proc/asset.hpp" #include "lib/idi/entry-id.hpp" - -#include +#include "lib/nocopy.hpp" namespace proc { @@ -147,7 +146,7 @@ namespace asset { * Factory specialised for creating Metadata Asset objects. */ class MetaFactory - : boost::noncopyable + : util::NonCopyable { public: typedef lib::P PType; diff --git a/src/proc/asset/proc.hpp b/src/proc/asset/proc.hpp index 796fd730b..30c08e821 100644 --- a/src/proc/asset/proc.hpp +++ b/src/proc/asset/proc.hpp @@ -38,8 +38,7 @@ #include "proc/asset.hpp" #include "proc/streamtype.hpp" - -#include +#include "lib/nocopy.hpp" @@ -118,7 +117,7 @@ namespace asset { * Factory specialised for creating Processor Asset objects. */ class ProcFactory - : boost::noncopyable + : util::NonCopyable { public: typedef lib::P PType; diff --git a/src/proc/asset/struct.hpp b/src/proc/asset/struct.hpp index 4ec18a145..4ed21312e 100644 --- a/src/proc/asset/struct.hpp +++ b/src/proc/asset/struct.hpp @@ -64,8 +64,8 @@ #include "lib/symbol.hpp" #include "proc/asset.hpp" #include "common/query.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -142,7 +142,7 @@ namespace asset { * Factory specialised for creating Structural Asset objects. */ class StructFactory - : boost::noncopyable + : util::NonCopyable { unique_ptr impl_; diff --git a/src/proc/assetmanager.hpp b/src/proc/assetmanager.hpp index 5d9c7fa04..61d691299 100644 --- a/src/proc/assetmanager.hpp +++ b/src/proc/assetmanager.hpp @@ -68,7 +68,7 @@ namespace asset { * Facade for the Asset subsystem */ class AssetManager - : private boost::noncopyable + : util::NonCopyable { asset::DB & registry; diff --git a/src/proc/cmd.hpp b/src/proc/cmd.hpp index 96fa9a37a..00716f0b9 100644 --- a/src/proc/cmd.hpp +++ b/src/proc/cmd.hpp @@ -42,7 +42,6 @@ //#include "lib/symbol.hpp" //#include "proc/common.hpp" -//#include //#include diff --git a/src/proc/common.hpp b/src/proc/common.hpp index 35109badd..5acea10b0 100644 --- a/src/proc/common.hpp +++ b/src/proc/common.hpp @@ -45,6 +45,7 @@ #include "lib/p.hpp" #include "lib/util.hpp" +#include "lib/nocopy.hpp" #include "lib/time/timevalue.hpp" #include "lib/symbol.hpp" #include "lib/error.hpp" // pulls in NoBug via loggging.h diff --git a/src/proc/control/command-def.hpp b/src/proc/control/command-def.hpp index d878ac531..133c2330b 100644 --- a/src/proc/control/command-def.hpp +++ b/src/proc/control/command-def.hpp @@ -54,6 +54,7 @@ #define CONTROL_COMMAND_DEF_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/logging.h" #include "lib/symbol.hpp" #include "proc/control/command.hpp" @@ -70,7 +71,6 @@ #include #include -#include @@ -276,7 +276,7 @@ namespace control { * */ class CommandDef - : boost::noncopyable + : util::NonCopyable { Symbol id_; Command prototype_; diff --git a/src/proc/control/command-impl-clone-builder.hpp b/src/proc/control/command-impl-clone-builder.hpp index ce18a24a2..6c8fe2565 100644 --- a/src/proc/control/command-impl-clone-builder.hpp +++ b/src/proc/control/command-impl-clone-builder.hpp @@ -49,8 +49,7 @@ #include "proc/control/command-mutation.hpp" #include "lib/typed-allocation-manager.hpp" #include "lib/opaque-holder.hpp" - -#include +#include "lib/nocopy.hpp" namespace proc { @@ -122,7 +121,7 @@ namespace control { * and the memento storage within the cloned parts. */ class CommandImplCloneBuilder - : public boost::noncopyable + : util::NonCopyable { typedef InPlaceBuffer ContextHolder; diff --git a/src/proc/control/command-impl.hpp b/src/proc/control/command-impl.hpp index cddabe1bd..c13e898a3 100644 --- a/src/proc/control/command-impl.hpp +++ b/src/proc/control/command-impl.hpp @@ -46,8 +46,8 @@ #include "proc/control/command-closure.hpp" #include "proc/control/command-mutation.hpp" #include "lib/format-string.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -77,7 +77,7 @@ namespace control { * @see Mutation */ class CommandImpl - : boost::noncopyable + : util::NonCopyable { Mutation do_; UndoMutation undo_; diff --git a/src/proc/control/command-instance-manager.hpp b/src/proc/control/command-instance-manager.hpp index d44523ceb..1134d9d1b 100644 --- a/src/proc/control/command-instance-manager.hpp +++ b/src/proc/control/command-instance-manager.hpp @@ -58,12 +58,12 @@ #define CONTROL_COMMAND_INSTANCE_MANAGER_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "proc/control/command.hpp" #include "proc/control/command-dispatch.hpp" #include "lib/diff/gen-node.hpp" #include "lib/symbol.hpp" -#include #include #include @@ -97,7 +97,7 @@ namespace control { * @warning CommandInstanceManager is *not threadsafe* */ class CommandInstanceManager - : boost::noncopyable + : util::NonCopyable { CommandDispatch& dispatcher_; std::unordered_map table_; diff --git a/src/proc/control/command-registry.hpp b/src/proc/control/command-registry.hpp index 0830198af..ac54fe8f7 100644 --- a/src/proc/control/command-registry.hpp +++ b/src/proc/control/command-registry.hpp @@ -62,6 +62,7 @@ #include "lib/depend.hpp" #include "lib/sync.hpp" #include "include/logging.h" +#include "lib/nocopy.hpp" #include "lib/util.hpp" #include "proc/control/command.hpp" @@ -70,7 +71,6 @@ #include "lib/typed-allocation-manager.hpp" #include -#include #include #include #include @@ -82,7 +82,6 @@ namespace proc { namespace control { using boost::hash; - using boost::noncopyable; using std::shared_ptr; using std::unordered_map; using lib::TypedAllocationManager; @@ -118,7 +117,7 @@ namespace control { */ class CommandRegistry : public lib::Sync<> - , noncopyable + , util::NonCopyable { // using a hashtable to implement the index typedef unordered_map> CmdIndex; diff --git a/src/proc/control/command-setup.hpp b/src/proc/control/command-setup.hpp index c77f5c8c8..fedcf7871 100644 --- a/src/proc/control/command-setup.hpp +++ b/src/proc/control/command-setup.hpp @@ -53,6 +53,7 @@ #define CONTROL_COMMAND_SETUP_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "proc/control/command.hpp" #include "lib/symbol.hpp" @@ -94,15 +95,13 @@ namespace control { * to be defined and configured for use with the session subsystem. */ class CommandSetup + : util::Cloneable // copy-construction allowed, but no assignment { Symbol cmdID_; public: ~CommandSetup(); CommandSetup (Symbol cmdID); - CommandSetup (CommandSetup const&) = default; - CommandSetup (CommandSetup &&) = default; - CommandSetup& operator= (CommandSetup const&) = delete; operator Symbol const&() const { diff --git a/src/proc/control/session-command-service.hpp b/src/proc/control/session-command-service.hpp index 73651f05f..9ca2faf93 100644 --- a/src/proc/control/session-command-service.hpp +++ b/src/proc/control/session-command-service.hpp @@ -48,9 +48,9 @@ #include "common/instancehandle.hpp" #include "lib/singleton-ref.hpp" #include "lib/diff/gen-node.hpp" +#include "lib/nocopy.hpp" #include "lib/symbol.hpp" -#include @@ -79,7 +79,7 @@ namespace control { */ class SessionCommandService : public SessionCommand - , boost::noncopyable + , util::NonCopyable { CommandDispatch& dispatcher_; CommandInstanceManager instanceManager_; diff --git a/src/proc/control/styperegistry.hpp b/src/proc/control/styperegistry.hpp index ba5e6f24c..3c1963bff 100644 --- a/src/proc/control/styperegistry.hpp +++ b/src/proc/control/styperegistry.hpp @@ -38,6 +38,7 @@ #include "proc/control/stypemanager.hpp" +#include "lib/nocopy.hpp" //#include "common/query.hpp" //#include "lib/util.hpp" //#include "lib/p.hpp" @@ -45,7 +46,6 @@ //#include //#include //#include -#include namespace proc { @@ -72,7 +72,7 @@ namespace control { * exact behaviour has to be defined. */ class STypeManager::Registry - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/proc/engine/buffer-metadata.hpp b/src/proc/engine/buffer-metadata.hpp index fa735e0e8..dcc23dc63 100644 --- a/src/proc/engine/buffer-metadata.hpp +++ b/src/proc/engine/buffer-metadata.hpp @@ -61,9 +61,9 @@ #include "include/logging.h" #include "proc/engine/type-handler.hpp" #include "proc/engine/buffer-local-key.hpp" +#include "lib/nocopy.hpp" #include -#include namespace proc { @@ -540,7 +540,7 @@ namespace engine { * when \em locking or \em freeing the corresponding buffer. */ class BufferMetadata - : boost::noncopyable + : util::NonCopyable { Literal id_; HashVal family_; diff --git a/src/proc/engine/buffer-provider.hpp b/src/proc/engine/buffer-provider.hpp index fd4a4db5f..610573473 100644 --- a/src/proc/engine/buffer-provider.hpp +++ b/src/proc/engine/buffer-provider.hpp @@ -48,8 +48,8 @@ #include "proc/engine/buffhandle.hpp" #include "proc/engine/type-handler.hpp" #include "proc/engine/buffer-local-key.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -79,7 +79,7 @@ namespace engine { * @todo as of 11/11 thread safety within the engine remains to be clarified ///////////////////////////TICKET #854 */ class BufferProvider - : boost::noncopyable + : util::NonCopyable { unique_ptr meta_; diff --git a/src/proc/engine/bufftable-obsolete.hpp b/src/proc/engine/bufftable-obsolete.hpp index 7cb1b17ba..fad9c3a80 100644 --- a/src/proc/engine/bufftable-obsolete.hpp +++ b/src/proc/engine/bufftable-obsolete.hpp @@ -32,10 +32,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "proc/engine/channel-descriptor.hpp" #include "proc/engine/procnode.hpp" -#include #include #include @@ -157,7 +157,7 @@ namespace engine { */ class BuffTableChunk : public BuffTable, - boost::noncopyable + util::NonCopyable { const uint siz_; BuffTable::Chunk tab_; diff --git a/src/proc/engine/bufftable.hpp b/src/proc/engine/bufftable.hpp index a0f1289f8..6199f662c 100644 --- a/src/proc/engine/bufftable.hpp +++ b/src/proc/engine/bufftable.hpp @@ -39,7 +39,6 @@ #include "proc/engine/procnode.hpp" #include "lib/iter-adapter.hpp" -#include #include #include diff --git a/src/proc/engine/calc-plan-continuation.hpp b/src/proc/engine/calc-plan-continuation.hpp index ba45ca6c1..dda85c2df 100644 --- a/src/proc/engine/calc-plan-continuation.hpp +++ b/src/proc/engine/calc-plan-continuation.hpp @@ -43,8 +43,6 @@ #include "proc/play/timings.hpp" #include "backend/engine/job.h" -#include - namespace proc { namespace engine { diff --git a/src/proc/engine/calc-stream.hpp b/src/proc/engine/calc-stream.hpp index b39b89a75..7b64bb137 100644 --- a/src/proc/engine/calc-stream.hpp +++ b/src/proc/engine/calc-stream.hpp @@ -54,7 +54,6 @@ //#include "common/instancehandle.hpp" //#include "lib/singleton-ref.hpp" // -//#include //#include #include diff --git a/src/proc/engine/diagnostic-buffer-provider.hpp b/src/proc/engine/diagnostic-buffer-provider.hpp index f38d4bf6f..f2bbc87b6 100644 --- a/src/proc/engine/diagnostic-buffer-provider.hpp +++ b/src/proc/engine/diagnostic-buffer-provider.hpp @@ -35,8 +35,8 @@ #include "lib/util.hpp" #include "proc/engine/type-handler.hpp" #include "proc/engine/buffer-provider.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -59,7 +59,7 @@ namespace engine { * @todo write type comment */ class DiagnosticBufferProvider - : boost::noncopyable + : util::NonCopyable { std::unique_ptr pImpl_; diff --git a/src/proc/engine/dispatcher.hpp b/src/proc/engine/dispatcher.hpp index 9065ad0c4..2b61ce5af 100644 --- a/src/proc/engine/dispatcher.hpp +++ b/src/proc/engine/dispatcher.hpp @@ -43,7 +43,6 @@ #include "proc/engine/job-planning.hpp" #include "lib/time/timevalue.hpp" -#include #include diff --git a/src/proc/engine/engine-diagnostics.hpp b/src/proc/engine/engine-diagnostics.hpp index f53d460cd..1f0020ac3 100644 --- a/src/proc/engine/engine-diagnostics.hpp +++ b/src/proc/engine/engine-diagnostics.hpp @@ -38,6 +38,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "proc/engine/engine-service.hpp" //#include "include/dummy-player-facade.h" //#include "include/display-facade.h" @@ -50,7 +51,6 @@ //#include "lib/polymorphic-value.hpp" //#include "lib/depend.hpp" // -#include //#include @@ -79,7 +79,7 @@ namespace engine{ * of EngineDiagnostics may be used. */ class EngineDiagnostics - : boost::noncopyable + : util::NonCopyable { EngineService& engine_; diff --git a/src/proc/engine/engine-service-mock.hpp b/src/proc/engine/engine-service-mock.hpp index 85cc461bf..b04223790 100644 --- a/src/proc/engine/engine-service-mock.hpp +++ b/src/proc/engine/engine-service-mock.hpp @@ -52,8 +52,6 @@ //#include "lib/singleton-ref.hpp" #include "proc/engine/engine-service.hpp" #include "lib/scoped-ptrvect.hpp" -// -#include namespace proc { diff --git a/src/proc/engine/engine-service.hpp b/src/proc/engine/engine-service.hpp index 41d965339..f27cbd218 100644 --- a/src/proc/engine/engine-service.hpp +++ b/src/proc/engine/engine-service.hpp @@ -53,6 +53,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" //#include "include/dummy-player-facade.h" //#include "include/display-facade.h" #include "proc/engine/calc-stream.hpp" @@ -63,8 +64,7 @@ //#include "lib/singleton-ref.hpp" #include "lib/polymorphic-value.hpp" #include "lib/depend.hpp" -// -#include + #include //#include @@ -98,7 +98,7 @@ namespace engine{ * @ingroup engine */ class EngineService - : boost::noncopyable + : util::NonCopyable { diff --git a/src/proc/engine/frame-coord.hpp b/src/proc/engine/frame-coord.hpp index cc6f5a940..57c1723cc 100644 --- a/src/proc/engine/frame-coord.hpp +++ b/src/proc/engine/frame-coord.hpp @@ -106,7 +106,7 @@ namespace engine { * backed by the Segmentation (i.e. the render nodes network). */ class FrameSequencer - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/proc/engine/job-ticket.hpp b/src/proc/engine/job-ticket.hpp index 25330979a..80d23f4d1 100644 --- a/src/proc/engine/job-ticket.hpp +++ b/src/proc/engine/job-ticket.hpp @@ -43,7 +43,6 @@ #include "lib/iter-adapter.hpp" #include "lib/util.hpp" -#include #include @@ -83,7 +82,7 @@ using util::isnil; * @todo 1/12 WIP-WIP-WIP defining the invocation sequence and render jobs */ class JobTicket - : boost::noncopyable + : util::NonCopyable { struct Provision { diff --git a/src/proc/engine/nodewiring-def.hpp b/src/proc/engine/nodewiring-def.hpp index cdd4f5f6d..eea639136 100644 --- a/src/proc/engine/nodewiring-def.hpp +++ b/src/proc/engine/nodewiring-def.hpp @@ -43,8 +43,7 @@ #include "proc/engine/procnode.hpp" #include "lib/ref-array.hpp" #include "lib/util-foreach.hpp" - -#include +#include "lib/nocopy.hpp" @@ -70,7 +69,7 @@ namespace engine { * should be used, without adding any connection information. */ class WiringSituation - : boost::noncopyable + : util::NonCopyable { long flags_; asset::Proc::ProcFunc* function_; diff --git a/src/proc/engine/nodewiring.hpp b/src/proc/engine/nodewiring.hpp index ef3692e4b..e493e6ca8 100644 --- a/src/proc/engine/nodewiring.hpp +++ b/src/proc/engine/nodewiring.hpp @@ -35,9 +35,7 @@ #include "lib/allocation-cluster.hpp" #include "proc/engine/nodewiring-def.hpp" -//#include #include -//#include diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp index 5e0e4167b..48f99a153 100644 --- a/src/proc/engine/procnode.hpp +++ b/src/proc/engine/procnode.hpp @@ -50,7 +50,6 @@ #include "lib/ref-array.hpp" #include -#include @@ -134,7 +133,7 @@ namespace engine { * ProcNode as a frontend entirely. */ class ProcNode - : boost::noncopyable + : util::NonCopyable { typedef mobject::Parameter Param; //////TODO: just a placeholder for automation as of 6/2008 vector params; diff --git a/src/proc/engine/tracking-heap-block-provider.cpp b/src/proc/engine/tracking-heap-block-provider.cpp index a0d4d34dc..5b88f995e 100644 --- a/src/proc/engine/tracking-heap-block-provider.cpp +++ b/src/proc/engine/tracking-heap-block-provider.cpp @@ -28,18 +28,15 @@ #include "lib/error.hpp" #include "include/logging.h" -//#include "lib/meta/function.hpp" #include "lib/scoped-ptrvect.hpp" #include "lib/scoped-holder.hpp" #include "lib/util-foreach.hpp" #include "proc/engine/tracking-heap-block-provider.hpp" -#include #include #include -//using util::for_each; using util::and_all; using std::vector; using lib::ScopedHolder; diff --git a/src/proc/engine/tracking-heap-block-provider.hpp b/src/proc/engine/tracking-heap-block-provider.hpp index e352ce604..8ad98ef6f 100644 --- a/src/proc/engine/tracking-heap-block-provider.hpp +++ b/src/proc/engine/tracking-heap-block-provider.hpp @@ -71,7 +71,7 @@ namespace engine { * to store some additional tracking information. */ class Block - : boost::noncopyable + : util::NonCopyable { unique_ptr storage_; diff --git a/src/proc/engine/worker/tick-service.hpp b/src/proc/engine/worker/tick-service.hpp index 5ee6e3926..837b20167 100644 --- a/src/proc/engine/worker/tick-service.hpp +++ b/src/proc/engine/worker/tick-service.hpp @@ -41,6 +41,8 @@ #include "lib/error.hpp" #include "backend/thread-wrapper.hpp" +#include // for usleep() + #include #include diff --git a/src/proc/mobject/builder/fixture-change-detector.hpp b/src/proc/mobject/builder/fixture-change-detector.hpp index 6c1065396..e1800d02c 100644 --- a/src/proc/mobject/builder/fixture-change-detector.hpp +++ b/src/proc/mobject/builder/fixture-change-detector.hpp @@ -66,7 +66,7 @@ namespace builder { * TODO type comment */ class FixtureChangeDetector - : boost::noncopyable + : util::NonCopyable { typedef ID PID; diff --git a/src/proc/mobject/builder/model-port-registry.hpp b/src/proc/mobject/builder/model-port-registry.hpp index e836c2289..bf913be38 100644 --- a/src/proc/mobject/builder/model-port-registry.hpp +++ b/src/proc/mobject/builder/model-port-registry.hpp @@ -78,7 +78,7 @@ namespace builder { * new model is complete and ready for use. */ class ModelPortRegistry - : boost::noncopyable + : util::NonCopyable { typedef ID PID; diff --git a/src/proc/mobject/builder/toolfactory.cpp b/src/proc/mobject/builder/toolfactory.cpp index 81215d154..ed9815667 100644 --- a/src/proc/mobject/builder/toolfactory.cpp +++ b/src/proc/mobject/builder/toolfactory.cpp @@ -30,7 +30,6 @@ #include "proc/mobject/builder/toolfactory.hpp" #include "lib/util.hpp" -#include #include namespace proc { diff --git a/src/proc/mobject/mobject.hpp b/src/proc/mobject/mobject.hpp index 214ec19ff..9f6fca05b 100644 --- a/src/proc/mobject/mobject.hpp +++ b/src/proc/mobject/mobject.hpp @@ -46,7 +46,6 @@ #include "lib/p.hpp" #include "lib/time/timevalue.hpp" -#include #include #include @@ -79,7 +78,7 @@ namespace mobject { */ class MObject : public Buildable, - boost::noncopyable, + util::NonCopyable, boost::equality_comparable< MObject > { protected: diff --git a/src/proc/mobject/output-mapping.hpp b/src/proc/mobject/output-mapping.hpp index d9e480b0b..92d1ee9a4 100644 --- a/src/proc/mobject/output-mapping.hpp +++ b/src/proc/mobject/output-mapping.hpp @@ -386,6 +386,12 @@ namespace mobject { HashVal hash4query = _mapping::slot (query4pipe); if (not contains (hash4query)) { + // need to resolve this query first + auto addEntry = [&](auto query) + { + table_[hash4query] = _mapping::resolveQuery (query); + }; + if (uint seqNr = _mapping::is_defaults_query_with_channel (query4pipe)) { // treat the special case @@ -396,11 +402,10 @@ namespace mobject { ENSURE (corresponding_sourcePipe); PId sourcePipeID = corresponding_sourcePipe->getID(); - query4pipe = DEF::buildQuery (sourcePipeID, seqNr); + addEntry (DEF::buildQuery (sourcePipeID, seqNr)); } - - // need to resolve this query first - table_[hash4query] = _mapping::resolveQuery (query4pipe); + else + addEntry (query4pipe); } ENSURE (this->contains (hash4query)); diff --git a/src/proc/mobject/session.hpp b/src/proc/mobject/session.hpp index dfafeac47..85904e9cd 100644 --- a/src/proc/mobject/session.hpp +++ b/src/proc/mobject/session.hpp @@ -58,7 +58,6 @@ #include "lib/symbol.hpp" #include "lib/p.hpp" -#include #include @@ -106,7 +105,7 @@ namespace mobject { * */ class Session - : boost::noncopyable + : util::NonCopyable { protected: typedef lumiera::query::DefsManager& DefaultsAccess; @@ -156,7 +155,8 @@ namespace mobject { * creation, access and Session lifecycle Interface. * An instance is accessible via Session::current */ - class SessManager : private boost::noncopyable + class SessManager + : util::NonCopyable { public: /** diagnostics: session interface opened? */ diff --git a/src/proc/mobject/session/dummy-session-connection.cpp b/src/proc/mobject/session/dummy-session-connection.cpp index d2fefe739..edff76ccd 100644 --- a/src/proc/mobject/session/dummy-session-connection.cpp +++ b/src/proc/mobject/session/dummy-session-connection.cpp @@ -40,7 +40,6 @@ //#include "include/logging.h" #include "proc/mobject/session/dummy-session-connection.hpp" -//#include #include #include diff --git a/src/proc/mobject/session/dummy-session-connection.hpp b/src/proc/mobject/session/dummy-session-connection.hpp index e91a21598..8f1eeb9a8 100644 --- a/src/proc/mobject/session/dummy-session-connection.hpp +++ b/src/proc/mobject/session/dummy-session-connection.hpp @@ -45,10 +45,9 @@ #include "lib/error.hpp" #include "lib/depend.hpp" -//#include "lib/symbol.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" -#include #include namespace proc { @@ -65,7 +64,7 @@ namespace session { * @see DummySessionConnection_test */ class DummySessionConnection - : boost::noncopyable + : util::NonCopyable { string nothing_; diff --git a/src/proc/mobject/session/element-query.hpp b/src/proc/mobject/session/element-query.hpp index 132b06317..c2afe4a01 100644 --- a/src/proc/mobject/session/element-query.hpp +++ b/src/proc/mobject/session/element-query.hpp @@ -37,8 +37,8 @@ #include "proc/mobject/mobject-ref.hpp" #include "proc/mobject/session/specific-contents-query.hpp" #include "proc/mobject/session/session-service-explore-scope.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -100,7 +100,7 @@ namespace session { * @see struct-factory-impl.hpp usage example */ class ElementQuery - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/proc/mobject/session/fixture.hpp b/src/proc/mobject/session/fixture.hpp index 8d92ecbd3..79ffb3e2c 100644 --- a/src/proc/mobject/session/fixture.hpp +++ b/src/proc/mobject/session/fixture.hpp @@ -47,8 +47,8 @@ #include "proc/mobject/session/fork.hpp" #include "proc/mobject/explicitplacement.hpp" #include "proc/mobject/session/auto.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -70,7 +70,7 @@ namespace session { * @see http://lumiera.org/wiki/renderengine.html#Fixture */ class Fixture - : boost::noncopyable + : util::NonCopyable { protected: /////////////////////////////////////////////////TODO: placeholder code diff --git a/src/proc/mobject/session/lifecycle-advisor.hpp b/src/proc/mobject/session/lifecycle-advisor.hpp index d2297a51e..5a8adc11f 100644 --- a/src/proc/mobject/session/lifecycle-advisor.hpp +++ b/src/proc/mobject/session/lifecycle-advisor.hpp @@ -50,12 +50,11 @@ #define PROC_MOBJECT_SESSION_LIFECYCLE_ADVISOR_H #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/lifecycle.h" #include "proc/mobject/session.hpp" #include "lib/symbol.hpp" -#include - namespace proc { namespace mobject { @@ -72,7 +71,7 @@ namespace session { * in a controlled and safe (single threaded) environment */ class LifecycleAdvisor - : boost::noncopyable + : util::NonCopyable { diff --git a/src/proc/mobject/session/placement-index.cpp b/src/proc/mobject/session/placement-index.cpp index 2d971b6d2..80f42fbc5 100644 --- a/src/proc/mobject/session/placement-index.cpp +++ b/src/proc/mobject/session/placement-index.cpp @@ -60,7 +60,6 @@ #include "include/logging.h" #include -#include #include #include #include @@ -72,7 +71,6 @@ namespace mobject { namespace session { using boost::hash; - using boost::noncopyable; using std::shared_ptr; using std::unordered_map; using std::unordered_multimap; diff --git a/src/proc/mobject/session/placement-index.hpp b/src/proc/mobject/session/placement-index.hpp index e459ebbea..d3b62c62e 100644 --- a/src/proc/mobject/session/placement-index.hpp +++ b/src/proc/mobject/session/placement-index.hpp @@ -112,8 +112,8 @@ #include "lib/itertools.hpp" #include "proc/mobject/placement.hpp" #include "proc/mobject/placement-ref.hpp" +#include "lib/nocopy.hpp" -#include #include #include #include @@ -177,7 +177,7 @@ namespace session { * Placement's hash-IDs. */ class PlacementIndex - : boost::noncopyable + : util::NonCopyable { class Table; class Validator; diff --git a/src/proc/mobject/session/query-focus-stack.hpp b/src/proc/mobject/session/query-focus-stack.hpp index 15d9e2625..e6a077c76 100644 --- a/src/proc/mobject/session/query-focus-stack.hpp +++ b/src/proc/mobject/session/query-focus-stack.hpp @@ -32,8 +32,8 @@ #define MOBJECT_SESSION_QUERY_FOCUS_STACK_H #include "proc/mobject/session/scope-path.hpp" +#include "lib/nocopy.hpp" -#include #include using std::list; @@ -68,7 +68,7 @@ namespace session { * @see QueryFocus access point for client code */ class QueryFocusStack - : boost::noncopyable + : util::NonCopyable { std::list paths_; diff --git a/src/proc/mobject/session/session-interface-modules.hpp b/src/proc/mobject/session/session-interface-modules.hpp index 3493cf399..c729088e7 100644 --- a/src/proc/mobject/session/session-interface-modules.hpp +++ b/src/proc/mobject/session/session-interface-modules.hpp @@ -94,7 +94,7 @@ namespace session { * exposed on the public Session API. */ struct SessionInterfaceModules - : boost::noncopyable + : util::NonCopyable { lumiera::query::DefsManager defaultsManager_; mobject::session::ElementQuery elementQueryAPI_; diff --git a/src/proc/play/dummy-play-connection.hpp b/src/proc/play/dummy-play-connection.hpp index f67f6b4e2..d059b0aad 100644 --- a/src/proc/play/dummy-play-connection.hpp +++ b/src/proc/play/dummy-play-connection.hpp @@ -90,13 +90,11 @@ #include "proc/asset/timeline.hpp" #include "proc/asset/pipe.hpp" #include "common/query.hpp" -#include "lib/util.hpp" -//#include "lib/symbol.hpp" #include "lib/iter-source.hpp" -// -#include -//#include +#include "lib/nocopy.hpp" +#include "lib/util.hpp" + #include @@ -224,7 +222,7 @@ namespace play { */ template class DummyPlayConnection - : boost::noncopyable + : util::NonCopyable { SimulatedBuilderContext mockBuilder_; diff --git a/src/proc/play/dummy-player-service.hpp b/src/proc/play/dummy-player-service.hpp index c82409e16..65f1121bf 100644 --- a/src/proc/play/dummy-player-service.hpp +++ b/src/proc/play/dummy-player-service.hpp @@ -45,8 +45,8 @@ #include "include/display-facade.h" #include "common/instancehandle.hpp" #include "lib/singleton-ref.hpp" +#include "lib/nocopy.hpp" -#include #include #include @@ -79,7 +79,7 @@ namespace proc { */ class ProcessImpl : public lumiera::DummyPlayer::ProcessImplementationLink, - boost::noncopyable + util::NonCopyable { uint fps_; bool play_; @@ -126,7 +126,7 @@ namespace proc { * route calls through this interface. */ class DummyPlayerService - : boost::noncopyable + : util::NonCopyable { string error_; diff --git a/src/proc/play/output-director.hpp b/src/proc/play/output-director.hpp index 84ecb3691..56a196e77 100644 --- a/src/proc/play/output-director.hpp +++ b/src/proc/play/output-director.hpp @@ -39,11 +39,9 @@ #include "lib/depend.hpp" #include "proc/play/output-manager.hpp" #include "common/subsys.hpp" +#include "lib/nocopy.hpp" #include "lib/sync.hpp" -#include -//#include -//#include #include @@ -69,7 +67,7 @@ namespace play { * @todo write Type comment */ class OutputDirector - : boost::noncopyable + : util::NonCopyable , public lib::Sync<> { typedef lumiera::Subsys::SigTerm SigTerm; diff --git a/src/proc/play/output-manager.hpp b/src/proc/play/output-manager.hpp index 54bff0200..9bfc9175d 100644 --- a/src/proc/play/output-manager.hpp +++ b/src/proc/play/output-manager.hpp @@ -32,10 +32,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "proc/play/output-slot.hpp" #include "proc/mobject/model-port.hpp" -#include //#include //#include #include @@ -66,7 +66,7 @@ namespace play { * @todo write Type comment */ class OutputManager - : boost::noncopyable + : util::NonCopyable { public: virtual ~OutputManager() { } diff --git a/src/proc/play/output-slot-connection.hpp b/src/proc/play/output-slot-connection.hpp index 89db2b2d4..ede82d9a2 100644 --- a/src/proc/play/output-slot-connection.hpp +++ b/src/proc/play/output-slot-connection.hpp @@ -40,6 +40,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "proc/play/output-slot.hpp" #include "lib/scoped-collection.hpp" #include "lib/iter-adapter-stl.hpp" @@ -50,7 +51,6 @@ //#include "proc/play/timings.hpp" //#include "lib/sync.hpp" -#include //#include #include #include @@ -93,7 +93,7 @@ namespace play { * implementation; yet it may as well be called from a separate * service thread or some kind of callback. * @note the meaning of FrameID is implementation defined. - * @note typically the concrete connection is noncopyable + * @note typically the concrete connection is non-copyable */ class OutputSlot::Connection { @@ -119,7 +119,7 @@ namespace play { */ class OutputSlot::ConnectionState : public OutputSlot::Allocation - , boost::noncopyable + , util::NonCopyable { public: virtual ~ConnectionState() { } diff --git a/src/proc/play/output-slot.cpp b/src/proc/play/output-slot.cpp index 15e50f999..1ae9d3c4c 100644 --- a/src/proc/play/output-slot.cpp +++ b/src/proc/play/output-slot.cpp @@ -30,7 +30,6 @@ #include "proc/play/output-slot.hpp" #include "proc/play/output-slot-connection.hpp" -#include #include diff --git a/src/proc/play/output-slot.hpp b/src/proc/play/output-slot.hpp index 87d685dad..8cb7a7baf 100644 --- a/src/proc/play/output-slot.hpp +++ b/src/proc/play/output-slot.hpp @@ -72,8 +72,8 @@ #include "proc/engine/buffer-provider.hpp" #include "proc/play/timings.hpp" #include "lib/iter-source.hpp" +#include "lib/nocopy.hpp" -#include #include @@ -108,7 +108,7 @@ namespace play { * through the Allocation object returned from there. */ class OutputSlot - : boost::noncopyable + : util::NonCopyable { protected: diff --git a/src/proc/play/play-controller.hpp b/src/proc/play/play-controller.hpp index 3bb16e876..7960a830b 100644 --- a/src/proc/play/play-controller.hpp +++ b/src/proc/play/play-controller.hpp @@ -36,8 +36,8 @@ //#include "include/display-facade.h" //#include "common/instancehandle.hpp" //#include "lib/singleton-ref.hpp" +#include "lib/nocopy.hpp" -#include //#include @@ -52,7 +52,7 @@ namespace play { * Isn't lumiera::Play::Controller already sufficient? */ class PlayController - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/proc/play/play-process.hpp b/src/proc/play/play-process.hpp index 3b195012a..8334eeb9d 100644 --- a/src/proc/play/play-process.hpp +++ b/src/proc/play/play-process.hpp @@ -52,6 +52,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" //#include "include/dummy-player-facade.h" //#include "include/display-facade.h" //#include "common/instancehandle.hpp" @@ -60,8 +61,7 @@ #include "proc/engine/calc-stream.hpp" #include "lib/iter-source.hpp" ////////////////////TICKET #493 : only using the IterSource base feature here #include "lib/util.hpp" -// -#include + #include //#include #include @@ -127,7 +127,7 @@ namespace play { * from the PlayService. */ class PlayProcess - : boost::noncopyable + : util::NonCopyable { OutputFeeds outputFeeds_; diff --git a/src/proc/play/play-service.hpp b/src/proc/play/play-service.hpp index 2dcf103d8..01978a250 100644 --- a/src/proc/play/play-service.hpp +++ b/src/proc/play/play-service.hpp @@ -57,10 +57,10 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/play-facade.h" #include "common/interface-facade-link.hpp" -#include #include //#include @@ -100,7 +100,7 @@ namespace play { */ class PlayService : public lumiera::Play - , boost::noncopyable + , util::NonCopyable { InterfaceFacadeLink facadeAccess_; std::unique_ptr pTable_; diff --git a/src/proc/play/render-configurator.hpp b/src/proc/play/render-configurator.hpp index 85b868b36..47833cf1b 100644 --- a/src/proc/play/render-configurator.hpp +++ b/src/proc/play/render-configurator.hpp @@ -35,6 +35,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" //#include "include/dummy-player-facade.h" //#include "include/display-facade.h" //#include "common/instancehandle.hpp" @@ -46,8 +47,7 @@ #include "proc/play/output-manager.hpp" //#include "lib/iter-source.hpp" //#include "lib/util.hpp" -// -#include + #include #include //#include @@ -72,7 +72,7 @@ namespace play { /** Strategy for configuring the render process */ class RenderConfigurator - : boost::noncopyable + : util::NonCopyable { public: diff --git a/src/proc/play/sound/jack-output.hpp b/src/proc/play/sound/jack-output.hpp index 4aa50f4d2..aba5d1db4 100644 --- a/src/proc/play/sound/jack-output.hpp +++ b/src/proc/play/sound/jack-output.hpp @@ -41,7 +41,6 @@ // //#include //#include -//#include //#include //#include diff --git a/src/proc/play/timings.hpp b/src/proc/play/timings.hpp index e511ee780..5d61f614e 100644 --- a/src/proc/play/timings.hpp +++ b/src/proc/play/timings.hpp @@ -50,7 +50,6 @@ //#include "lib/iter-source.hpp" //#include "lib/sync.hpp" -//#include //#include //#include #include diff --git a/src/proc/streamtype.hpp b/src/proc/streamtype.hpp index 5f2436ede..a6475cc60 100644 --- a/src/proc/streamtype.hpp +++ b/src/proc/streamtype.hpp @@ -38,7 +38,6 @@ //#include "common/query.hpp" #include "lib/idi/entry-id.hpp" -#include namespace proc { @@ -52,7 +51,8 @@ namespace proc { /** * @todo this is just a draft to show the general idea.... */ - struct StreamType : boost::noncopyable + struct StreamType + : util::NonCopyable { enum MediaKind { diff --git a/tests/basics/time/time-control-test.cpp b/tests/basics/time/time-control-test.cpp index 624c211d0..c5be1358e 100644 --- a/tests/basics/time/time-control-test.cpp +++ b/tests/basics/time/time-control-test.cpp @@ -81,7 +81,7 @@ namespace test{ */ template class TestListener - : boost::noncopyable + : util::NonCopyable { mutable ScopedHolder received_; diff --git a/tests/core/proc/play/diagnostic-output-slot.hpp b/tests/core/proc/play/diagnostic-output-slot.hpp index 018d97150..ba1cdfd1f 100644 --- a/tests/core/proc/play/diagnostic-output-slot.hpp +++ b/tests/core/proc/play/diagnostic-output-slot.hpp @@ -32,6 +32,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "include/logging.h" #include "proc/play/output-slot.hpp" #include "proc/play/output-slot-connection.hpp" @@ -47,7 +48,6 @@ #include "proc/engine/testframe.hpp" //#include "lib/sync.hpp" -#include //#include //#include #include @@ -97,7 +97,7 @@ namespace play { */ class TrackingInMemoryBlockSequence : public OutputSlot::Connection - , boost::noncopyable + , util::NonCopyable { typedef std::unordered_set FrameTrackingInfo; @@ -366,7 +366,7 @@ namespace play { */ class OutputFramesLog : public lib::IterSource - , boost::noncopyable + , util::NonCopyable { TrackingInMemoryBlockSequence const& outSeq_; uint currentFrame_; diff --git a/tests/gui/bus-term-test.cpp b/tests/gui/bus-term-test.cpp index 32b45a4d2..1e5e9058e 100644 --- a/tests/gui/bus-term-test.cpp +++ b/tests/gui/bus-term-test.cpp @@ -598,7 +598,7 @@ namespace test { * a representation of the "changes" in diff format */ struct BorgGenerator - : boost::noncopyable + : util::NonCopyable , TreeDiffLanguage , DiffSource { diff --git a/tests/gui/test/placeholder-command.hpp b/tests/gui/test/placeholder-command.hpp index 0cd1593e4..cd4528168 100644 --- a/tests/gui/test/placeholder-command.hpp +++ b/tests/gui/test/placeholder-command.hpp @@ -47,10 +47,7 @@ #include "lib/test/event-log.hpp" #include "proc/control/command-def.hpp" #include "lib/format-util.hpp" -//#include "lib/diff/gen-node.hpp" -//#include -//#include #include #include @@ -69,7 +66,7 @@ namespace test{ * This is a typed definition frame with some operations, * suitably to be bound into a Proc-Layer command. The actual * command "operation" just logs invocation into a statically - * obtained \ref EventLog Event-Log instance. + * obtained [Event-Log](\ref EventLog) instance. * @note by design, in Lumiera the actual command functions are stateless. * For this reason, the command framework provides no way to associate * an _instance_ of some kind of "command object" with the (conceptual) diff --git a/tests/gui/test/test-nexus.hpp b/tests/gui/test/test-nexus.hpp index 664c24754..73639ac6f 100644 --- a/tests/gui/test/test-nexus.hpp +++ b/tests/gui/test/test-nexus.hpp @@ -46,6 +46,7 @@ #include "lib/error.hpp" +#include "lib/nocopy.hpp" #include "gui/ctrl/bus-term.hpp" #include "gui/model/tangible.hpp" #include "gui/ctrl/state-manager.hpp" @@ -53,7 +54,6 @@ #include "lib/test/event-log.hpp" #include "lib/diff/gen-node.hpp" -#include #include #include @@ -74,7 +74,7 @@ namespace test{ * @see abstract-tangible-test.cpp */ class Nexus - : boost::noncopyable + : util::NonCopyable { public: diff --git a/tests/library/dependency-configuration-test.cpp b/tests/library/dependency-configuration-test.cpp index f63159993..4bc4991b0 100644 --- a/tests/library/dependency-configuration-test.cpp +++ b/tests/library/dependency-configuration-test.cpp @@ -37,8 +37,6 @@ #include "lib/depend2.hpp" #include "lib/depend-inject.hpp" -#include - namespace lib { @@ -50,7 +48,7 @@ namespace test{ namespace { struct Dum - : boost::noncopyable + : util::NonCopyable { virtual ~Dum() { } virtual int probe() =0; diff --git a/tests/library/iter-source-test.cpp b/tests/library/iter-source-test.cpp index 07136d58d..b34890cf5 100644 --- a/tests/library/iter-source-test.cpp +++ b/tests/library/iter-source-test.cpp @@ -29,12 +29,12 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" #include "lib/format-cout.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" #include "lib/iter-source.hpp" #include -#include #include #include #include @@ -48,7 +48,6 @@ namespace test{ using ::Test; using boost::lexical_cast; - using boost::noncopyable; using lib::time::TimeVar; using lib::test::randStr; using lib::test::randTime; @@ -84,7 +83,7 @@ namespace test{ */ class TestSource : public IterSource - , noncopyable + , util::NonCopyable { string buffer_; diff --git a/tests/library/meta/tuple-record-init-test.cpp b/tests/library/meta/tuple-record-init-test.cpp index bbe68543a..7a53c733a 100644 --- a/tests/library/meta/tuple-record-init-test.cpp +++ b/tests/library/meta/tuple-record-init-test.cpp @@ -32,7 +32,6 @@ #include "lib/format-cout.hpp" #include "lib/format-util.hpp" -#include #include using lib::Symbol; diff --git a/tests/library/opaque-unchecked-buffer-test.cpp b/tests/library/opaque-unchecked-buffer-test.cpp index 35f0f8303..c6d721f38 100644 --- a/tests/library/opaque-unchecked-buffer-test.cpp +++ b/tests/library/opaque-unchecked-buffer-test.cpp @@ -28,11 +28,11 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" +#include "lib/nocopy.hpp" #include "lib/util.hpp" #include "lib/opaque-holder.hpp" -#include #include #include @@ -42,8 +42,8 @@ namespace test{ using ::Test; using util::min; using lumiera::error::LUMIERA_ERROR_FATAL; + using util::NonCopyable; - using boost::noncopyable; using std::strlen; using std::cout; using std::endl; @@ -58,7 +58,7 @@ namespace test{ struct Base - : noncopyable + : NonCopyable { uint id_; diff --git a/tests/library/scoped-holder-test.cpp b/tests/library/scoped-holder-test.cpp index c8549a6be..baee6dbf0 100644 --- a/tests/library/scoped-holder-test.cpp +++ b/tests/library/scoped-holder-test.cpp @@ -28,14 +28,13 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" +#include "lib/format-cout.hpp" #include "lib/util.hpp" #include "lib/error.hpp" #include "lib/scoped-holder.hpp" #include "lib/test/testdummy.hpp" -#include -#include #include @@ -47,7 +46,6 @@ namespace test{ using lumiera::error::LUMIERA_ERROR_LOGIC; using std::map; - using std::cout; typedef ScopedHolder HolderD; typedef ScopedPtrHolder PtrHolderD;