-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstudent.h
47 lines (37 loc) · 1.07 KB
/
student.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
/*
* =====================================================================================
*
* Filename: student_list.h
*
*
* Version: 1.0
* Created: 2017年02月13日 10时37分09秒
*
* Author: wangzhiqiang (), [email protected]
*
* Description:
*
* =====================================================================================
*/
#ifndef STUDENT_H__
#define STUDENT_H__
/* basic define */
struct student;
typedef int (*listen_func_t)(struct student *s,const char *cls);
/* model init */
int student_init();
/* constructor */
struct student *student_create(int id,const char *name,listen_func_t listen);
void student_release(struct student *s);
/*property*/
const char *student_get_name(struct student *s);
//int student_set_name(struct student *s,const char *name);
int student_get_id(struct student *s);
//int student_set_id(struct student *s,int id);
/* method */
int student_listen(struct student *s,const char *cls);
/* algorithm */
struct student *student_find_by_id(int id);
/* utils */
void student_debug();
#endif