Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Coding style: snake_case.
[simgrid.git] / README.coding
index 6b3d048..e3eed40 100644 (file)
@@ -20,7 +20,7 @@
 
 SimGrid4 will follow the these rules:
 
 
 SimGrid4 will follow the these rules:
 
-  - filenames are unique in the whole project 
+  - filenames are unique in the whole project
     (because of a bug in Sonar coverage computation)
   C++
   - fields, methods and variables are in snake_case()
     (because of a bug in Sonar coverage computation)
   C++
   - fields, methods and variables are in snake_case()
@@ -35,10 +35,12 @@ SimGrid4 will follow the these rules:
     - Example: src/kernel/activity/Activity.cpp
                include/simgrid/activity/Activity.hpp
   C
     - Example: src/kernel/activity/Activity.cpp
                include/simgrid/activity/Activity.hpp
   C
+  - Field getters are named sg_object_get_field() e.g. sg_link_get_name()
+    Field setters are named sg_object_set_field() e.g. sg_link_set_data()
   - variables and functions are in snake_case()
   - variables and functions are in snake_case()
-  - typedefs do not hide the pointers, ie * must be explicit
-    char * sg_host_get_name(sg_host_t * host);
-  
+  - typedefs do not hide the pointers, i.e. * must be explicit
+    char* sg_host_get_name(sg_host_t* host);
+
 
 This is different from the old convention (described below), that
 should not be used in S4U and its bindings, nor in the kernel.
 
 This is different from the old convention (described below), that
 should not be used in S4U and its bindings, nor in the kernel.
@@ -72,7 +74,7 @@ We use @ as a command marker, not \ (so, use @brief not \brief)
 **
 *****************************************************
 
 **
 *****************************************************
 
-SimGrid3 legacy interfaces (ie, MSG and SimDag) are following these rules:
+SimGrid3 legacy interface (ie, MSG) is following these rules:
 
   - ???_t is a valid type (built with typedef)
   - s_toto_t is a structure (access to fields with .)
 
   - ???_t is a valid type (built with typedef)
   - s_toto_t is a structure (access to fields with .)