Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill obsolete parts of README.coding, move others to the doc
[simgrid.git] / README.coding
1 **
2 ** Source tree organization
3 **
4 ******************************************************
5
6  examples/ -> Supposed to be copy/pastable by the user, so keep it clear and
7                 avoid any kind of trick. In particular, do only include the
8                 public headers here.
9
10  teshsuite/ -> The more test the better. Put in there any strange test
11                doing things that the users are not supposed to do,
12                just to see if our framework is robust to incorrect and
13                unusual behaviors. All tests written in this section
14                should leverage our tesh(1) utility.
15
16 **
17 ** Type naming standard
18 **
19 *****************************************************
20
21 It may sound strange, but the type naming convention was source of intense
22 discussion between da SimGrid posse members. The convention we came to may not
23 be the best solution, but it has the merit to exist and leave everyone work.
24 So please stick to it.
25
26   - ???_t is a valid type (built with typedef)
27   - s_toto_t is a structure (access to fields with .)
28   - s_toto   is a structure needing 'struct' keyword to be used
29   - e_toto_t is an enum
30   - u_toto_t is an union
31   - u_toto   is an union needing 'union' keyword to be used
32   -   toto_t is an 'object' (struct*)
33
34 Please to not call toto_t something else than an 'object' (ie, something you
35 have to call _new and _free on it).
36
37 Example:
38   typedef struct s_toto {} s_toto_t, *toto_t;
39   typedef enum {} e_toto_t;
40
41 Moreover, only toto_t (and e_toto_t) are public. The rest (mainly s_toto_t)
42 is private.
43
44 If you see any part of the code not following this convention, this is a
45 bug. Please report it (or fix it yourself if you can).
46
47 **
48 ** Commenting the source: doxygen
49 **
50 ****************************************************
51
52 The global structure of the documentation is in doc/modules.doc
53
54 The structure of each module (xbt, msg, etc) is in doc/module-<module>.doc
55
56 The structure of a module is in its public header. This way, you're sure to
57 see all the public interface (and only it). The different parts of the
58 interface are grouped using the @name construct, even if it's buggy. Since
59 parts often get reordered, it's better to add numbers to the parts (so that
60 users can see the intended order).
61
62 The documentation of each type and macro are also in the public header since
63 this is were they live.
64
65 The documentation of each function must be in the C file were it lives.
66
67 Any public element (function, type and macro) must have a @brief part.
68
69
70 *
71 * SimGrid Hacker Survival Guide (FIXME: should be betterly placed)
72 ********************************
73 * When you add/remove files, and/or make changes in the lists of files to build,
74   please check that "make distcheck" still succeeds.  This is needed to ensure
75   that the generated archive is consistent.