OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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