source: trunk/doc/developers.txt @ 162

Revision 162, 2.1 KB checked in by pouillon, 21 months ago (diff)
  • Added instruction for conditional includes
Line 
1/**
2 * @mainpage Instructions for the developers of Libpspio
3 *
4 * @section Introduction
5 *
6 * One important aspect to pay attention to is to always distinguish clearly
7 * the difference between what a developer of the library needs and what a
8 * user of the library developing some other code will have to access. This
9 * is not always easy to achieve, because of the confusion generated by the
10 * users of the library being actually developers themselves. The related
11 * concepts are explained practically in the following sections.
12 *
13 *
14 * @section C headers
15 *
16 * All headers containing data that will be accessed by the users of the
17 * library should be clearly identified and preserved from name clashes.
18 * They are thus always prefixed by "pspio_". They also have to include the
19 * minimum amount of data possible, i.e. the C headers required by the
20 * exported routines (e.g. stdio.h) are included in the C files only. These
21 * "pspio_*.h" headers are listed in the makefile in the "pio_core_hdrs"
22 * variable.
23 *
24 * Headers which are strictly internal to Libpspio do not have a priori to
25 * follow strict naming conventions, but it is always a good idea to name
26 * them cleverly, so that their purpose is known from reading their name.
27 * These headers are listed in the makefile in the "pio_hidden_hdrs"
28 * variable.
29 *
30 * The headers belonging to Libpspio are included using double quotes,
31 * while those coming from other libraries are included using the <toto.h>
32 * convention. The config.h file is included in the C files only and is
33 * always the last to be included, as it may fine-tune some already-defined
34 * parameters and work around some issues. One noticeable exception is
35 * the conditional including of headers, which should of course be
36 * placed after including config.h.
37 *
38 *
39 * @section Private extensions of external libraries
40 *
41 * Extending privately the capabilities of an external library is not a good
42 * idea on the long run, since its developers may decide at some point to
43 * extend the capabilities in an incompatible way. Always prefer to discuss
44 * of such extensions directly with them. You might get them earlier than
45 * you expect.
46 */
Note: See TracBrowser for help on using the repository browser.