OpenFOAM logo
Open Source CFD Toolkit

string2D.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-2005 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     string2D
00027 
00028 Description
00029     2D string.
00030 
00031 SourceFiles
00032     string2DI.H
00033     string2D.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef string2D_H
00038 #define string2D_H
00039 
00040 #include "shape2D.H"
00041 #include "string.H"
00042 #include "point2D.H"
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 class Gstream;
00050 class Istream;
00051 class Ostream;
00052 
00053 
00054 /*---------------------------------------------------------------------------*\
00055                            Class string2D Declaration
00056 \*---------------------------------------------------------------------------*/
00057 
00058 class string2D
00059 :
00060     public virtual shape2D
00061 {
00062 
00063     // Private data
00064 
00065         point2D start;
00066         string characters;
00067         point2D direction;
00068 
00069         bool Horizontal;
00070 
00071 public:
00072 
00073     // Constructors
00074 
00075         //- Construct from components
00076         inline string2D(const point2D&, const string&);
00077         inline string2D(const point2D&, const string&, const point2D&);
00078 
00079         //- Construct from Istream
00080         string2D(Istream&);
00081 
00082 
00083     // Destructor
00084 
00085         virtual ~string2D();
00086 
00087 
00088     // Member Functions
00089 
00090         // Access
00091 
00092             inline bool horizontal() const;
00093             inline scalar x() const;
00094             inline scalar y() const;
00095             inline const string& text() const;
00096             inline const point2D& startPt() const;
00097 
00098 
00099         //- Draw
00100         virtual void draw(Gstream&) const;
00101 
00102         //- Write
00103         virtual void write(Ostream&) const;
00104 
00105 
00106     // Member Operators
00107 
00108         inline void operator=(const string2D&);
00109 
00110 
00111     // Friend Operators
00112 
00113         inline friend Gstream& operator<<(Gstream&, const string2D&);
00114 
00115 
00116     // IOstream Operators
00117 
00118         inline friend Ostream& operator<<(Ostream&, const string2D&);
00119 };
00120 
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 } // End namespace Foam
00125 
00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00127 
00128 #include "string2DI.H"
00129 
00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00131 
00132 #endif
00133 
00134 // ************************************************************************* //
For further information go to www.openfoam.org