Lumiera  0.pre.03
»edit your freedom«
display-facade.h
Go to the documentation of this file.
1 /*
2  DISPLAY-FACADE.h - accessing a display for outputting frames
3 
4  Copyright (C)
5  2009, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
34 #ifndef STAGE_INTERFACE_DISPLAY_H
35 #define STAGE_INTERFACE_DISPLAY_H
36 
38 
39 
40 
41 
42 
43 #ifdef __cplusplus /* ============== C++ Interface ================= */
44 
45 #include "lib/depend.hpp"
46 #include "lib/handle.hpp"
47 
48 
49 
50 
51 namespace lumiera {
52 
53 
54  /**************************************************************/
77  class Display
78  {
79  public:
82 
83 
90  class Sink
91  : public lib::Handle<lumiera_displaySlot>
92  {
93 
94  public:
98  inline void
99  operator() (LumieraDisplayFrame frame)
100  {
101  impl().put_ (&impl(),frame);
102  }
103  };
104 
105 
106 
109  virtual Sink getHandle(LumieraDisplaySlot) =0;
110 
111 
112  virtual ~Display();
113  };
114 
115 
116 
117 
118 } // namespace lumiera
119 
120 
121 
122 extern "C" {
123 #endif /* =========================== CL Interface ===================== */
124 
125 
126 #include "common/interface.h"
127 
128 LUMIERA_INTERFACE_DECLARE (lumieraorg_Display, 0
129  , LUMIERA_INTERFACE_SLOT (void, allocate,(LumieraDisplaySlot) )
130  , LUMIERA_INTERFACE_SLOT (void, release,(LumieraDisplaySlot) )
131  , LUMIERA_INTERFACE_SLOT (void, put,(LumieraDisplaySlot, LumieraDisplayFrame))
132 );
133 
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 #endif
Generic opaque reference counting handle, for accessing a service and managing its lifecycle...
Definition: handle.hpp:63
Interface for outputting frames to an (already allocated) viewer or display.
static lib::Depend< Display > facade
get an implementation instance of this service
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition: interface.h:154
virtual ~Display()
this is an interface
void operator()(LumieraDisplayFrame frame)
push a frame up to the display, calling through the CL Interface.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Lumiera interface macros and structures.
virtual Sink getHandle(LumieraDisplaySlot)=0
allocate an already existing display/viewer for output
Singleton services and Dependency Injection.
Lumiera public interface.
Definition: advice.cpp:104
A generic opaque handle to an implementation entity, including lifecycle management.
Opaque handles and similar typedefs used to communicate via the lumiera::Display and lumiera::DummyPl...
Functor for pushing frames to the display.