Changeset 1674 for trunk/README.developer
- Timestamp:
- Dec 22, 2008, 8:23:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.developer
r1673 r1674 1 1 $Id$ 2 2 3 = Requirements = 3 = Coding Style = 4 5 We follow the coding style described in 6 [http://cbbp.thep.lu.se/~jari/documents/c++_coding_guidelines/index.html C++ coding guidelines] 7 [http://cbbp.thep.lu.se/~jari/documents/c++_coding_guidelines/c++_coding_guidelines.pdf pdf] 8 [http://cbbp.thep.lu.se/~jari/documents/c++_coding_guidelines/c++_coding_guidelines.ps postscript] 9 with the additions described here. 10 11 === Testing === 12 13 The test suite should at minimum include creation of all classes (to catch linking errors) and calls to template functions (as template functions are not compiled until they are needed). For more details on writing test, see file [source:trunk/test/README test/README]. 14 15 === Interfacing [http://www.gnu.org/software/gsl/ Gnu Scientific Library, GSL] === 16 17 The GSL documentation describes how 18 [http://www.gnu.org/software/gsl/manual/html_node/Error-Handling.html#Error-Handling GSL error handling] 19 works. The GSL library follows the thread-safe 20 error reporting conventions of the posix Threads library. That is, 21 functions return a non-zero error code to indicate an error. In most 22 cases yat just returns whatever the underlying GSL library calls 23 returns. If GSL errors occur in constructors yat handles them 24 accordingly. If GSL reports errors that cannot be resolved by yat a 25 [http://cbbp.thep.lu.se/~jari/documents/yat/classtheplu_1_1yat_1_1utility_1_1GSL__error.html GSL_error] 26 exception will be thrown. However, the default behaviour of 27 GSL library is to call abort() when unrecoverable errors occur and 28 puts the yat (and any other) GSL error treatment out of play. For 29 production environments, yat and GSL users should turn of the default 30 GSL error treatment by calling gsl_set_error_handler_off(), but also 31 when yat's GSL error treatment is preferred. 32 33 When new GSL functionality is introduced to yat, it is the 34 reponsibility of the programmer to make sure that GSL errors are 35 treated properly. Proper GSL error treatment is very important in 36 cases when yat users turn off the default GSL error handler since: 37 38 yat aims at treating GSL errors appropriately in an 39 [http://www.gotw.ca/gotw/008.htm exception safe and neutral] 40 way but there is still some work to do before we do exceptions in a neutral way. 41 42 === Doxygen === 43 We generate our documentation using [http://www.doxygen.org Doxygen] (version 1.5 or later). Doxygen allows several different styles. We try to use the following style as we have found this minimizes parsing problems: 44 45 {{{ 46 /** 47 \brief My class 48 49 Some text documenting the class MyClass 50 */ 51 class MyClass 52 }}} 53 54 or similarly 55 56 {{{ 57 /** 58 \brief magic function 59 60 Some text documenting my_function 61 */ 62 void my_function(void); 63 }}} 64 65 We use doxygen keywords preceded by `\` such as `\brief`, `\return`. All classes and functions have a brief description, which increases clarity on summary pages. 66 67 Try to keep comment line lengths within the terminal character limit, in other words, less than 80 characters per line. This makes the comments more readable. 68 69 '''Internal Interface''' 70 71 Helper functions and classes that are not part of yat API should either be 72 labeled with doxygen flag `\internal` or placed in sub-namespace `detail`. 73 74 = Build = 75 76 == Requirements == 4 77 5 78 To build from a subversion checkout, you will need Autotools. More 6 specifically Automake 1.10 (or later), Autoconf 2.60 (or later), and 7 Libtool are required. 8 9 = Disable shared library = 79 specifically 80 * Automake 1.10 (or later) 81 * Autoconf 2.60 (or later) 82 * Libtool. 83 84 == Disable shared library == 10 85 11 86 yat uses gnu Libtool in order to build shared libraries on a variety … … 15 90 `--disable-shared` option to configure. 16 91 17 = Debugging using GDB=92 == Debugging using GDB == 18 93 19 94 If shared library is enabled (default), libtool creates wrapper … … 30 105 http://www.gnu.org/software/libtool/manual/libtool.html#Debugging-executables 31 106 32 = Enable svn-support=107 == Enable svn-support == 33 108 34 109 If you are building from an svn wc, you may run '`configure`' with … … 36 111 targets. Most of the targets are useful at release time, i.e., 37 112 probably not very useful for other developers than the release 38 manager. See '`build_support/svn_support.am`' for more details. 113 manager. See [source:trunk/build_support/svn_support.am build_support/svn_support.am] for more details. 114 115 = Versioning = 116 117 We use a softened version of [http://apr.apache.org/versioning.html APR guidelines] which 118 in short implies 119 120 ''"The basic intent is that '''`MAJOR`''' versions are incompatible, 121 large-scale upgrades of the API. '''`MINOR`''' versions retain compatibility with older minor versions, and changes in the 122 '''`PATCH`''' level are perfectly compatible, forwards and backwards."'' 123 124 == '''`MAJOR`''' Releases == 125 126 No compatibility is guaranteed between '''`MAJOR`''' versions. 127 128 == '''`MINOR`''' Releases == 129 130 '''`MINOR`''' versions should be compatible with earlier minor 131 versions. However, in the `0.x` line we may allow exceptions to this 132 rule, if developers agree the gain of change is sufficient. Binary compatibility is typically not guaranteed between '''`MINOR`''' versions. The `YAT_LT_VERSION` in [source:trunk/build_support/version.m4 version.m4] should reflect which versions are binary compatible. 133 134 == '''`PATCH`''' Releases == 135 136 Versions with same '''`MAJOR.MINOR`''' are perfectly compatible, 137 forwards and backwards. 138 139 This implies that only implementations can be modified in a `PATCH` 140 release. You cannot change the API, not even add functions or 141 classes because it will break forward compatibility for the previous 142 `PATCH` version. A `PATCH` release is a pure bug fix release 143 144 === Backward Source Compatibility === 145 146 Backward Source Compatibility means that an application that could build 147 against version `x.y` shall also build without error against 148 `x.y+1`. An application that compiled against header files from 149 previous `MINOR` version shall also compile without errors against the 150 header files of the new version. 151 152 Specifically this implies: 153 - Do not remove any public, protected, or free functions. 154 - If you modify a function, its signature must be compatible with 155 previous signature, e.g., new parameters with default values may 156 be aded to signature. 157 - Do not remove any class or inheritance for a class. 158 159 === Backward Binary Compatibility === 160 161 Backward Binary Compatibility means that an application that has been 162 compiled against version `x.y` can be linked against version 163 `x.y+1`. 164 165 Specifically this implies: 166 167 - Do not remove or modify any function (except private), not even 168 add a parameter with default value because it will make the 169 function incompatible with earlier header files. 170 171 - Do not add, remove, or modify member variables, because that will 172 change the allocated size of the class. Therefore, to allow 173 modifications of the internal representation, it is preferable to 174 hold member variable is a ''pimpl'' that is allocated privately. 175 http://developer.gnome.org/doc/guides/programming-guidelines/binary.html 176 177 - Do not add or change order among virtual functions because it will 178 change the layout of the virtual table. 179 180 181 39 182 40 183 ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.