objectMap.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 OpenFOAM Foundation
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::objectMap
28 
29 Description
30  An objectMap is a pair of labels defining the mapping of an object from
31  another object, e.g. a cell mapped from a point.
32 
33 SourceFiles
34  objectMapI.H
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef objectMap_H
39 #define objectMap_H
40 
41 #include "labelList.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward Declarations
49 
50 class objectMap;
51 inline bool operator==(const objectMap& a, const objectMap& b);
52 inline bool operator!=(const objectMap& a, const objectMap& b);
53 inline Ostream& operator<<(Ostream&, const objectMap&);
54 inline Istream& operator>>(Istream&, objectMap&);
55 
56 
57 /*---------------------------------------------------------------------------*\
58  Class objectMap Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 class objectMap
62 {
63  // Private data
64 
65  //- Object index
66  label index_;
67 
68  //- Master object index
69  labelList masterObjects_;
70 
71 
72 public:
73 
74  // Constructors
75 
76  //- Null constructor, with index=-1 and no objects
77  inline objectMap();
78 
79  //- Construct from components
80  inline objectMap(const label index, const UList<label>& master);
81 
82  //- Construct from Istream
83  inline objectMap(Istream& is);
84 
85 
86  // Member Functions
87 
88  //- Return object index
89  inline label& index();
90  inline label index() const;
91 
92  //- Return master object index
93  inline labelList& masterObjects();
94  inline const labelList& masterObjects() const;
95 
96 
97  // Friend Operators
98 
99  friend bool operator==(const objectMap& a, const objectMap& b);
100  friend bool operator!=(const objectMap& a, const objectMap& b);
101 
102 
103  // IOstream Operators
104 
105  friend Ostream& operator<<(Ostream&, const objectMap&);
106  friend Istream& operator>>(Istream&, objectMap&);
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #include "objectMapI.H"
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::objectMap::masterObjects
labelList & masterObjects()
Return master object index.
Definition: objectMapI.H:71
Foam::objectMap::operator!=
friend bool operator!=(const objectMap &a, const objectMap &b)
Foam::operator!=
bool operator!=(const eddy &a, const eddy &b)
Definition: eddy.H:239
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::objectMap::index
label & index()
Return object index.
Definition: objectMapI.H:59
Foam::objectMap::operator>>
friend Istream & operator>>(Istream &, objectMap &)
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
labelList.H
Foam::operator==
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::objectMap::operator<<
friend Ostream & operator<<(Ostream &, const objectMap &)
Foam::objectMap::objectMap
objectMap()
Null constructor, with index=-1 and no objects.
Definition: objectMapI.H:32
objectMapI.H
Foam::objectMap
An objectMap is a pair of labels defining the mapping of an object from another object,...
Definition: objectMap.H:60
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::objectMap::operator==
friend bool operator==(const objectMap &a, const objectMap &b)
Foam::List< label >
Foam::UList< label >
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56