European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

c++-small-main.template.doc

c++-main - Template for c++ small main program

DESCRIPTION

An empty template is provided by getTemplate(7) in the "code" menu. Complete the template according to the following example

See also c-main.template.doc to fill the "man page" of the command

 /*******************************************************************************
  * E.S.O. - VLT project
 *
 * "@(#) $I>-<d$"
 *
 * who       when        what
 * --------  ----------  ----------------------------------------------
 * NNNNNNNN  yyyy-mm-dd  created
 */

/** @addtogroup ModExec module name executables
 *  This is the group for module executables
 */


/**
 *  @defgroup CommandName
 *  @ingroup ModExec
 *  @{
 */
/** 
 * @page CommandPageName CommandName
 * Short description of the command
 *
 * @section Synopsis
 *  CommandName [-v] 
 *
 *   @param -v enable verbose mode
 *
 *   @return 0 if everything OK
 *   @return 1 on error
 *
 * @section Description
 * This is the description of the command
 * 
 *   @see other page
 *
 * @section Files 
 * ...
 *
 * @section Environment 
 * ...
 * 
 * @section Examples 
 *
 * @bug 
 */
/** @}*/



   #ifndef __vxworks   >>> predefined Macros Candidates: 
			   __vxworks #vxworks in general
			   _WRS_KERNEL #vxWorks kernel
			   __RTP__ # vxWorks application process (currently not used in VLT and can be replaced by 'defined(__vxworks) && !defined(_WRS_KERNEL)'
   #define _POSIX_C_SOURCE 1	<<<< if you delete this line you SHALL comment
				     why POSIX does not apply for this file
				     The purpose of the Macro is, to intentionally break the build if non agreed feature sets are used.
				     For Linux you might need to remove the settings in the case that intentionally non-Posix functions will be called by the sourcecode.
				     For VxWorks Kernel you might want to keep #define _POSIX... if you are sure that this sourcecode should not use any VxWorks specific functions
				     For VxWorks Application processes (currently not used by VLT) you can independently decide between allowing VxWorks extensions over Posix only
   #endif

 // For the command documentation part see c-main 


 // Uncomment this if you are using the VLT environment
 // #include "vltPort.h"
 // otherwise use the following to have just the ATTRIBUTE_UNUSED definition
 #include "vltAttrib.h" 

 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>

 ATTRIBUTE_UNUSED static const char *rcsId="@(#) $I>-<d$"; 

 #ifndef DOXYGEN	     >>> if added the main code fragment will be ignored by Doxygen, 
                             >>>> and only the "man page" documentation from the group will be generated 

 int main(int argc, char *argv[])
 {


 	return 0;

 }
 #endif /*!DOXYGEN*/

 
Generated on Wed Jun 8 09:09:12 2011 for forCoding - 1.50 API by doxygen 1.6.3