Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove MSG. Its EOL was scheduled for 2020
[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 in SimGrid4
18 **
19 *****************************************************
20
21 SimGrid4 will follow the these rules:
22
23   - filenames are unique in the whole project
24     (because of a bug in Sonar coverage computation)
25   C++
26   - fields, methods and variables are in snake_case()
27   - Classes and Enum names are in UpperCamelCase
28   - Enum values are in UPPER_SNAKE_CASE (as constants)
29   - public filenames: api_Class.cpp and api/Class.hpp.
30     - Example: src/s4u/s4u_ConditionVariable.cpp and
31                include/simgrid/s4u/ConditionVariable.hpp
32     - If you prefer api_class.cpp, that's OK, too. Breath and relax.
33       Example: src/s4u/s4u_actor.cpp and include/simgrid/s4u/Actor.hpp
34   - internal/kernel filenames: Class.cpp and Class.hpp
35     - Example: src/kernel/activity/Activity.cpp
36                include/simgrid/activity/Activity.hpp
37   C
38   - Field getters are named sg_object_get_field() e.g. sg_link_get_name()
39     Field setters are named sg_object_set_field() e.g. sg_link_set_data()
40   - variables and functions are in snake_case()
41   - typedefs do not hide the pointers, i.e. * must be explicit
42     char* sg_host_get_name(sg_host_t* host);
43
44
45 * SimGrid Hacker Survival Guide (FIXME: should be betterly placed)
46 ********************************
47 * When you add/remove files, and/or make changes in the lists of files to build,
48   please check that "make distcheck" still succeeds.  This is needed to ensure
49   that the generated archive is consistent.