1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* whistler.c
*
*/
#include "eina_model_04_whistler.h"
void
whistler_whistle(Eina_Model *m)
{
const Eina_Model_Interface *iface = NULL;
iface = eina_model_interface_get(m, WHISTLER_INTERFACE_NAME);
EINA_SAFETY_ON_NULL_RETURN(iface);
void (*pf)(Eina_Model *);
pf = eina_model_interface_method_resolve(iface, m, Whistler_Interface, whistle);
EINA_SAFETY_ON_NULL_RETURN(pf);
printf("%s() \t", __func__);
pf(m);
}
/*
* call for overridden Swimmer Interface function
*/
void
swimmer_swim(Eina_Model *m)
{
const Eina_Model_Interface *iface = NULL;
iface = eina_model_interface_get(m, SWIMMER_INTERFACE_NAME);
EINA_SAFETY_ON_NULL_RETURN(iface);
void (*pf)(Eina_Model *);
pf = eina_model_interface_method_resolve(iface, m, Swimmer_Interface, swim);
EINA_SAFETY_ON_NULL_RETURN(pf);
printf("%s() \t", __func__);
pf(m);
}
/*
* call for overridden Diver Interface function
*/
void
diver_dive(Eina_Model *m)
{
const Eina_Model_Interface *iface = NULL;
iface = eina_model_interface_get(m, DIVER_INTERFACE_NAME);
EINA_SAFETY_ON_NULL_RETURN(iface);
void (*pf)(Eina_Model *);
pf = eina_model_interface_method_resolve(iface, m, Diver_Interface, dive);
EINA_SAFETY_ON_NULL_RETURN(pf);
printf("%s() \t", __func__);
pf(m);
}
|