Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dummy-player-interface-proxy.cpp
Go to the documentation of this file.
1 /*
2  DummyPlayer(Proxy) - access point and service implementing a dummy test player
3 
4  Copyright (C) Lumiera.org
5  2009, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
24 
52 
53 namespace lumiera {
54 
55  // emit the vtable here into this translation unit within liblumieracommon.so ...
58 
59 
62 
63 
64 
65 
66  namespace facade {
67 
68 
69 
70  /* ==================== DummyPlayer ======================================= */
71 
72  using Interface = LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0);
74 
76 
77 
78  template<>
79  class Proxy<IHandle>
80  : public Binding<IHandle>
81  {
82  //----Proxy-Implementation-of-DummyPlayer--------
85 
96  Process start(LumieraDisplaySlot viewerHandle) override
97  {
98  ProcessImplementationLink* pP = static_cast<ProcessImplementationLink*> (_i_.startPlay (viewerHandle));
99 
100  if (!pP)
101  throw lumiera::error::State("failed to start DummyPlayer", lumiera_error());
102 
103  return pP->createHandle();
104  }
105 
106 
107 
108  public:
110  };
111 
112 
114  template
115  class Link<Interface,Facade>;
116 
117  } // namespace facade
118 
119 
120  /* === Forwarding function(s) on the Process handle === */
121 
122  void
124  {
125  // access the implementation via smart-Handle
126  impl().doPlay(yes);
127  }
128 
129 
130 } // namespace lumiera
Playback process, front-end to be used by client code.
InstanceHandle< Interface, Facade > IHandle
Handle tracking the registration of an interface, deregistering it on deletion.
lumiera_displaySlot * LumieraDisplaySlot
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:275
LumieraError< LERR_(STATE)> State
Definition: error.hpp:214
lumiera_err lumiera_error(void)
Get and clear current error state.
Definition: error-state.c:124
LUMIERA_INTERFACE_INAME(lumieraorg_Display, 0) Interface
Implementation Base for building Facade Proxy implementations.
DummyPlayConnection< PlayTestFrames_Strategy > DummyPlayer
Implementation of C++ binding proxies on top of the (plain-C based) interface system.
static lib::Depend< DummyPlayer > facade
get an implementation instance of this service
#define LUMIERA_INTERFACE_INAME(name, version)
Construct a type identifier for an interface.
Definition: interface.h:102
Lumiera public interface.
Process start(LumieraDisplaySlot viewerHandle) override
Actual implementation of a single (dummy) playback process.