mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: define IOobjectList::csorted(), deprecate some sorted() const methods
- prefer csorted() method for const access since it ensures that the return values are also const pointers (for example) even if the object itself can be accessed as a non-const. - the csorted() method already existed for HashTable and objectRegistry, but now added to IOobjectList for method name consistency (even although the IOobjectList only has a const-access version) ENH: objectRegistry with templated strict lookup - for lookupClass and csorted/sorted. Allows isType restriction as a compile-time specification.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -290,14 +290,14 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time: " << runTime.timeName() << nl;
|
||||
|
||||
report(objects);
|
||||
report(objects.sorted());
|
||||
report(objects.csorted());
|
||||
|
||||
report(objects.sorted<volScalarField>());
|
||||
report(objects.sorted<volVectorField>());
|
||||
report(objects.csorted<volScalarField>());
|
||||
report(objects.csorted<volVectorField>());
|
||||
|
||||
// Extra checks
|
||||
report<volScalarField>(objects.sorted<volScalarField>());
|
||||
report<volScalarField>(objects.sorted<volVectorField>());
|
||||
report<volScalarField>(objects.csorted<volScalarField>());
|
||||
report<volScalarField>(objects.csorted<volVectorField>());
|
||||
|
||||
|
||||
findObjectTest(objects);
|
||||
|
||||
Reference in New Issue
Block a user