DynamicList, DynamicField: Add Fwd.H headers
The Fwd.H headers define the default template arguments. This means the dynamic list/field can be forward declared without there being any confusion with regards to the specification of these arguments.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,6 +44,7 @@ SourceFiles
|
||||
#define DynamicList_H
|
||||
|
||||
#include "List.H"
|
||||
#include "DynamicListFwd.H"
|
||||
#include <type_traits>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -53,9 +54,6 @@ namespace Foam
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
class DynamicList;
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
Ostream& operator<<
|
||||
(
|
||||
@ -74,7 +72,7 @@ Istream& operator>>
|
||||
Class DynamicList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class T, unsigned SizeInc=0, unsigned SizeMult=2, unsigned SizeDiv=1>
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
class DynamicList
|
||||
:
|
||||
public List<T>
|
||||
|
||||
53
src/OpenFOAM/containers/Lists/DynamicList/DynamicListFwd.H
Normal file
53
src/OpenFOAM/containers/Lists/DynamicList/DynamicListFwd.H
Normal file
@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ 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 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef DynamicListFwd_H
|
||||
#define DynamicListFwd_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
unsigned SizeInc = 0,
|
||||
unsigned SizeMult = 2,
|
||||
unsigned SizeDiv = 1
|
||||
>
|
||||
class DynamicList;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,6 +42,7 @@ SourceFiles
|
||||
|
||||
#include "UList.H"
|
||||
#include "autoPtr.H"
|
||||
#include "DynamicListFwd.H"
|
||||
#include <initializer_list>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -75,9 +76,6 @@ template<class LListBase, class T> class LList;
|
||||
template<class T>
|
||||
using SLList = LList<SLListBase, T>;
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
class DynamicList;
|
||||
|
||||
template<class T> class SortableList;
|
||||
template<class T> class IndirectList;
|
||||
template<class T> class UIndirectList;
|
||||
|
||||
@ -37,6 +37,7 @@ SourceFiles
|
||||
#define DynamicField_H
|
||||
|
||||
#include "Field.H"
|
||||
#include "DynamicFieldFwd.H"
|
||||
#include <type_traits>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -46,9 +47,6 @@ namespace Foam
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
class DynamicField;
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
Ostream& operator<<
|
||||
(
|
||||
@ -68,7 +66,7 @@ Istream& operator>>
|
||||
Class DynamicField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class T, unsigned SizeInc=0, unsigned SizeMult=2, unsigned SizeDiv=1>
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
class DynamicField
|
||||
:
|
||||
public Field<T>
|
||||
|
||||
53
src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldFwd.H
Normal file
53
src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldFwd.H
Normal file
@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ 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 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef DynamicFieldFwd_H
|
||||
#define DynamicFieldFwd_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
unsigned SizeInc = 0,
|
||||
unsigned SizeMult = 2,
|
||||
unsigned SizeDiv = 1
|
||||
>
|
||||
class DynamicField;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -48,6 +48,7 @@ SourceFiles
|
||||
#include "edgeList.H"
|
||||
#include "vectorField.H"
|
||||
#include "faceListFwd.H"
|
||||
#include "DynamicListFwd.H"
|
||||
#include "intersection.H"
|
||||
#include "pointHit.H"
|
||||
#include "ListListOps.H"
|
||||
@ -62,9 +63,6 @@ namespace Foam
|
||||
class face;
|
||||
class triFace;
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
class DynamicList;
|
||||
|
||||
inline bool operator==(const face& a, const face& b);
|
||||
inline bool operator!=(const face& a, const face& b);
|
||||
inline Istream& operator>>(Istream&, face&);
|
||||
|
||||
Reference in New Issue
Block a user