OpenFOAM logo
Open Source CFD Toolkit

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