Software Development Methodology> Coding standards > Header file template

Release Information

Project: Siconos
Internal Release Number: 1.0
Last update: September 15, 2005
Related Documents:


up

Header File Template

/** \class class name
   * \brief short description of the object role
   * \author author of the first version of this class
   * \version current version
   * \date Date of creation of the first version : mm/dd/yyyy
   *
   * describe here  the main features of the class more in details 
   *
   * \bug list of potential bugs (one per line)
   * \warning list of warnings (one per line)
   * \todo add here any comment about possible improvements
   */
#ifndef CLASS_NAME_H
#define CLASS_NAME_H

// low level files include:
include "model.h";
...
// high level include
include<stdio>
include<vector>
...

class ClassName

{
// == PRIVATE/PROTECTED MEMBERS ==
protected:
  // - data members -

 
/** definition of  ObjectMemberC */
  typeObject  ObjectMemberC ;

 
/** definition of sizeC */
  int sizeC;
   ...

  // - private functions -
  ...

// ==== PUBLIC FUNCTIONS ====
public:

// == CONSTRUCTORS ==

 /** \fn  ClassName(argList)
   * \brief  constructor from ...
   * \param ...
   */ 

ClassName(typeObject A, typeObject B);


// == DESTRUCTOR ==
~ClassName();

// == GETTERS AND SETTERS ==
 

/** \fn  int const getSizeC()  const
   * \brief  get member sizeC
   * \return an int
   */

inline const int getSizeC() const { return sizeC;}

/** \fn  void setSizeC(const int& newValue)
   * \brief  set value for member sizeC
   * \param an int
   */

inline void setSizeC(const int& newValue) { sizeC = newValue; }

// == OTHER FUNCTIONS ==
};

#endif 

up