Developer/HFileTemplate

generated on 2017-09-14 00:32:31.391038 from the wiki page for Developer/HFileTemplate for SUMO 0.31.0
/****************************************************************************/
/// @file    <FILENAME>
/// @author  <AUTHOR'S NAME, ONE SEPARATE LINE FOR EACH AUTHOR>
/// @author  <AUTHOR'S NAME 2>
/// @author  <AUTHOR'S NAME 3>
/// @date    <FILE CREATION DATE>
/// @version $Id: $
///
/// <A BRIEF DESCRIPTION OF THE FILE'S CONTENTS>
/****************************************************************************/
// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
// Copyright (C) <YEAR OF CREATION>-<CURRENT YEAR> DLR (http://www.dlr.de/) and contributors
/****************************************************************************/
//
//   This file is part of SUMO.
//   SUMO is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 3 of the License, or
//   (at your option) any later version.
//
/****************************************************************************/
#ifndef <FILENAME_h>
#define <FILENAME_h>

// ===========================================================================
// included modules
// ===========================================================================

#ifdef _MSC_VER
#include <windows_config.h>
#else
#include <config.h>
#endif

#include "myOwnClass1.h"
#include "myOwnClass2.h"

// ===========================================================================
// class declarations
// ===========================================================================

class myOwnClass1;
class myOwnClass2;

// ===========================================================================
// class definitions
// ===========================================================================

/**
 * @class myOwnClass
 * briefly description of the class (Can be preceded of GNE, MS, NB, etc... depending of the project)
 */
class myOwnClass : public parentClass  {

public:
     /**
      * @class mySubClass 
      * briefly description of the sub-class
      */
     class mySubClass {

     public:
         /// @brief Constructor
         mySubClass();

         /// @brief Destructor
         ~mySubClass();

     private:
         /// @brief description of parameter
         <parameterType> myPrivateParameter;
     };

    /** @brief Constructor
     * @param[in] parameter1 each parameter must be documented
     * @param[in] parameter2 each parameter must be documented
       ...
     */
    myOwnClass(<parameterType> parameter1, <parameterType> parameter2,... <parameterType> parametern);

    /// @brief Destructor (don't need documentation)
    ~myOwnClass();

    /// @brief Returns parameter1 (Simple functions should be documented with one Linie)
    <parameterType> getParameter1() const;

    /** @brief some functions can throw exceptions
     * @param[in] parameter1 description of the parameter
     * @throw <exceptionName> description of the situation that provoque an exception
     * @return description of the returned value
     */
    bool setParameter1(<type> parameter1) const;

    /// @brief if the class is abstract, should have pure virtual functions (virtual .... = 0;)
    //  @note: Extra information about a function should be written using @note
    virtual void myPureVirtualFunction() = 0;

protected:
    /// @brief briefly description of the parameter
    <parameterType> myProtectedParameter1;

private:
    /// @brief every private parameter must start with "my"
    <parameterType> myPrivateParameter2;

    /// @brief C++ Standard Library classes must be preceded of std::
    std::vector<std::string> myPrivateParameter3;
}

#endif

This page was last modified on 18 March 2017, at 14:39.