Lumiera  0.pre.03
»edit your freedom«
interfaceproxy.hpp
Go to the documentation of this file.
1 /*
2  INTERFACEPROXY - definition of forwarding proxies for the facade interfaces
3 
4  Copyright (C)
5  2008, 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 
114 #ifndef LUMIERA_INTERFACE_PROXY_H
115 #define LUMIERA_INTERFACE_PROXY_H
116 
117 
118 #include "common/instancehandle.hpp"
119 #include "lib/error.hpp"
120 #include "lib/util.hpp"
121 
122 
123 namespace lumiera {
124 namespace facade {
125 
139  template<class IHA>
140  struct Binding;
141 
142  template<class FA, class I>
143  struct Binding<InstanceHandle<I,FA>>
144  : public FA
145  {
147 
148  I& _i_;
149 
150  Binding (IHandle const& iha)
151  : _i_(iha.get())
152  { }
153  };
154 
155 
156 
157  template<class I, class FA>
158  Link<I,FA>::Link (IH const& iha)
159  : ServiceHandle<I,FA>{iha}
160  { }
161 
162  template<class I, class FA>
163  Link<I,FA>::~Link() { }
164 
165 
166  template<class I, class FA>
167  FA*
168  Link<I,FA>::operator->() const
169  {
171  }
172 
173 
174 
175 }} // namespace lumiera::facade
176 
177 #endif
I & get() const
directly access the instance via the CL interface
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Implementation Base for building Facade Proxy implementations.
Lumiera error handling (C++ interface).
Handle tracking the registration of an interface, deregistering it on deletion.
Lumiera public interface.
Definition: advice.cpp:104
A handle template for automatically dealing with interface and plugin registration and deregistration...
typename lib::DependInject< FA >::template ServiceInstance< Proxy< InstanceHandle< I, FA > >> ServiceHandle
The ServiceHandle automatically creates and manages the Proxy instance.