Developer/CppFileTemplate

generated on 2017-12-19 09:15:31.725965 from the wiki page for Developer/CppFileTemplate for SUMO 0.32.0
/****************************************************************************/
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
// Copyright (C) <YEAR OF CREATION>-<CURRENT YEAR> German Aerospace Center (DLR) and others.
/****************************************************************************/
//
//   This program and the accompanying materials
//   are made available under the terms of the Eclipse Public License v2.0
//   which accompanies this distribution, and is available at
//   http://www.eclipse.org/legal/epl-v20.html
//
/****************************************************************************/
/// @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>
/****************************************************************************/

// ===========================================================================
// included modules
// ===========================================================================
#ifdef _MSC_VER
#include <windows_config.h>
#else
#include <config.h>
#endif

#include <StandardLibrary>     // Standard libraries
#include <SUMOLibrary>         // SUMO libraries

#include "myHeaderFile1"       // Own libraries
#include "myHeaderFile2"


// ===========================================================================
// static member definitions
// ===========================================================================
<parameterType> myOwnClass::myStaticMember = value;    // Define here values of static members


// ===========================================================================
// member method definitions
// ===========================================================================
myOwnClass::myOwnClass(<parameterType> parameter1, <parameterType> parameter2,... <parameterType> parametern) :
    parentClass(),             // Call to parent class (if inherit)
    myParameter1(parameter1),  // values of members should be inicializated with this method
    myParameter2(parameter1),
    ...
    myParametern(parametern) {
    // Code of constructor
}


myOwnClass::~myOwnClass() {}   // Declare always destructor, even if is empty


void 
myOwnClass::function() const {
    // code
}


<parameterType> 
myOwnClass::getParameter1() const {
    return myParameter1;
}

// ---------------------------------------------------------------------------
// Class::Subclass - methods <LEAVE OUT IF METHODS ARE OF ONE CLASS ONLY>
// ---------------------------------------------------------------------------

myOwnClass::mySubClass() :
    myPrivateParameter(0) {
    // code of constructor
}


myOwnClass::~mySubClass() {}


/****************************************************************************/

This page was last modified on 29 September 2017, at 10:12.