/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- 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 3 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, see . Application Test-List Description Simple tests and examples of use of List See also Foam::List \*---------------------------------------------------------------------------*/ #include "OSspecific.H" #include "argList.H" #include "wordReList.H" #include "IOstreams.H" #include "StringStream.H" #include "scalar.H" #include "vector.H" #include "labelRange.H" #include "scalarList.H" #include "ListOps.H" #include "SubList.H" #include #include using namespace Foam; template void testFind(const T& val, const ListType& lst) { Info<< nl << "Search for "<< val << " in " << flatOutput(lst) << nl <<" found() = " << lst.found(val) <<" find() = " << lst.find(val) <<" rfind() = " << lst.rfind(val) <<" find(2) = " << lst.find(val, 2) <<" rfind(2) = " << lst.rfind(val, 2) <<" findIndex = " << findIndex(lst, val) << nl << nl; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: int main(int argc, char *argv[]) { argList::noParallel(); argList::addOption("reList", "reList"); argList::addOption("wordList", "wordList"); argList::addOption("stringList", "stringList"); argList::addOption("float", "xx"); argList::addBoolOption("flag"); #include "setRootCase.H" { List