OpenFOAM: API Guide
v2012
The open source CFD toolbox
IndirectListAddressing.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) 2017-2020 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Class
27
Foam::IndirectListAddressing
28
29
Description
30
A class for storing list addressing (labels, slices etc), which are
31
normally to used by IndirectList.
32
Private inheritance is often used by any inheriting classes.
33
34
SourceFiles
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef IndirectListAddressing_H
39
#define IndirectListAddressing_H
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
/*---------------------------------------------------------------------------*\
47
Class IndirectListAddressing Declaration
48
\*---------------------------------------------------------------------------*/
49
50
template
<
class
Addr>
51
class
IndirectListAddressing
52
{
53
// Private Data
54
55
//- Storage for addressing
56
Addr storedAddr_;
57
58
59
public
:
60
61
// Constructors
62
63
//- Copy construct from addressing information
64
IndirectListAddressing
(
const
Addr& addr)
65
:
66
storedAddr_(addr)
67
{}
68
69
//- Move construct from addressing information
70
IndirectListAddressing
(Addr&& addr)
71
:
72
storedAddr_(std::move(addr))
73
{}
74
75
76
// Member Functions
77
78
//- Const access to the addressing
79
const
Addr&
addressing
()
const
80
{
81
return
storedAddr_;
82
}
83
84
//- Non-const access to the addressing
85
Addr&
addressing
()
86
{
87
return
storedAddr_;
88
}
89
};
90
91
92
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94
}
// End namespace Foam
95
96
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97
98
#endif
99
100
// ************************************************************************* //
Foam::IndirectListAddressing::addressing
const Addr & addressing() const
Const access to the addressing.
Definition:
IndirectListAddressing.H:78
Foam::IndirectListAddressing
A class for storing list addressing (labels, slices etc), which are normally to used by IndirectList....
Definition:
IndirectListAddressing.H:50
Foam::IndirectListAddressing::addressing
Addr & addressing()
Non-const access to the addressing.
Definition:
IndirectListAddressing.H:84
Foam::IndirectListAddressing::IndirectListAddressing
IndirectListAddressing(Addr &&addr)
Move construct from addressing information.
Definition:
IndirectListAddressing.H:69
Foam::IndirectListAddressing::IndirectListAddressing
IndirectListAddressing(const Addr &addr)
Copy construct from addressing information.
Definition:
IndirectListAddressing.H:63
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
src
OpenFOAM
containers
IndirectLists
IndirectListBase
IndirectListAddressing.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.