summaryrefslogtreecommitdiff
path: root/C/OOP/include/animal_priv.h
blob: 78a83c1d53156896540da03caaf1da55a0722416 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Animal class private definition */

#ifndef ANIMAL_PRIV_H
#define ANIMAL_PRIV_H

/*
 * We use a "private" definition as a way to encapsulate it, hiding
 * it from the users.
 *
 * Access to its private definition is only allowed to its sub-classes.
 *
 * We could enforce it by moving here the allocator and constructors
 */
struct animal {
	char *name;
	void (*make_sound) (void);
};

#endif /* ANIMAL_PRIV_H */