FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

objectMap.H

Go 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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::objectMap
00026 
00027 Description
00028     An objectMap is a pair of labels defining the mapping of an object from
00029     another object, e.g. a cell mapped from a point.
00030 
00031 SourceFiles
00032     objectMapI.H
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef objectMap_H
00037 #define objectMap_H
00038 
00039 #include <OpenFOAM/labelList.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // Forward declaration of friend functions and operators
00047 
00048 class objectMap;
00049 inline bool operator==(const objectMap& a, const objectMap& b);
00050 inline bool operator!=(const objectMap& a, const objectMap& b);
00051 inline Ostream& operator<<(Ostream&, const objectMap&);
00052 inline Istream& operator>>(Istream&, 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         friend Istream& operator>>(Istream&, objectMap&);
00106 };
00107 
00108 
00109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00110 
00111 } // End namespace Foam
00112 
00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114 
00115 #include <OpenFOAM/objectMapI.H>
00116 
00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00118 
00119 #endif
00120 
00121 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines