OLD Template¶
IASFBO uses a template in ordert to develop C and C++ programs.
In fondo alla pagina in allegato c'è il template that is a skeleton of a program well commented as Doxygen.
The web site http://www.iasfbo.inaf.it/~conforti/iasfbodoxytemp/index.html shown the results of a program well commented using Doxygen and the proposal template.
Following the readmine file, a simple tutorial to comment the code:
README FILE In this file there are some instructions to insert correctly the code comments for doxygen. There are numerated sections that explain how to write the commenst for each kind of content. In this template is used the example text, thus you can replace this text with the your. The other words are key words and you cannot omitted them. The first item allows you to describes the program in few words. This information will be reported in the home page of documentations. The second item is utils for the description at file level. 1. GENERALE DESCRIPTION OF THE SOFTWARE -- file: include/version.h -- documentation: /*! \mainpage Name of Program * * \section Abstract * * This program process raw data taking from Simulation Montecarlo ASTRI data and create a L0 FITS file. * * \Library Required * - Internal library: * -# PacketLib; * -# ProcessorLib; * * - External library: * -# heasoft CFITSIO. */ -- Note: the char - is used for numerical items, and -# is used for indented pointer items. 2. DESCRIPTION OF SINGLE FILE -- file: *.* -- documentation: /** * @file main.cpp * @brief This processor is used to execute LO - L1 transformation. The program take in input a telemetry which represents * taked from an ASTRI telescope and create a fits file. * * * The command line to start the processor is: ./executeprocessor [options] /conf/SIMTEL_processor * The complete list of options is shown when the program starts. * It's reccomended this options if you use telemetry on file raw: * -s path_of_input_file.raw * -d path_of_output_folder (if you have just a fits file in output folder will be shown an error message) * * * @author Vito Conforti * * @date 30/08/2012 */ 3. BLOCK DESCRIPTION -- where: inside the block you want describes. A This description will be reported inside description of block (function, methods, .. ) -- documentation: /// In this block is done the sum of all intger values between 1 and 10. Remember that if yoi use a name of existing class or file then doxygen will be insert the link automatically. /*! * * If you want insert more and more comments it is better use this form of comments. * * * */ 4. METHODS DESCRIPTION -- where: insert this description in the nearest line before the methods: -- documentation: /// Initializes this plugin with the given arguments. /// @param[in] argc The argument count. /// @param[in,out] argv The argument values (changed after parsing). /// @param[out] outv The output string values. /// @return True on success. Returning false causes the plugin /// instance to be deleted and no other functions to be called. virtual bool Init(uint32_t argc, char* argv[], char* outv[]); 5. ATTRIBUTES DESCRIPTION -- where: after the attribute's declaration. In the same lines! -- documentation: //!< This brief description is in the same lines of attribute declaration 6. CLASS DESCRIPTION -- Where: A detailed description outlining the purpose and use of the class should appear right before the class declaration (no white space). -- documentation: /// The Client class is the main point of entry to O3D. It defines /// methods for creating and deleting * packs. Each new object /// created by the Client is assigned a unique ID. The Client has a /// root transform for the transform graph and a root render node for /// the render graph. class nameClass ...}