UPtrDictionary.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::UPtrDictionary
29 
30 Description
31  Template dictionary class which does not manages the storage
32  associated with it.
33 
34  It is derived from DictionaryBase instantiated on a non-memory managed
35  form of intrusive doubly-linked list of <T>.
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Foam_UPtrDictionary_H
40 #define Foam_UPtrDictionary_H
41 
42 #include "DictionaryBase.H"
43 #include "DLList.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class UPtrDictionary Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class T>
55 class UPtrDictionary
56 :
57  public DictionaryBase<DLList<T*>, T>
58 {
59 public:
60 
61  //- The template instance used for the dictionary content
63 
64 
65  // Constructors
66 
67  //- Default construct: empty without allocation (capacity=0).
68  UPtrDictionary() = default;
69 
70  //- Construct empty with initial table capacity
71  explicit UPtrDictionary(const label initialCapacity)
72  :
73  dict_type(initialCapacity)
74  {}
75 
76  //- Copy construct
78  :
80  {}
81 };
82 
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 } // End namespace Foam
87 
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89 
90 #endif
91 
92 // ************************************************************************* //
dictionary dict
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
Template dictionary class which does not manages the storage associated with it.
UPtrDictionary()=default
Default construct: empty without allocation (capacity=0).
DictionaryBase< DLList< T * >, T > dict_type
The template instance used for the dictionary content.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Non-intrusive doubly-linked list.
Namespace for OpenFOAM.