|
|
|
objectMap.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::objectMap 00027 00028 Description 00029 An objectMap is a pair of labels defining the mapping of an object from 00030 another object, e.g. a cell mapped from a point. 00031 00032 SourceFiles 00033 objectMapI.H 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef objectMap_H 00038 #define objectMap_H 00039 00040 #include "labelList.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 // Forward declaration of friend functions and operators 00048 00049 class objectMap; 00050 inline bool operator==(const objectMap& a, const objectMap& b); 00051 inline bool operator!=(const objectMap& a, const objectMap& b); 00052 inline Ostream& operator<<(Ostream&, const objectMap&); 00053 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class objectMap Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class objectMap 00060 { 00061 // Private data 00062 00063 //- Object index 00064 label index_; 00065 00066 //- Master object index 00067 labelList masterObjects_; 00068 00069 00070 public: 00071 00072 // Constructors 00073 00074 //- Null constructor for lists 00075 inline objectMap(); 00076 00077 //- Construct from components 00078 inline objectMap(const label index, const labelList& master); 00079 00080 //- Construct from Istream 00081 inline objectMap(Istream&); 00082 00083 00084 // Member Functions 00085 00086 //- Return object index 00087 inline label& index(); 00088 inline label index() const; 00089 00090 //- Return master object index 00091 inline labelList& masterObjects(); 00092 inline const labelList& masterObjects() const; 00093 00094 00095 // Friend Operators 00096 00097 friend bool operator==(const objectMap& a, const objectMap& b); 00098 friend bool operator!=(const objectMap& a, const objectMap& b); 00099 00100 00101 // IOstream Operators 00102 00103 friend Ostream& operator<<(Ostream&, const objectMap&); 00104 }; 00105 00106 00107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00108 00109 } // End namespace Foam 00110 00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00112 00113 #include "objectMapI.H" 00114 00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00116 00117 #endif 00118 00119 // ************************************************************************* // |