Developer/CppFileTemplate
generated on 2017-05-02 00:27:04.253469 from the wiki page for Developer/CppFileTemplate for SUMO 0.30.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. // /****************************************************************************/ // =========================================================================== // 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 18 March 2017, at 14:37.