From 850fa066d3282d435e85af7b208d2ce566ea1a28 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Wed, 13 Oct 2010 10:43:16 +0200 Subject: [PATCH] ENH: add UList typedefs for the various List counterparts - eg, labelUList <-> labelList scalarUList <-> scalarList ... Note the unallocLabelList typedef is still available. However labelUList requires less typing (10 vs. 17 chars) and has a more obvious to labelList. --- doc/doxygen/Doxyfile | 6 ++++-- .../Lists/PackedList/PackedBoolList.H | 6 ++++++ src/OpenFOAM/containers/Lists/UList/UList.H | 1 + src/OpenFOAM/primitives/Lists/boolList.H | 8 ++++++++ src/OpenFOAM/primitives/Lists/fileNameList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/labelList.H | 18 +++++++++++++++--- src/OpenFOAM/primitives/Lists/scalarList.H | 10 +++++++++- .../primitives/Lists/sphericalTensorList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/stringList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/symmTensorList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/tensorList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/vectorList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/wordList.H | 10 +++++++++- src/OpenFOAM/primitives/Lists/wordReList.H | 12 ++++++++++-- .../primitives/strings/wordRe/wordRe.C | 2 +- .../primitives/strings/wordRe/wordRe.H | 2 +- .../primitives/strings/wordRe/wordReI.H | 2 +- 17 files changed, 119 insertions(+), 18 deletions(-) diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 1445ad0bc21..51a8ae2b503 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -574,12 +574,14 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -# INPUT = $(WM_PROJECT_DIR)/src \ +#INPUT = $(WM_PROJECT_DIR)/src \ # $(WM_PROJECT_DIR)/applications/utilities \ # $(WM_PROJECT_DIR)/applications/solvers # limit input for testing purposes -INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global +INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global \ + $(WM_PROJECT_DIR)/src/OpenFOAM/containers \ + $(WM_PROJECT_DIR)/src/OpenFOAM/primitives # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H index 7e47674b8b7..fb790a3e05c 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H @@ -51,6 +51,12 @@ SeeAlso namespace Foam { +// Forward declaration +class PackedBoolList; + +//- @typedef A List of PackedBoolList +typedef List<PackedBoolList> PackedBoolListList; + /*---------------------------------------------------------------------------*\ Class PackedBoolList Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H index 8f7e0092875..d0cb05fc172 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.H +++ b/src/OpenFOAM/containers/Lists/UList/UList.H @@ -59,6 +59,7 @@ template<class T> class SubList; template<class T> class UList; template<class T> Ostream& operator<<(Ostream&, const UList<T>&); +typedef UList<label> labelUList; /*---------------------------------------------------------------------------*\ Class UList Declaration diff --git a/src/OpenFOAM/primitives/Lists/boolList.H b/src/OpenFOAM/primitives/Lists/boolList.H index 32696a3231e..84f31f2bc53 100644 --- a/src/OpenFOAM/primitives/Lists/boolList.H +++ b/src/OpenFOAM/primitives/Lists/boolList.H @@ -21,6 +21,12 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::boolUList + +Description + A UList of bool + Typedef Foam::boolList @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<bool> boolUList; + typedef List<bool> boolList; typedef List<List<bool> > boolListList; } diff --git a/src/OpenFOAM/primitives/Lists/fileNameList.H b/src/OpenFOAM/primitives/Lists/fileNameList.H index 29cb0727ff2..44479127951 100644 --- a/src/OpenFOAM/primitives/Lists/fileNameList.H +++ b/src/OpenFOAM/primitives/Lists/fileNameList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::fileNameUList + +Description + A UList of fileNames. + Typedef Foam::fileNameList Description - List of fileNames. + A List of fileNames. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<fileName> fileNameUList; + typedef List<fileName> fileNameList; } diff --git a/src/OpenFOAM/primitives/Lists/labelList.H b/src/OpenFOAM/primitives/Lists/labelList.H index e91e0982f58..f89ba637997 100644 --- a/src/OpenFOAM/primitives/Lists/labelList.H +++ b/src/OpenFOAM/primitives/Lists/labelList.H @@ -25,7 +25,19 @@ Typedef Foam::labelList Description - Label container classes + A List of labels + +Typedef + Foam::labelListList + +Description + A List of labelList + +Typedef + Foam::labelListListList + +Description + A List of labelListList \*---------------------------------------------------------------------------*/ @@ -39,11 +51,11 @@ Description namespace Foam { + // Note: frequently used UList version is located in container itself + typedef List<label> labelList; typedef List<labelList> labelListList; typedef List<labelListList> labelListListList; - - typedef UList<label> unallocLabelList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/Lists/scalarList.H b/src/OpenFOAM/primitives/Lists/scalarList.H index 5b8091f1b60..e611c9d0fd2 100644 --- a/src/OpenFOAM/primitives/Lists/scalarList.H +++ b/src/OpenFOAM/primitives/Lists/scalarList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::scalarUList + +Description + A UList of scalars. + Typedef Foam::scalarList Description - List of scalars. + A List of scalars. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<scalar> scalarUList; + typedef List<scalar> scalarList; typedef List<scalarList> scalarListList; } diff --git a/src/OpenFOAM/primitives/Lists/sphericalTensorList.H b/src/OpenFOAM/primitives/Lists/sphericalTensorList.H index be62ae73061..9a8fc80e577 100644 --- a/src/OpenFOAM/primitives/Lists/sphericalTensorList.H +++ b/src/OpenFOAM/primitives/Lists/sphericalTensorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::sphericalTensorUList + +Description + A UList of sphericalTensors. + Typedef Foam::sphericalTensorList Description - List of sphericalTensors. + A List of sphericalTensors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<sphericalTensor> sphericalTensorUList; + typedef List<sphericalTensor> sphericalTensorList; } diff --git a/src/OpenFOAM/primitives/Lists/stringList.H b/src/OpenFOAM/primitives/Lists/stringList.H index 6649229d2d6..153b41fb927 100644 --- a/src/OpenFOAM/primitives/Lists/stringList.H +++ b/src/OpenFOAM/primitives/Lists/stringList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::stringUList + +Description + A UList of strings. + Typedef Foam::stringList Description - List of strings. + A List of strings. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<string> stringUList; + typedef List<string> stringList; } diff --git a/src/OpenFOAM/primitives/Lists/symmTensorList.H b/src/OpenFOAM/primitives/Lists/symmTensorList.H index e4dd5e9ece1..9039e5798d9 100644 --- a/src/OpenFOAM/primitives/Lists/symmTensorList.H +++ b/src/OpenFOAM/primitives/Lists/symmTensorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::symmTensorUList + +Description + A UList of symmTensors. + Typedef Foam::symmTensorList Description - List of symmTensors. + A List of symmTensors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<symmTensor> symmTensorUList; + typedef List<symmTensor> symmTensorList; } diff --git a/src/OpenFOAM/primitives/Lists/tensorList.H b/src/OpenFOAM/primitives/Lists/tensorList.H index 0c22e4e4eb1..fd3a7a9f01d 100644 --- a/src/OpenFOAM/primitives/Lists/tensorList.H +++ b/src/OpenFOAM/primitives/Lists/tensorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::tensorUList + +Description + A UList of tensors. + Typedef Foam::tensorList Description - List of tensors. + A List of tensors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<tensor> tensorUList; + typedef List<tensor> tensorList; } diff --git a/src/OpenFOAM/primitives/Lists/vectorList.H b/src/OpenFOAM/primitives/Lists/vectorList.H index 2fd9fc80879..596f828b266 100644 --- a/src/OpenFOAM/primitives/Lists/vectorList.H +++ b/src/OpenFOAM/primitives/Lists/vectorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::vectorUList + +Description + A UList of vectors. + Typedef Foam::vectorList Description - List of vectors. + A List of vectors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<vector> vectorUList; + typedef List<vector> vectorList; } diff --git a/src/OpenFOAM/primitives/Lists/wordList.H b/src/OpenFOAM/primitives/Lists/wordList.H index 6cd6e71b485..8f9fb263872 100644 --- a/src/OpenFOAM/primitives/Lists/wordList.H +++ b/src/OpenFOAM/primitives/Lists/wordList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::wordUList + +Description + A UList of words. + Typedef Foam::wordList Description - List of words. + A List of words. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<word> wordUList; + typedef List<word> wordList; } diff --git a/src/OpenFOAM/primitives/Lists/wordReList.H b/src/OpenFOAM/primitives/Lists/wordReList.H index eb31391e568..31a4793655f 100644 --- a/src/OpenFOAM/primitives/Lists/wordReList.H +++ b/src/OpenFOAM/primitives/Lists/wordReList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::wordReUList + +Description + A UList of wordRe (word or regular expression) + Typedef Foam::wordReList Description - List of wordRe (word or regular expression) + A List of wordRe (word or regular expression) \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<wordRe> wordReUList; + typedef List<wordRe> wordReList; } diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordRe.C b/src/OpenFOAM/primitives/strings/wordRe/wordRe.C index 693ae0535db..e0dca4a0a0c 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordRe.C +++ b/src/OpenFOAM/primitives/strings/wordRe/wordRe.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordRe.H b/src/OpenFOAM/primitives/strings/wordRe/wordRe.H index 16d86b7fcfc..566f42af6ca 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordRe.H +++ b/src/OpenFOAM/primitives/strings/wordRe/wordRe.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordReI.H b/src/OpenFOAM/primitives/strings/wordRe/wordReI.H index 7cf6ff6e23a..713c0030641 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordReI.H +++ b/src/OpenFOAM/primitives/strings/wordRe/wordReI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License -- GitLab