Lumiera  0.pre.03
»edit your freedom«
test-interfaces.c
Go to the documentation of this file.
1 /*
2  TEST-INTERFACES - test interfaces declaration and implementation
3 
4  Copyright (C) Lumiera.org
5  2008, Christian Thaeter <ct@pipapo.org>
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 
30 #include "common/interface.h"
33 #include "common/config.h"
35 
36 #include "lib/test/test.h"
37 #include "interface/say-hello.h"
38 
39 /*
40  define 2 example interfaces
41  */
42 
43 LUMIERA_INTERFACE_DECLARE (lumieraorg_testexample_one, 0,
44  LUMIERA_INTERFACE_SLOT (void, foo1, (const char*)),
45  LUMIERA_INTERFACE_SLOT (void, bar1, (const char*)),
46 );
47 
48 LUMIERA_INTERFACE_DECLARE (lumieraorg_testexample_two, 0,
49  LUMIERA_INTERFACE_SLOT (void, foo2, (const char*)),
50  LUMIERA_INTERFACE_SLOT (void, bar2, (const char*)),
51 );
52 
53 LUMIERA_INTERFACE_DECLARE (lumieraorg_testexample_void, 0
54 );
55 
56 
57 /*
58  now the functions we want to bind to them
59  */
60 
61 void
62 testfunc (const char* message)
63 {
64  ECHO ("Called as '%s'", message);
65 }
66 
67 
68 
69 LumieraInterface
70 testacquire (LumieraInterface self, LumieraInterface interface)
71 {
72  (void) interface;
73  ECHO ("Acquire %s_%d_%s", self->interface, self->version, self->name);
74  return self;
75 }
76 
77 
78 void
79 testrelease (LumieraInterface self)
80 {
81  ECHO ("Release %s_%d_%s", self->interface, self->version, self->name);
82 }
83 
84 /*
85  implementation of some example interfaces
86  */
87 
88 LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0,
89  lumieraorg_tests_descriptor,
90  /*self reference, yay*/
91  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
92  testacquire,
93  testrelease,
94  LUMIERA_INTERFACE_INLINE (name,
95  const char*, (LumieraInterface iface),
96  {(void)iface; return "LumieraTest";}
97  ),
98  LUMIERA_INTERFACE_INLINE (brief,
99  const char*, (LumieraInterface iface),
100  {(void)iface; return "Lumiera Test suite examples";}
101  ),
102  LUMIERA_INTERFACE_INLINE (homepage,
103  const char*, (LumieraInterface iface),
104  {(void)iface; return "http://www.lumiera.org/develompent.html";}
105  ),
106  LUMIERA_INTERFACE_INLINE (version,
107  const char*, (LumieraInterface iface),
108  {(void)iface; return "No Version";}
109  ),
110  LUMIERA_INTERFACE_INLINE (author,
111  const char*, (LumieraInterface iface),
112  {(void)iface; return "Christian Thaeter";}
113  ),
114  LUMIERA_INTERFACE_INLINE (email,
115  const char*, (LumieraInterface iface),
116  {(void)iface; return "ct@pipapo.org";}
117  ),
118  LUMIERA_INTERFACE_INLINE (copyright,
119  const char*, (LumieraInterface iface),
120  {
121  (void)iface;
122  return
123  "Copyright (C) Lumiera.org\n"
124  " 2008 Christian Thaeter <ct@pipapo.org>";
125  }
126  ),
127  LUMIERA_INTERFACE_INLINE (license,
128  const char*, (LumieraInterface iface),
129  {
130  (void)iface;
131  return
132  "This program is free software; you can redistribute it and/or modify\n"
133  "it under the terms of the GNU General Public License as published by\n"
134  "the Free Software Foundation; either version 2 of the License, or\n"
135  "(at your option) any later version.\n"
136  "\n"
137  "This program is distributed in the hope that it will be useful,\n"
138  "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
139  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
140  "GNU General Public License for more details.\n"
141  "\n"
142  "You should have received a copy of the GNU General Public License\n"
143  "along with this program; if not, write to the Free Software\n"
144  "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA";
145  }
146  ),
147 
148  LUMIERA_INTERFACE_INLINE (state,
149  int, (LumieraInterface iface),
150  {(void)iface; return LUMIERA_INTERFACE_EXPERIMENTAL;}
151  ),
152 
153  LUMIERA_INTERFACE_INLINE (versioncmp,
154  int, (const char* a, const char* b),
155  {(void)a;(void)b; return 0;}
156  )
157  );
158 
159 
160 
161 
162 
163 /*
164  Now we rig a cross dependency test
165 
166  we have 4 instances, the respective acquire/release operations set following up:
167 
168  one depends on two and three
169  two depends on one and four
170  three depends on two and four
171  four depends on one, two three
172 
173  These all are empty interfaces with no slots
174 */
175 
176 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) one_keeps_two;
177 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) one_keeps_three;
178 
179 LumieraInterface
180 testacquire_one (LumieraInterface self, LumieraInterface interface)
181 {
182  (void) interface;
183  ECHO ("Acquire one %s_%d_%s", self->interface, self->version, self->name);
184  one_keeps_two = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_two);
185  one_keeps_three = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_three);
186  return self;
187 }
188 
189 void
190 testrelease_one (LumieraInterface self)
191 {
192  ECHO ("Release one %s_%d_%s", self->interface, self->version, self->name);
193  lumiera_interface_close ((LumieraInterface)one_keeps_two);
194  lumiera_interface_close ((LumieraInterface)one_keeps_three);
195 }
196 
197 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) two_keeps_one;
198 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) two_keeps_four;
199 
200 LumieraInterface
201 testacquire_two (LumieraInterface self, LumieraInterface interface)
202 {
203  (void) interface;
204  ECHO ("Acquire two %s_%d_%s", self->interface, self->version, self->name);
205  two_keeps_one = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_one);
206  two_keeps_four = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_four);
207  return self;
208 }
209 
210 void
211 testrelease_two (LumieraInterface self)
212 {
213  ECHO ("Release two %s_%d_%s", self->interface, self->version, self->name);
214  lumiera_interface_close ((LumieraInterface)two_keeps_one);
215  lumiera_interface_close ((LumieraInterface)two_keeps_four);
216 }
217 
218 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) three_keeps_two;
219 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) three_keeps_four;
220 
221 LumieraInterface
222 testacquire_three (LumieraInterface self, LumieraInterface interface)
223 {
224  (void) interface;
225  ECHO ("Acquire three %s_%d_%s", self->interface, self->version, self->name);
226  three_keeps_two = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_two);
227  three_keeps_four = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_four);
228  return self;
229 }
230 
231 void
232 testrelease_three (LumieraInterface self)
233 {
234  ECHO ("Release three %s_%d_%s", self->interface, self->version, self->name);
235  lumiera_interface_close ((LumieraInterface)three_keeps_two);
236  lumiera_interface_close ((LumieraInterface)three_keeps_four);
237 }
238 
239 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) four_keeps_one;
240 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) four_keeps_two;
241 static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) four_keeps_three;
242 
243 LumieraInterface
244 testacquire_four (LumieraInterface self, LumieraInterface interface)
245 {
246  (void) interface;
247  ECHO ("Acquire four %s_%d_%s", self->interface, self->version, self->name);
248  four_keeps_one = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_one);
249  four_keeps_two = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_two);
250  four_keeps_three = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_three);
251  return self;
252 }
253 
254 void
255 testrelease_four (LumieraInterface self)
256 {
257  ECHO ("Release four %s_%d_%s", self->interface, self->version, self->name);
258  lumiera_interface_close ((LumieraInterface)four_keeps_one);
259  lumiera_interface_close ((LumieraInterface)four_keeps_two);
260  lumiera_interface_close ((LumieraInterface)four_keeps_three);
261 }
262 
263 
265  LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_one, 0,
266  lumieraorg_first_test,
267  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
268  testacquire,
269  testrelease,
270  LUMIERA_INTERFACE_MAP (foo1,
271  testfunc),
272  LUMIERA_INTERFACE_MAP (bar1,
273  testfunc)
274  ),
275  LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_two, 0,
276  lumieraorg_second_test,
277  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
278  testacquire,
279  testrelease,
280  LUMIERA_INTERFACE_MAP (foo2,
281  testfunc),
282  LUMIERA_INTERFACE_MAP (bar2,
283  testfunc)
284  ),
285  LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_void, 0,
286  lumieraorg_dependencytest_one,
287  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
288  testacquire_one,
289  testrelease_one
290  ),
291  LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_void, 0,
292  lumieraorg_dependencytest_two,
293  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
294  testacquire_two,
295  testrelease_two
296  ),
297  LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_void, 0,
298  lumieraorg_dependencytest_three,
299  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
300  testacquire_three,
301  testrelease_three
302  ),
303  LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_void, 0,
304  lumieraorg_dependencytest_four,
305  LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor),
306  testacquire_four,
307  testrelease_four
308  )
309  );
310 
311 
312 TESTS_BEGIN
313 
314 TEST (basic)
315 {
317 
318  lumiera_interfaceregistry_bulkregister_interfaces (lumiera_plugin_interfaces(), NULL);
319 
320 
321  /* some ugly lowlevel handling tests */
322 
323  LumieraInterface handle1 =
324  lumiera_interfaceregistry_interface_find ("lumieraorg_testexample_one", 0, "lumieraorg_first_test");
325 
326  (LUMIERA_INTERFACE_CAST(lumieraorg_testexample_one, 0)handle1)->bar1 ("this is bar1");
327 
328 
329  LUMIERA_INTERFACE_TYPE(lumieraorg_testexample_two, 0)* handle2 = LUMIERA_INTERFACE_CAST(lumieraorg_testexample_two, 0)
330  lumiera_interfaceregistry_interface_find ("lumieraorg_testexample_two", 0, "lumieraorg_second_test");
331 
332  handle2->foo2 ("this is foo2");
333 
335  lumiera_interfaceregistry_destroy ();
336 }
337 
338 TEST (open_close)
339 {
341  lumiera_interfaceregistry_bulkregister_interfaces (lumiera_plugin_interfaces(), NULL);
342 
343  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_one, 0) handle =
344  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_one, 0, 0, lumieraorg_first_test);
345  CHECK (handle);
346 
347  handle->bar1 ("this is bar1");
348 
349  lumiera_interface_close ((LumieraInterface)handle);
350 
352  lumiera_interfaceregistry_destroy ();
353 }
354 
355 TEST (dependencies_one)
356 {
359 
360  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle =
361  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_one);
362  CHECK (handle);
363 
364  ECHO ("Sucessfully opened");
365 
366  lumiera_interface_close ((LumieraInterface)handle);
367 
369  lumiera_interfaceregistry_destroy ();
370 }
371 
372 
373 TEST (dependencies_two)
374 {
377 
378  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle =
379  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_two);
380  CHECK (handle);
381 
382  ECHO ("Sucessfully opened");
383 
384  lumiera_interface_close ((LumieraInterface)handle);
385 
387  lumiera_interfaceregistry_destroy ();
388 }
389 
390 TEST (dependencies_three)
391 {
394 
395  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle =
396  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_three);
397  CHECK (handle);
398 
399  ECHO ("Sucessfully opened");
400 
401  lumiera_interface_close ((LumieraInterface)handle);
402 
404  lumiera_interfaceregistry_destroy ();
405 }
406 
407 
408 TEST (dependencies_four)
409 {
412 
413  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle =
414  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_four);
415  CHECK (handle);
416 
417  ECHO ("Sucessfully opened");
418 
419  lumiera_interface_close ((LumieraInterface)handle);
420 
422  lumiera_interfaceregistry_destroy ();
423 }
424 
425 
426 
427 TEST (dependencies_all)
428 {
431 
432  ECHO ("OPEN one");
433  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle_one =
434  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_one);
435  CHECK (handle_one);
436 
437  ECHO ("OPEN three");
438  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle_three =
439  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_three);
440  CHECK (handle_three);
441 
442  ECHO ("OPEN two");
443  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle_two =
444  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_two);
445  CHECK (handle_two);
446 
447  ECHO ("OPEN four");
448  LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle_four =
449  LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_four);
450  CHECK (handle_four);
451 
452  ECHO ("Sucessfully OPENED");
453 
454  ECHO ("CLOSE four");
455  lumiera_interface_close ((LumieraInterface)handle_four);
456 
457  ECHO ("CLOSE two");
458  lumiera_interface_close ((LumieraInterface)handle_two);
459 
460  ECHO ("CLOSE three");
461  lumiera_interface_close ((LumieraInterface)handle_three);
462 
463  ECHO ("CLOSE one");
464  lumiera_interface_close ((LumieraInterface)handle_one);
465 
466 
468  lumiera_interfaceregistry_destroy ();
469 }
470 
471 
472 TEST (plugin_discover)
473 {
475 
477  {
478  LumieraPlugin p = lumiera_plugin_lookup ("modules/test-c-plugin.lum");
479  printf ("found plugin: %s\n", lumiera_plugin_name (p));
480  p = lumiera_plugin_lookup ("modules/test-cpp-plugin.lum");
481  printf ("found plugin: %s\n", lumiera_plugin_name (p));
483  }
484  else
485  printf ("error: %s\n", lumiera_error ());
486 
487  lumiera_interfaceregistry_destroy ();
488 }
489 
490 
491 TEST (plugin_unload)
492 {
494 
496  LumieraPlugin p = lumiera_plugin_lookup ("modules/test-c-plugin.lum");
497  printf ("plugin discovered before unload: %p\n", p);
498  CHECK (p, "prerequisite: need to load test-c-plugin.lum");
499 
500  lumiera_plugin_unload (lumiera_plugin_lookup ("modules/test-c-plugin.lum"));
501  p = lumiera_plugin_lookup ("test-c-plugin.lum");
502  printf ("plugin discovered after unload: %p\n", p);
503  CHECK (!p, "failed to unload plugin.");
504 
505  lumiera_interfaceregistry_destroy ();
506 }
507 
508 
509 TEST (plugin_exampleplugin)
510 {
513 
514  TODO ("macro to derive minminor version from a slot");
515 
516  LUMIERA_INTERFACE_HANDLE(lumieraorg_testhello, 0) german =
517  LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_german);
518 
519  LUMIERA_INTERFACE_HANDLE(lumieraorg_testhello, 0) english =
520  LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_english);
521 
522  german->hello ();
523  german->goodbye ("Welt!");
524 
525  english->hello ();
526  english->goodbye ("World!");
527 
528  LUMIERA_INTERFACE_CLOSE (german);
529  LUMIERA_INTERFACE_CLOSE (english);
530 
531  lumiera_interfaceregistry_destroy ();
532 }
533 
534 TEST (plugin_exampleplugin_nested)
535 {
538  lumiera_config_interface_init ();
539 
540  LUMIERA_INTERFACE_HANDLE(lumieraorg_testtest, 0) test =
541  LUMIERA_INTERFACE_OPEN (lumieraorg_testtest, 0, 0, lumieraorg_test_both);
542 
543  test->testit ();
544 
545  LUMIERA_INTERFACE_CLOSE (test);
546 
547  lumiera_config_interface_destroy ();
548  lumiera_interfaceregistry_destroy ();
549 }
550 
551 
552 TEST (plugin_exampleplugin_cpp)
553 {
556 
557 
558  LUMIERA_INTERFACE_HANDLE(lumieraorg_testhello, 0) german =
559  LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_german_cpp);
560 
561  LUMIERA_INTERFACE_HANDLE(lumieraorg_testhello, 0) english =
562  LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_english_cpp);
563 
564  german->hello ();
565  german->goodbye ("schnöde Welt!");
566 
567  english->hello ();
568  english->goodbye ("Vale of Tears!");
569 
570  LUMIERA_INTERFACE_CLOSE (german);
571  LUMIERA_INTERFACE_CLOSE (english);
572 
573  lumiera_interfaceregistry_destroy ();
574 }
575 
576 TESTS_END
577 
578 
579 
580 
581 
582 /*
583 // Local Variables:
584 // mode: C
585 // c-file-style: "gnu"
586 // indent-tabs-mode: nil
587 // End:
588 */
LumieraPlugin lumiera_plugin_lookup(const char *name)
Lookup a plugin handle in the pluginregistry.
Definition: plugin.c:347
const char * lumiera_plugin_name(LumieraPlugin self)
Query the plugin name The name is the path and filename under which it was loaded.
Definition: plugin.c:174
int lumiera_plugin_register(LumieraPlugin plugin)
Register a plugin and its interfaces.
Definition: plugin.c:269
LumieraPlugin lumiera_plugin_load(const char *plugin)
Tries to load a plugin Creates a new plugin structure and tries to load and initialise the plugin...
Definition: plugin.c:250
LUMIERA_EXPORT(LUMIERA_INTERFACE_DEFINE(lumieraorg_interface, 0, lumieraorg_interface, NULL, NULL, NULL, LUMIERA_INTERFACE_MAP(open, lumiera_interface_open), LUMIERA_INTERFACE_MAP(close, lumiera_interface_close), LUMIERA_INTERFACE_MAP(version, lumiera_interface_version),))
Definition of &#39;the mother of all interfaces&#39; since this interface is singleton and required for any c...
Definition: interface.c:318
Definition: run.hpp:49
Helpers and support macros for defining test executables in C.
Interface for a lumiera configuration system (draft).
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition: interface.h:163
Not finished development code.
#define LUMIERA_INTERFACE_INSTANCE(iname, version, name, descriptor, acquire, release,...)
Define an interface instance.
Definition: interface.h:194
#define LUMIERA_INTERFACE_REGISTEREXPORTED
Register all exported interfaces when not a plugin This is a no-op when LUMIERA_PLUGIN is defined...
Definition: interface.h:333
Lumiera interface macros and structures.
unsigned lumiera_plugin_unload(LumieraPlugin self)
Tries to unload a plugin.
Definition: plugin.c:306
#define LUMIERA_INTERFACE_CAST(name, version)
Construct a cast to the target interface type Used to cast a generic LumieraInterface to the real typ...
Definition: interface.h:146
A mock interface to support testing of the interface system.
void lumiera_interface_close(LumieraInterface self)
Close an interface after use.
Definition: interface.c:235
#define LUMIERA_INTERFACE_REF(iname, version, dname)
Return a reference (pointer) to an interface implementation.
Definition: interface.h:128
int lumiera_plugin_discover(LumieraPlugin(*callback_load)(const char *plugin), int(*callback_register)(LumieraPlugin))
discover new plugins traverses the configured plugin paths and calls the callback_load function for a...
Definition: plugin.c:196
lumiera_err lumiera_error(void)
Get and clear current error state.
Definition: error-state.c:124
#define LUMIERA_INTERFACE_TYPE(name, version)
Construct the type of the interface.
Definition: interface.h:137
void lumiera_interfaceregistry_init(void)
Initialise the interface registry.
Global registry for interfaces (extension points).
#define LUMIERA_INTERFACE_UNREGISTEREXPORTED
Unregister all exported interfaces when not a plugin This is a no-op when LUMIERA_PLUGIN is defined...
Definition: interface.h:339
ExampleStrategy::Qualifier two(string additionalArg)
definition of another qualifier two(arg), accepting an additional argument
A data record to describe interface, interface instances and plug-in instances.
External interface to the lumiera configuration system.
ExampleStrategy::Qualifier one()
definition of a qualifier one()
#define LUMIERA_INTERFACE_HANDLE(interface, version)
create a handle for a interface (WIP)
Definition: interface.h:356
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption