1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 cfMesh is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
25 refLabelledPointScalar
28 A class containing a label and labelledPointScalar. It is used for
29 exchanging data over processors
33 \*---------------------------------------------------------------------------*/
35 #ifndef refLabelledPointScalar_H
36 #define refLabelledPointScalar_H
38 #include "labelledPointScalar.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class refLabelledPointScalar Declaration
47 \*---------------------------------------------------------------------------*/
49 class refLabelledPointScalar
55 //- labelledPointScalar
56 labelledPointScalar lps_;
62 refLabelledPointScalar()
68 //- Construct from label and labelledPointScalar
69 refLabelledPointScalar(const label pl, const labelledPointScalar& lps)
76 ~refLabelledPointScalar()
80 //- return object label
81 inline label objectLabel() const
86 //- return labelledPointScalar
87 inline const labelledPointScalar& lps() const
94 inline void operator=(const refLabelledPointScalar& lps)
96 pLabel_ = lps.pLabel_;
100 inline bool operator==(const refLabelledPointScalar& lps) const
102 if( pLabel_ == lps.pLabel_ )
108 inline bool operator!=(const refLabelledPointScalar& lps) const
110 return !this->operator==(lps);
114 friend Ostream& operator<<(Ostream& os, const refLabelledPointScalar& lps)
116 os << token::BEGIN_LIST;
117 os << lps.pLabel_ << token::SPACE;
118 os << lps.lps_ << token::END_LIST;
120 // Check state of Ostream
121 os.check("operator<<(Ostream&, const labelledPointScalarS&");
126 friend Istream& operator>>(Istream& is, refLabelledPointScalar& lps)
128 // Read beginning of refLabelledPointScalar
129 is.readBegin("refLabelledPointScalar");
134 // Read end of refLabelledPointScalar
135 is.readEnd("refLabelledPointScalar");
137 // Check state of Istream
138 is.check("operator>>(Istream&, refLabelledPointScalar");
144 //- Specify data associated with refLabelledPointScalar type is contiguous
146 inline bool contiguous<refLabelledPointScalar>() {return true;}
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 // ************************************************************************* //