initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / postProcessing / functionObjects / IO / writeRegisteredObject / writeRegisteredObject.H
blob6cfeaa5e0b88de7c7690cd1724f28a43f6bad72b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM 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 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM 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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::writeRegisteredObject
28 Description
29     Takes over the writing of registered IO objects
31 SourceFiles
32     writeRegisteredObject.C
33     IOwriteRegisteredObject.H
35 \*---------------------------------------------------------------------------*/
37 #ifndef writeRegisteredObject_H
38 #define writeRegisteredObject_H
40 #include "pointFieldFwd.H"
41 #include "wordList.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 // Forward declaration of classes
50 class objectRegistry;
51 class dictionary;
52 class mapPolyMesh;
54 /*---------------------------------------------------------------------------*\
55                    Class writeRegisteredObject Declaration
56 \*---------------------------------------------------------------------------*/
58 class writeRegisteredObject
60 protected:
62     // Private data
64         //- Name of this set of writeRegisteredObject
65         word name_;
67         const objectRegistry& obr_;
69         //- On/off switch
70         bool active_;
73         // Read from dictionary
75             //- Names of objects to control
76             wordList objectNames_;
79     // Private Member Functions
82         //- Disallow default bitwise copy construct
83         writeRegisteredObject(const writeRegisteredObject&);
85         //- Disallow default bitwise assignment
86         void operator=(const writeRegisteredObject&);
89 public:
91     //- Runtime type information
92     TypeName("writeRegisteredObject");
95     // Constructors
97         //- Construct for given objectRegistry and dictionary.
98         //  Allow the possibility to load fields from files
99         writeRegisteredObject
100         (
101             const word& name,
102             const objectRegistry&,
103             const dictionary&,
104             const bool loadFromFiles = false
105         );
108     //- Destructor
109     virtual ~writeRegisteredObject();
112     // Member Functions
114         //- Return name of the writeRegisteredObject
115         virtual const word& name() const
116         {
117             return name_;
118         }
120         //- Read the writeRegisteredObject data
121         virtual void read(const dictionary&);
123         //- Execute, currently does nothing
124         virtual void execute();
126         //- Execute at the final time-loop, currently does nothing
127         virtual void end();
129         //- Write the writeRegisteredObject
130         virtual void write();
132         //- Update for changes of mesh
133         virtual void updateMesh(const mapPolyMesh&)
134         {}
136         //- Update for changes of mesh
137         virtual void movePoints(const pointField&)
138         {}
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace Foam
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 #endif
150 // ************************************************************************* //