summaryrefslogtreecommitdiff
path: root/C/OOP/include/animal_p.h
blob: e09aa7ccbe1c2554adfb3ed9809f485293a12703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Animal class public interface */

#ifndef ANIMAL_P_H
#define ANIMAL_P_H

/* Forward declaration */
struct animal;

/* Alloc new object */
struct animal* animal_new(void);

/* Constructor - make_sound may be NULL*/
void animal_ctor(struct animal*, void (*make_sound)(void));

/* Destructor */
void animal_dtor(struct animal*);

/* Behavior */
void animal_get_name(struct animal*, char*);
void animal_set_name(struct animal*, const char*);
void animal_sound(void *);

#endif /* ANIMAL_P_H */