-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello-world-component.h
55 lines (45 loc) · 1.45 KB
/
hello-world-component.h
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
/*
* hello-world.h
*
* Created on: Jan 14, 2015
* Author: Francisco Acosta
* eMail: fco.ja.ac@gmail.com
*/
#ifndef HELLO_WORLD_H_
#define HELLO_WORLD_H_
/*#pragma ComponentType "HelloWorldComponent"*/
typedef struct _HelloWorldComponent HelloWorldComponent;
typedef struct _AbstractComponent AbstractComponent;
typedef struct _AbstractTypeDefinition AbstractTypeDefinition;
typedef void (*fptrAction)(HelloWorldComponent*);
typedef void (*fptrHWUpdate)(HelloWorldComponent*, int);
typedef void (*fptrHWDelete)(HelloWorldComponent*);
typedef void (*fptrHWPolyDel)(AbstractTypeDefinition*);
typedef struct _HelloWorldComponent {
AbstractComponent *super;
int time;
fptrAction start;
fptrAction stop;
fptrHWUpdate update;
fptrHWDelete delete;
fptrHWPolyDel deletePoly;
} HelloWorldComponent;
HelloWorldComponent *new_HelloWorldComponent(void);
AbstractTypeDefinition *newPoly_HelloWorldComponent(void);
void delete_HelloWorldComponent(HelloWorldComponent * const this);
void deletePoly_HelloWorldComponent(AbstractTypeDefinition * const this);
void HelloWorldComponent_start(HelloWorldComponent * const this);
void HelloWorldComponent_stop(HelloWorldComponent * const this);
void HelloWorldComponent_update(HelloWorldComponent * const this, int time);
/*
class HelloWorldComponent :public AbstractComponent
{
public:
HelloWorldComponent();
~HelloWorldComponent();
void start();
void stop();
void update();
};
*/
#endif /* HELLO_WORLD_H_ */