-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIDynamicLoader.c
42 lines (34 loc) · 908 Bytes
/
IDynamicLoader.c
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
/*
* IDynamicLoader.c
*
* Created on: Jan 28, 2015 11:36:46 AM
* Author: facosta
*/
#include <stdlib.h>
#include "IDynamicLoader.h"
IDynamicLoader *new_IDynamicLoader()
{
IDynamicLoader *pObj = malloc(sizeof(IDynamicLoader));
if(pObj == NULL) {
return NULL;
}
/*
* Pointing to itself since it's a parent
*/
pObj->pDerivedObj = pObj;
pObj->register_instance = IDynamicLoader_register_instance;
pObj->create_instance = IDynamicLoader_create_instance;
pObj->get_instance = IDynamicLoader_get_instance;
pObj->destroy_instance = IDynamicLoader_destroy_instance;
pObj->start_instance = IDynamicLoader_start_instance;
pObj->stop_instance = IDynamicLoader_stop_instance;
pObj->update_instance = IDynamicLoader_update_instance;
pObj->delete = delete_IDynamicLoader;
return pObj;
}
void delete_IDynamicLoader(IDynamicLoader * const this)
{
if(this != NULL) {
free(this);
}
}