diff --git a/src/common/interfaceproxy.cpp b/src/common/interfaceproxy.cpp index 6d72dc967..8386aa343 100644 --- a/src/common/interfaceproxy.cpp +++ b/src/common/interfaceproxy.cpp @@ -28,31 +28,6 @@ using util::cStr; - -#include "include/guinotificationfacade.h" - -namespace gui { - - /** storage for the facade proxy factory used by client code to invoke through the interface */ - lumiera::facade::Accessor GuiNotification::facade; - -} // namespace gui - - - -#include "proc/play/dummy-player-service.hpp" - -namespace proc { - namespace play { - - /** storage for the DummyPlayer facade proxy factory... */ - lumiera::facade::Accessor DummyPlayer::facade; - -} } - - - - namespace lumiera { namespace facade { @@ -117,10 +92,30 @@ namespace lumiera { Proxy::close(); } - + } // namespace facade + +} // namespace lumiera + + + + /* ==================== GuiNotification =================================== */ +#include "include/guinotificationfacade.h" + +namespace gui { + + /** storage for the facade proxy factory used by client code to invoke through the interface */ + lumiera::facade::Accessor GuiNotification::facade; + +} // namespace gui + + + +namespace lumiera { + namespace facade { + typedef InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0) , gui::GuiNotification > Handle_GuiNotification; @@ -144,7 +139,10 @@ namespace lumiera { template void openProxy (Handle_GuiNotification const&); template void closeProxy (void); - + } // namespace facade + +} // namespace lumiera + @@ -152,6 +150,20 @@ namespace lumiera { /* ==================== DummyPlayer ======================================= */ +#include "proc/play/dummy-player-service.hpp" + +namespace proc { + namespace play { + + /** storage for the DummyPlayer facade proxy factory... */ + lumiera::facade::Accessor DummyPlayer::facade; + +} } + + +namespace lumiera { + namespace facade { + typedef lumiera::InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0) , proc::play::DummyPlayer > Handle_DummyPlayer; diff --git a/src/include/dummy-player-facade.h b/src/include/dummy-player-facade.h index b10da3684..c2750e1c8 100644 --- a/src/include/dummy-player-facade.h +++ b/src/include/dummy-player-facade.h @@ -86,8 +86,6 @@ namespace proc { class Process : public lib::Handle { - friend class ProcessImpl; - public: void play(bool); void* const getFrame(); diff --git a/src/lib/handle.hpp b/src/lib/handle.hpp index cf2059923..30bbca52f 100644 --- a/src/lib/handle.hpp +++ b/src/lib/handle.hpp @@ -87,11 +87,23 @@ namespace lib { template explicit Handle (weak_ptr const& wr) : smPtr_(wr) { } template explicit Handle (std::auto_ptr & ar) : smPtr_(ar) { } - Handle& operator= (Handle const& r) { smPtr_ = r.smPtr_; return *this; } + Handle& operator=(Handle const& r) { smPtr_ = r.smPtr_; return *this; } template Handle& operator=(shared_ptr const& sr) { smPtr_ = sr; return *this; } template Handle& operator=(std::auto_ptr & ar) { smPtr_ = ar; return *this; } + /** Activation of the handle by the managing service. + * @param impl the implementation object this handle is tied to + * @param whenDead functor to be invoked when reaching end-of-life + */ + template + Handle& + activate (IMP* impl, DEL whenDead) + { + smPtr_.reset (impl, whenDead); + return *this; + } + /** deactivate this handle, so it isn't tied any longer * to the associated implementation or service object. * When all handles have either been deactivated or @@ -106,24 +118,11 @@ namespace lib { /** implicit conversion to "bool" */ operator __unspecified_bool_type() const { return &Handle::smPtr_; } // never throws bool operator! () const { return !bool(smPtr_); } // dito - + protected: - - /** Activation of the handle by the managing service. - * @param impl the implementation object this handle is tied to - * @param whenDead functor to be invoked when reaching end-of-life - */ - template - Handle& - activate (IMP* impl, DEL whenDead) - { - smPtr_.reset (impl, whenDead); - return *this; - } - IMP& impl() { diff --git a/src/proc/play/dummy-player-service.cpp b/src/proc/play/dummy-player-service.cpp index 892237d41..27f78559f 100644 --- a/src/proc/play/dummy-player-service.cpp +++ b/src/proc/play/dummy-player-service.cpp @@ -291,8 +291,9 @@ namespace proc { /* === Process Implementation === */ - ProcessImpl::ProcessImpl() : fps_(0), play_(false), imageGen_(0) {} - ProcessImpl::~ProcessImpl() {} + ProcessImpl::ProcessImpl() + : fps_(0), play_(false), imageGen_(0) + { } DummyPlayer::Process diff --git a/src/proc/play/dummy-player-service.hpp b/src/proc/play/dummy-player-service.hpp index 0648f982a..92c4d27ca 100644 --- a/src/proc/play/dummy-player-service.hpp +++ b/src/proc/play/dummy-player-service.hpp @@ -67,7 +67,8 @@ namespace proc { * ProcessImpl instance and have to manage the lifecycle manually. */ class ProcessImpl - : public lumiera_playprocess + : public lumiera_playprocess, + boost::noncopyable { uint fps_; bool play_; @@ -77,7 +78,6 @@ namespace proc { public: ProcessImpl() ; - ~ProcessImpl(); /* Implementation-level API to be used By DummyPlayerService */