diff --git a/src/gui/display-interface-proxy.cpp b/src/common/display-interface-proxy.cpp similarity index 80% rename from src/gui/display-interface-proxy.cpp rename to src/common/display-interface-proxy.cpp index 96a79290b..30d74a507 100644 --- a/src/gui/display-interface-proxy.cpp +++ b/src/common/display-interface-proxy.cpp @@ -30,7 +30,7 @@ ** @see display-facade.hpp ** @see display-service.hpp actual implementation within the GUI ** @deprecated obsolete early design draft from 2009; - ** as of 2018 only kept in source to compile some likewise obsolete UI widgets. + ** as of 2018 only kept in source to compile some likewise obsolete UI widgets. */ @@ -48,6 +48,9 @@ namespace lumiera { /// emit the vtable here into this translation unit within liblumieracommon.so... Display::~Display() { } + /** static storage for the facade access front-end */ + lib::Depend Display::facade; + } // namespace lumiera @@ -55,14 +58,12 @@ namespace lumiera { namespace lumiera { namespace facade { - typedef InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_Display, 0) - , lumiera::Display - > IHandle_Display; - - + using IHandle = InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_Display, 0) + , lumiera::Display + >; template<> - class Proxy - : public Binding + class Proxy + : public Binding { //----Proxy-Implementation-of-lumiera::Display-------- @@ -84,7 +85,12 @@ namespace facade { }; -// template void openProxy (IHandle_Display const&); -// template void closeProxy (void); - -}} // namespace lumiera::facade +} //namespace facade + + +// emit code for the proxy implementation here... +template +class InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_Display, 0) + , lumiera::Display + >; +} // namespace lumiera diff --git a/src/common/instancehandle.hpp b/src/common/instancehandle.hpp index c57170791..fdfd9470d 100644 --- a/src/common/instancehandle.hpp +++ b/src/common/instancehandle.hpp @@ -127,7 +127,6 @@ namespace lumiera { : ServiceHandle { using IH = InstanceHandle; - using SH = ServiceHandle; Link (IH const& iha); ~Link (); @@ -148,7 +147,7 @@ namespace lumiera { using IH = InstanceHandle; IH& ih_; - Link (IH const& ih) + Link (IH& ih) : ih_{ih} { } @@ -227,7 +226,7 @@ namespace lumiera { /** act as smart pointer providing access through the facade. * @note we don't provide operator* */ - FA * operator-> () const { return facadeLink_; } + FA * operator-> () const { return facadeLink_.operator ->(); } /** directly access the instance via the CL interface */ I& get () const { ENSURE(instance_); return *instance_; } diff --git a/src/gui/notification-interface-proxy.cpp b/src/common/notification-interface-proxy.cpp similarity index 79% rename from src/gui/notification-interface-proxy.cpp rename to src/common/notification-interface-proxy.cpp index f75d7b431..5debc71ab 100644 --- a/src/gui/notification-interface-proxy.cpp +++ b/src/common/notification-interface-proxy.cpp @@ -40,19 +40,22 @@ #include "include/gui-notification-facade.h" #include "include/interfaceproxy.hpp" +namespace gui { + /** static storage for the facade access front-end */ + lib::Depend GuiNotification::facade; +} namespace lumiera { namespace facade { using gui::ID; using lib::diff::MutationMessage; - typedef InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0) - , gui::GuiNotification - > IHandle_GuiNotification; - - template - class Proxy - : public Binding + using IHandle = InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0) + , gui::GuiNotification + >; + template<> + class Proxy + : public Binding { using Level = gui::NotifyLevel; @@ -69,9 +72,12 @@ namespace facade { using IBinding::IBinding; }; - -// template void openProxy (IHandle_GuiNotification const&); -// template void closeProxy (void); - - -}} // namespace lumiera::facade +} //namespace facade + + +// emit code for the proxy implementation here... +template +class InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0) + , gui::GuiNotification + >; +} // namespace lumiera diff --git a/src/gui/display-service.cpp b/src/gui/display-service.cpp index 3a84b573a..0aa975c59 100644 --- a/src/gui/display-service.cpp +++ b/src/gui/display-service.cpp @@ -120,7 +120,7 @@ namespace gui { - using lumiera::facade::LUMIERA_ERROR_FACADE_LIFECYCLE; + using lumiera::error::LERR_(LIFECYCLE); lib::Depend _instance; ///< a backdoor for the C Language impl to access the actual SessionCommand implementation... @@ -136,7 +136,7 @@ namespace gui { { if (!_instance) { - lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, 0); + lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, 0); return; } @@ -153,7 +153,7 @@ namespace gui { { if (!_instance) { - lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, 0); + lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, 0); return; } diff --git a/src/gui/notification-service.cpp b/src/gui/notification-service.cpp index 76d47b5a0..4a30fcdf3 100644 --- a/src/gui/notification-service.cpp +++ b/src/gui/notification-service.cpp @@ -209,7 +209,7 @@ namespace gui { - using lumiera::facade::LUMIERA_ERROR_FACADE_LIFECYCLE; + using lumiera::error::LERR_(LIFECYCLE); lib::Depend _instance; ///< a backdoor for the C Language impl to access the actual SessionCommand implementation... @@ -223,7 +223,7 @@ namespace gui { , LUMIERA_INTERFACE_INLINE (displayInfo, void, (uint severity, const char* text), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, text); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, text); else _instance().displayInfo (NotifyLevel(severity), text); } @@ -231,7 +231,7 @@ namespace gui { , LUMIERA_INTERFACE_INLINE (markError, void, (LumieraUid element, const char* text), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, text); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, text); else _instance().markError (reinterpret_cast (*element), text); } @@ -239,7 +239,7 @@ namespace gui { , LUMIERA_INTERFACE_INLINE (markNote, void, (LumieraUid element, const char* text), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, text); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, text); else _instance().markNote (reinterpret_cast (*element), text); } @@ -247,7 +247,7 @@ namespace gui { , LUMIERA_INTERFACE_INLINE (mutate, void, (LumieraUid element, void* diff), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, "passing diff message"); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, "passing diff message"); else _instance().mutate (reinterpret_cast (*element), move(*reinterpret_cast (diff))); } @@ -255,7 +255,7 @@ namespace gui { , LUMIERA_INTERFACE_INLINE (triggerGuiShutdown, void, (const char* cause), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, cause); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, cause); else _instance().triggerGuiShutdown (cause); } diff --git a/src/include/display-facade.h b/src/include/display-facade.h index 21f2d35ca..270dc6172 100644 --- a/src/include/display-facade.h +++ b/src/include/display-facade.h @@ -118,8 +118,7 @@ namespace lumiera { virtual Sink getHandle(LumieraDisplaySlot) =0; - protected: - virtual ~Display(); + virtual ~Display(); ///< this is an interface }; diff --git a/src/include/dummy-player-facade.h b/src/include/dummy-player-facade.h index cd26970e7..1fc72eec2 100644 --- a/src/include/dummy-player-facade.h +++ b/src/include/dummy-player-facade.h @@ -131,6 +131,7 @@ namespace lumiera { protected: virtual ~DummyPlayer(); + friend class lib::DependencyFactory; }; diff --git a/src/include/gui-notification-facade.h b/src/include/gui-notification-facade.h index 3a6de7446..2ebee467d 100644 --- a/src/include/gui-notification-facade.h +++ b/src/include/gui-notification-facade.h @@ -76,6 +76,10 @@ namespace gui { */ class GuiNotification { + protected: + virtual ~GuiNotification() {} ///< this is an interface + friend class lib::DependencyFactory; + public: static lib::Depend facade; @@ -108,9 +112,6 @@ namespace gui { */ virtual void triggerGuiShutdown (string const& cause) =0; - - protected: - virtual ~GuiNotification() {} }; diff --git a/src/include/interfaceproxy.hpp b/src/include/interfaceproxy.hpp index 0e1277356..c9404922c 100644 --- a/src/include/interfaceproxy.hpp +++ b/src/include/interfaceproxy.hpp @@ -93,9 +93,11 @@ #define LUMIERA_INTERFACE_PROXY_H -#include "lib/error.hpp" #include "common/instancehandle.hpp" +#include "lib/error.hpp" +#include "lib/util.hpp" +using util::cStr; namespace lumiera { namespace facade { @@ -114,13 +116,12 @@ namespace facade { * to the service lifecycle. */ template - class Binding; + struct Binding; template - class Binding> + struct Binding> : public FA { - protected: typedef InstanceHandle IHandle; typedef Binding IBinding; @@ -132,6 +133,25 @@ namespace facade { }; + + template + Link::Link (IH const& iha) + : ServiceHandle{iha} + { } + + template + Link::~Link() { } + + + template + FA* + Link::operator->() const + { + return ServiceHandle::operator->(); + } + + + }} // namespace lumiera::facade #endif diff --git a/src/include/play-facade.hpp b/src/include/play-facade.hpp index dfe141c64..abf8188d2 100644 --- a/src/include/play-facade.hpp +++ b/src/include/play-facade.hpp @@ -81,6 +81,9 @@ namespace lumiera { */ class Play { + protected: + virtual ~Play(); + friend class lib::DependencyFactory; public: /** get an implementation instance of this service */ @@ -145,8 +148,6 @@ namespace lumiera { Controller perform(Clip); protected: - virtual ~Play(); - /** core operation: create a new playback process * outputting to the given viewer/display */ virtual Controller connect(ModelPorts, Output) =0; diff --git a/src/include/session-command-facade.h b/src/include/session-command-facade.h index 787d42a1e..fee2c54c1 100644 --- a/src/include/session-command-facade.h +++ b/src/include/session-command-facade.h @@ -109,7 +109,8 @@ namespace control { protected: - virtual ~SessionCommand() {} + virtual ~SessionCommand() {} ///< this is an interface + friend class lib::DependencyFactory; }; diff --git a/src/proc/control/session-command-interface-proxy.cpp b/src/proc/control/session-command-interface-proxy.cpp index c054e3ba0..518f93a2c 100644 --- a/src/proc/control/session-command-interface-proxy.cpp +++ b/src/proc/control/session-command-interface-proxy.cpp @@ -40,17 +40,22 @@ #include "include/session-command-facade.h" #include "include/interfaceproxy.hpp" +namespace proc { +namespace control{ + /** static storage for the facade access front-end */ + lib::Depend SessionCommand::facade; +}} namespace lumiera { namespace facade { - typedef InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_SessionCommand, 0) - , proc::control::SessionCommand - > IHandle_SessionCommand; + using IHandle = InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_SessionCommand, 0) + , proc::control::SessionCommand + >; template<> - class Proxy - : public Binding + class Proxy + : public Binding { //----Proxy-Implementation-of-SessionCommand-------- @@ -64,9 +69,12 @@ namespace facade { using IBinding::IBinding; }; - -// template void openProxy (IHandle_SessionCommand const&); -// template void closeProxy (void); - - -}} // namespace lumiera::facade +} //namespace facade + + +// emit code for the proxy implementation here... +template +class InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_SessionCommand, 0) + , proc::control::SessionCommand + >; +} // namespace lumiera diff --git a/src/proc/control/session-command-service.cpp b/src/proc/control/session-command-service.cpp index 4f3915bae..b2d8141a7 100644 --- a/src/proc/control/session-command-service.cpp +++ b/src/proc/control/session-command-service.cpp @@ -188,7 +188,7 @@ namespace control { - using lumiera::facade::LUMIERA_ERROR_FACADE_LIFECYCLE; + using lumiera::error::LERR_(LIFECYCLE); lib::Depend _instance; ///< a backdoor for the C Language impl to access the actual SessionCommand implementation... @@ -203,7 +203,7 @@ namespace control { const char*, (const char* cmdID, const char* invocationID), { if (!_instance) - return lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, cmdID); + return lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, cmdID); else return _instance().cycle(cmdID, invocationID); } @@ -211,7 +211,7 @@ namespace control { , LUMIERA_INTERFACE_INLINE (trigger, void, (const char* cmdID, const void* args), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, cmdID); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, cmdID); else _instance().trigger(cmdID, *static_cast (args)); } @@ -219,7 +219,7 @@ namespace control { , LUMIERA_INTERFACE_INLINE (bindArg, void, (const char* cmdID, const void* args), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, cmdID); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, cmdID); else _instance().bindArg(cmdID, *static_cast (args)); } @@ -227,7 +227,7 @@ namespace control { , LUMIERA_INTERFACE_INLINE (invoke, void, (const char* cmdID), { - if (!_instance) lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, cmdID); + if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, cmdID); else _instance().invoke(cmdID); } diff --git a/src/proc/play/dummy-player-interface-proxy.cpp b/src/proc/play/dummy-player-interface-proxy.cpp index af420ce22..0bb788bf8 100644 --- a/src/proc/play/dummy-player-interface-proxy.cpp +++ b/src/proc/play/dummy-player-interface-proxy.cpp @@ -41,9 +41,9 @@ ** proxy used by the client code to access the interface). ** ** @see dummy-player-facade.hpp - ** @see dummy-player-service.hpp actual implementation within the Proc-Layer + ** @see dummy-player-service.hpp actual implementation within the Proc-Layer ** @deprecated obsolete early design draft from 2009; - ** as of 2018 only kept in source to compile some likewise obsolete UI widgets. + ** as of 2018 only kept in source to compile some likewise obsolete UI widgets. */ @@ -52,7 +52,7 @@ /* ==================== DummyPlayer ======================================= */ - + #include "include/dummy-player-facade.h" #include "include/interfaceproxy.hpp" @@ -61,20 +61,22 @@ namespace lumiera { // emit the vtable here into this translation unit within liblumieracommon.so ... DummyPlayer::~DummyPlayer() { } + /** static storage for the facade access front-end */ + lib::Depend DummyPlayer::facade; namespace facade { - typedef lumiera::InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0) - , lumiera::DummyPlayer - > IHandle_DummyPlayer; + using IHandle = InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0) + , lumiera::DummyPlayer + >; template<> - class Proxy - : public Binding + class Proxy + : public Binding { //----Proxy-Implementation-of-DummyPlayer-------- typedef lumiera::DummyPlayer::Process Process; @@ -106,13 +108,8 @@ namespace lumiera { using IBinding::IBinding; }; - -// template void openProxy (IHandle_DummyPlayer const&); -// template void closeProxy (void); - - } // namespace facade - + /* === Forwarding function(s) on the Process handle === */ @@ -128,4 +125,9 @@ namespace lumiera { + +template +class InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0) + , lumiera::DummyPlayer + >; } // namespace lumiera diff --git a/src/proc/play/dummy-player-service.cpp b/src/proc/play/dummy-player-service.cpp index 346f53f62..3a4d5f036 100644 --- a/src/proc/play/dummy-player-service.cpp +++ b/src/proc/play/dummy-player-service.cpp @@ -176,7 +176,7 @@ namespace proc { - using lumiera::facade::LUMIERA_ERROR_FACADE_LIFECYCLE; + using lumiera::error::LERR_(LIFECYCLE); lib::Depend _instance; ///< a backdoor for the C Language impl to access the actual SessionCommand implementation... typedef ProcessImpl* ProcP; @@ -192,7 +192,7 @@ namespace proc { { if (!_instance) { - lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, 0); + lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, 0); return 0; } @@ -204,7 +204,7 @@ namespace proc { { if (!_instance) { - lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, 0); + lumiera_error_set(LUMIERA_ERROR_LIFECYCLE, 0); return; } @@ -219,7 +219,7 @@ namespace proc { { if (!_instance) { - lumiera_error_set(LUMIERA_ERROR_FACADE_LIFECYCLE, 0); + lumiera_error_set(LUMIERA_ERROR_LIFECYCLE, 0); return; } diff --git a/src/proc/play/output-director.hpp b/src/proc/play/output-director.hpp index f1bf22c5a..60bfe39b1 100644 --- a/src/proc/play/output-director.hpp +++ b/src/proc/play/output-director.hpp @@ -46,6 +46,9 @@ #include +namespace lumiera { + class Play; +} namespace proc { namespace play { @@ -54,14 +57,9 @@ namespace play { //using std::shared_ptr; using std::unique_ptr; - - class Play; class PlayService; -//typedef lib::ScopedPtrVect DisplayerTab; - - /**************************************************//** * Management of external Output connections. @@ -73,7 +71,7 @@ namespace play { , public lib::Sync<> { using SigTerm = lumiera::Subsys::SigTerm; - using PlayServiceHandle = lib::DependInject::ServiceInstance; + using PlayServiceHandle = lib::DependInject::ServiceInstance; PlayServiceHandle player_; ///////TODO more components and connections to manage here... diff --git a/src/proc/play/play-service.cpp b/src/proc/play/play-service.cpp index e1f9d5f46..4e40edd4a 100644 --- a/src/proc/play/play-service.cpp +++ b/src/proc/play/play-service.cpp @@ -47,6 +47,8 @@ namespace lumiera { Play::~Play() { } // emit VTables here... + /** static storage for the facade access front-end */ + lib::Depend Play::facade; }//(End) namespace lumiera diff --git a/src/proc/play/play-service.hpp b/src/proc/play/play-service.hpp index e84043134..b666c499e 100644 --- a/src/proc/play/play-service.hpp +++ b/src/proc/play/play-service.hpp @@ -68,7 +68,6 @@ namespace proc { namespace play { using std::string; - using lumiera::facade::InterfaceFacadeLink; //using lumiera::Subsys; //using lumiera::Display; //using lumiera::DummyPlayer; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 9752744d8..133234dc1 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -28508,8 +28508,8 @@ - - + + @@ -28551,14 +28551,14 @@ - - + + - - + + - - + + @@ -28657,6 +28657,18 @@ + + + + + + + + + + + + @@ -28711,23 +28723,25 @@ - + + + - - - - + + + + - - + + - - + + - - + +