![]() |
|
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 lineStyle 00027 00028 Description 00029 00030 SourceFiles 00031 lineStyle.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef lineStyle_H 00036 #define lineStyle_H 00037 00038 #include "word.H" 00039 #include "scalarList.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 class Istream; 00047 class Ostream; 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class lineStyle Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class lineStyle 00054 { 00055 // Private data 00056 00057 word name_; 00058 scalar lineWidth_; 00059 scalar dashLength_; 00060 scalarList dashStyle_; 00061 00062 public: 00063 00064 // Constructors 00065 00066 //- Construct null 00067 lineStyle(); 00068 00069 //- Construct from components 00070 lineStyle 00071 ( 00072 const word&, 00073 const scalar, 00074 const scalar, 00075 const scalarList& 00076 ); 00077 00078 //- Construct from Istream 00079 lineStyle(Istream&); 00080 00081 //- Construct as copy 00082 lineStyle(const lineStyle&); 00083 00084 00085 // Destructor 00086 00087 ~lineStyle(); 00088 00089 00090 // Member Functions 00091 00092 // Access 00093 00094 inline scalar thickness() const; 00095 inline scalar patternLength() const; 00096 inline const scalarList& pattern() const; 00097 00098 00099 // Member Operators 00100 00101 void operator=(const lineStyle&); 00102 00103 00104 // IOstream Operators 00105 00106 friend Istream& operator>>(Istream&, lineStyle&); 00107 friend Ostream& operator<<(Ostream&, const lineStyle&); 00108 }; 00109 00110 00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00112 00113 inline scalar lineStyle::thickness() const 00114 { 00115 return lineWidth_; 00116 } 00117 00118 inline scalar lineStyle::patternLength() const 00119 { 00120 return dashLength_; 00121 } 00122 00123 inline const scalarList& lineStyle::pattern() const 00124 { 00125 return dashStyle_; 00126 } 00127 00128 00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00130 00131 } // End namespace Foam 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 #endif 00136 00137 // ************************************************************************* //