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

writeRegisteredObject.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::writeRegisteredObject
00026 
00027 Description
00028     Takes over the writing of registered IO objects
00029 
00030 SourceFiles
00031     writeRegisteredObject.C
00032     IOwriteRegisteredObject.H
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef writeRegisteredObject_H
00037 #define writeRegisteredObject_H
00038 
00039 #include <OpenFOAM/pointFieldFwd.H>
00040 #include <OpenFOAM/wordList.H>
00041 #include <OpenFOAM/runTimeSelectionTables.H>
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 // Forward declaration of classes
00049 class objectRegistry;
00050 class dictionary;
00051 class mapPolyMesh;
00052 
00053 /*---------------------------------------------------------------------------*\
00054                    Class writeRegisteredObject Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 class writeRegisteredObject
00058 {
00059 protected:
00060 
00061     // Private data
00062 
00063         //- Name of this set of writeRegisteredObject
00064         word name_;
00065 
00066         const objectRegistry& obr_;
00067 
00068         //- On/off switch
00069         bool active_;
00070 
00071 
00072         // Read from dictionary
00073 
00074             //- Names of objects to control
00075             wordList objectNames_;
00076 
00077 
00078     // Private Member Functions
00079 
00080 
00081         //- Disallow default bitwise copy construct
00082         writeRegisteredObject(const writeRegisteredObject&);
00083 
00084         //- Disallow default bitwise assignment
00085         void operator=(const writeRegisteredObject&);
00086 
00087 
00088 public:
00089 
00090     //- Runtime type information
00091     TypeName("writeRegisteredObject");
00092 
00093 
00094     // Constructors
00095 
00096         //- Construct for given objectRegistry and dictionary.
00097         //  Allow the possibility to load fields from files
00098         writeRegisteredObject
00099         (
00100             const word& name,
00101             const objectRegistry&,
00102             const dictionary&,
00103             const bool loadFromFiles = false
00104         );
00105 
00106 
00107     //- Destructor
00108     virtual ~writeRegisteredObject();
00109 
00110 
00111     // Member Functions
00112 
00113         //- Return name of the writeRegisteredObject
00114         virtual const word& name() const
00115         {
00116             return name_;
00117         }
00118 
00119         //- Read the writeRegisteredObject data
00120         virtual void read(const dictionary&);
00121 
00122         //- Execute, currently does nothing
00123         virtual void execute();
00124 
00125         //- Execute at the final time-loop, currently does nothing
00126         virtual void end();
00127 
00128         //- Write the writeRegisteredObject
00129         virtual void write();
00130 
00131         //- Update for changes of mesh
00132         virtual void updateMesh(const mapPolyMesh&)
00133         {}
00134 
00135         //- Update for changes of mesh
00136         virtual void movePoints(const pointField&)
00137         {}
00138 };
00139 
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 } // End namespace Foam
00144 
00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00146 
00147 #endif
00148 
00149 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines