OpenFOAM: API Guide
v1912
The open source CFD toolbox
simpleObjectRegistry.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) 2012-2016 OpenFOAM Foundation
9
Copyright (C) 2019 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::simpleObjectRegistry
29
30
Description
31
Object registry for simpleRegIOobject. Maintains ordering.
32
33
SourceFiles
34
simpleObjectRegistry.C
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef simpleObjectRegistry_H
39
#define simpleObjectRegistry_H
40
41
#include "
Dictionary.H
"
42
#include "
simpleRegIOobject.H
"
43
#include <string>
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
50
// Forward declarations
51
class
dictionary;
52
53
/*---------------------------------------------------------------------------*\
54
Class simpleObjectRegistryEntry Declaration
55
\*---------------------------------------------------------------------------*/
56
57
class
simpleObjectRegistryEntry
58
:
59
public
Dictionary
<simpleObjectRegistryEntry>::link,
60
public
List
<simpleRegIOobject*>
61
{
62
public
:
63
64
//- Construct with a single object (list size == 1)
65
explicit
simpleObjectRegistryEntry
(
simpleRegIOobject
* obj)
66
:
67
List
<
simpleRegIOobject
*>(
label
(1), obj)
68
{}
69
70
//- Construct with a List of objects
71
explicit
simpleObjectRegistryEntry
(
const
List<simpleRegIOobject*>
&
data
)
72
:
73
List
<
simpleRegIOobject
*>(
data
)
74
{}
75
};
76
77
78
/*---------------------------------------------------------------------------*\
79
Class simpleObjectRegistry Declaration
80
\*---------------------------------------------------------------------------*/
81
82
class
simpleObjectRegistry
83
:
84
public
Dictionary
<simpleObjectRegistryEntry>
85
{
86
public
:
87
88
// Constructors
89
90
//- Construct with given or default (128) table capacity
91
explicit
simpleObjectRegistry
(
const
label
size = 128)
92
:
93
Dictionary
<
simpleObjectRegistryEntry
>(size)
94
{}
95
96
97
// Member Functions
98
99
//- Set values (invoke callbacks) from dictionary entries
100
// Reporting honours the infoDetailLevel
101
void
setValues
(
const
dictionary
&
dict
,
bool
report=
false
);
102
103
//- Set named value, but also handle embedded name=value syntax
104
// Reporting honours the infoDetailLevel
105
void
setNamedInt
(std::string
name
,
int
val
,
bool
report=
false
);
106
};
107
108
109
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111
}
// End namespace Foam
112
113
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115
#endif
116
117
// ************************************************************************* //
Foam::simpleObjectRegistryEntry::simpleObjectRegistryEntry
simpleObjectRegistryEntry(const List< simpleRegIOobject * > &data)
Construct with a List of objects.
Definition:
simpleObjectRegistry.H:70
Foam::val
label ListType::const_reference val
Definition:
ListOps.H:407
Foam::simpleObjectRegistry::setValues
void setValues(const dictionary &dict, bool report=false)
Set values (invoke callbacks) from dictionary entries.
Definition:
simpleObjectRegistry.C:36
Foam::simpleObjectRegistry::setNamedInt
void setNamedInt(std::string name, int val, bool report=false)
Set named value, but also handle embedded name=value syntax.
Definition:
simpleObjectRegistry.C:90
Foam::simpleObjectRegistryEntry
Definition:
simpleObjectRegistry.H:56
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition:
label.H:62
Foam::simpleObjectRegistryEntry::simpleObjectRegistryEntry
simpleObjectRegistryEntry(simpleRegIOobject *obj)
Construct with a single object (list size == 1)
Definition:
simpleObjectRegistry.H:64
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition:
complex.C:76
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition:
dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Dictionary.H
Foam::Dictionary
General purpose template dictionary class that manages the storage associated with it.
Definition:
Dictionary.H:57
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition:
HashTable.H:102
simpleRegIOobject.H
Foam::simpleObjectRegistry::simpleObjectRegistry
simpleObjectRegistry(const label size=128)
Construct with given or default (128) table capacity.
Definition:
simpleObjectRegistry.H:90
Foam::data
Database for solution data, solver performance and other reduced data.
Definition:
data.H:54
Foam::simpleRegIOobject
Abstract base class for registered object with I/O. Used in debug symbol registration.
Definition:
simpleRegIOobject.H:52
Foam::simpleObjectRegistry
Object registry for simpleRegIOobject. Maintains ordering.
Definition:
simpleObjectRegistry.H:81
src
OpenFOAM
global
debug
simpleObjectRegistry.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.