1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 An abstract base class for managing compound tokens
30 \*---------------------------------------------------------------------------*/
32 #ifndef CompoundToken_H
33 #define CompoundToken_H
38 #include "runTimeSelectionTables.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 // Forward declaration of friend functions and operators
48 Ostream& operator<<(Ostream&, const CompoundToken&);
51 /*---------------------------------------------------------------------------*\
52 Class CompoundToken Declaration
53 \*---------------------------------------------------------------------------*/
59 // Private Member Functions
61 //- Disallow default bitwise copy construct
62 CompoundToken(const CompoundToken&);
64 //- Disallow default bitwise assignment
65 void operator=(const CompoundToken&);
70 //- Runtime type information
71 virtual const word& type() const = 0;
74 // Declare run-time constructor selection tables
76 declareRunTimeSelectionTable
81 (const word& type, Istream& is),
92 //- Return the clone as this and increment reference count
93 virtual autoPtr<CompoundToken> clone() const = 0;
98 //- Select null constructed
99 static autoPtr<CompoundToken> New(const word& type, Istream& is);
103 virtual ~CompoundToken();
116 virtual void write(Istream&) = 0;
119 // IOstream Operators
121 friend Ostream& operator<<(Ostream&, const CompoundToken&);
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 } // End namespace Foam
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 // ************************************************************************* //