diff --git a/bin/foamTemplates/foamAppTemplate.C b/bin/foamTemplates/foamAppTemplate.C deleted file mode 100644 index 0e179c2ce9..0000000000 --- a/bin/foamTemplates/foamAppTemplate.C +++ /dev/null @@ -1,53 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM 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 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - className - -Description - Description of the className application - -Usage - - className [OPTION] - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Main program: - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" -# include "createTime.H" - - - Info<< "End\n" << endl; - - return 0; -} - -// ************************************************************************* // diff --git a/bin/foamTemplates/foamTemplate.C b/bin/foamTemplates/foamTemplate.C deleted file mode 100644 index 99bea11c39..0000000000 --- a/bin/foamTemplates/foamTemplate.C +++ /dev/null @@ -1,97 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM 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 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "className.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -const dataType Foam::className::staticData(); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::className::className() -: - baseClassName(), - data_() -{} - - -Foam::className::className(const dataType& data) -: - baseClassName(), - data_(data) -{} - - -Foam::className::className(const className&) -: - baseClassName(), - data_() -{} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::className::New() -{ - return autoPtr(new className); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::className::~className() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -void Foam::className::operator=(const className& rhs) -{ - // Check for assignment to self - if (this == &rhs) - { - FatalErrorIn("Foam::className::operator=(const Foam::className&)") - << "Attempted assignment to self" - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // - - -// ************************************************************************* // diff --git a/bin/foamTemplates/foamTemplate.H b/bin/foamTemplates/foamTemplate.H deleted file mode 100644 index 4d730b6879..0000000000 --- a/bin/foamTemplates/foamTemplate.H +++ /dev/null @@ -1,153 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM 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 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::className - -Description - Short Summary - - Complete description - -SourceFiles - classNameI.H - className.C - classNameIO.C - -\*---------------------------------------------------------------------------*/ - -#ifndef className_H -#define className_H - -#include ".H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of classes -class someClass; - -// Forward declaration of friend functions and operators -class className; -Istream& operator>>(Istream&, className&); -Ostream& operator<<(Ostream&, const className&); - - -/*---------------------------------------------------------------------------*\ - Class className Declaration -\*---------------------------------------------------------------------------*/ - -class className -: - public baseClassName -{ - // Private data - - dataType data_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct - className(const className&); - - //- Disallow default bitwise assignment - void operator=(const className&); - - -public: - - // Static data members - - //- Static data someStaticData - static const dataType staticData; - - - // Constructors - - //- Construct null - className(); - - //- Construct from components - className(const dataType& data); - - //- Construct from Istream - className(Istream&); - - //- Construct as copy - className(const className&); - - - // Selectors - - //- Select null constructed - static autoPtr New(); - - - //- Destructor - ~className(); - - - // Member Functions - - // Access - - // Check - - // Edit - - // Write - - - // Member Operators - - void operator=(const className&); - - - // Friend Functions - - // Friend Operators - - // IOstream Operators - - friend Istream& operator>>(Istream&, className&); - friend Ostream& operator<<(Ostream&, const className&); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "classNameI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/bin/foamTemplates/foamTemplateI.H b/bin/foamTemplates/foamTemplateI.H deleted file mode 100644 index b9a2e326a4..0000000000 --- a/bin/foamTemplates/foamTemplateI.H +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM 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 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - -// ************************************************************************* // diff --git a/bin/foamTemplates/foamTemplateIO.C b/bin/foamTemplates/foamTemplateIO.C deleted file mode 100644 index 7c0d583bbe..0000000000 --- a/bin/foamTemplates/foamTemplateIO.C +++ /dev/null @@ -1,71 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM 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 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "className.H" -#include "IOstreams.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::className::className(Istream& is) -: - base1(is), - base2(is), - member1(is), - member2(is) -{ - // Check state of Istream - is.check("Foam::className::className(Foam::Istream&)"); -} - - -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // - -Foam::Istream& Foam::operator>>(Istream& is, className&) -{ - // Check state of Istream - is.check - ( - "Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::className&)" - ); - - return is; -} - - -Foam::Ostream& Foam::operator<<(Ostream& os, const className&) -{ - // Check state of Ostream - os.check - ( - "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " - "const Foam::className&)" - ); - - return os; -} - - -// ************************************************************************* // diff --git a/bin/foamTemplates/source/foamUtilTemplate.cfg b/bin/foamTemplates/source/foamUtilTemplate.cfg index 8f29a97eee..159b04a929 100644 --- a/bin/foamTemplates/source/foamUtilTemplate.cfg +++ b/bin/foamTemplates/source/foamUtilTemplate.cfg @@ -1,8 +1,8 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.4.1 | -| \\ / A nd | Web: http://www.openfoam.org | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ // className tool definition diff --git a/bin/foamTemplates/source/newSource b/bin/foamTemplates/source/newSource index 6bb5ef3536..04fe1dc7fd 100755 --- a/bin/foamTemplates/source/newSource +++ b/bin/foamTemplates/source/newSource @@ -66,10 +66,10 @@ IO) template=foamTemplateIO fileType=C ;; -App) +app|App) template=foamAppTemplate fileType=C - if [ ! -d "Make" ]; then + if [ ! -d Make ]; then echo "foamNew: Creating Make/files and Make/options" wmakeFilesAndOptions fi diff --git a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H b/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H index 9d14e396ad..a4aec0d763 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H +++ b/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H @@ -54,14 +54,14 @@ template class ClassName; template -Istream& operator>>(Istream&, ClassName&); +Istream& operator>>(Istream&, ClassName&); template -Ostream& operator<<(Ostream&, const ClassName&); +Ostream& operator<<(Ostream&, const ClassName&); /*---------------------------------------------------------------------------*\ - Class ClassName Declaration + Class ClassName Declaration \*---------------------------------------------------------------------------*/ template diff --git a/bin/foamTemplates/sourceTemplate/newSourceTemplate b/bin/foamTemplates/sourceTemplate/newSourceTemplate index f2d8244b56..d229c302e4 100755 --- a/bin/foamTemplates/sourceTemplate/newSourceTemplate +++ b/bin/foamTemplates/sourceTemplate/newSourceTemplate @@ -46,7 +46,7 @@ USAGE exit 1 } -if [ "$#" -lt 2 ]; then +if [ "$#" -le 2 ]; then usage "wrong number of arguments, expected 3 (or more)" fi