curve.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef curve_H
00037 #define curve_H
00038
00039 #include "string.H"
00040 #include "primitiveFields.H"
00041 #include "autoPtr.H"
00042
00043
00044
00045 namespace Foam
00046 {
00047
00048
00049
00050 class curve;
00051 Ostream& operator<<(Ostream&, const curve&);
00052
00053
00054
00055
00056
00057
00058 class curve
00059 :
00060 public scalarField
00061 {
00062
00063 public:
00064
00065
00066 class curveStyle
00067 {
00068
00069 public:
00070
00071
00072 enum curveStyleNo
00073 {
00074 CONTINUOUS,
00075 SYMBOL,
00076 SYMBOL_CURVE,
00077 SYMBOL_WITH_ERROR_BARS,
00078 SYMBOL_WITH_VARIABLE_SIZE
00079 };
00080
00081
00082 private:
00083
00084
00085 curveStyleNo CurveStyleNo;
00086
00087
00088 public:
00089
00090
00091
00092
00093
00094 curveStyle(const curveStyleNo csn)
00095 :
00096 CurveStyleNo(csn)
00097 {}
00098
00099
00100 curveStyle(Istream& is)
00101 :
00102 CurveStyleNo(curveStyleNo(readInt(is)))
00103 {}
00104
00105
00106
00107
00108 friend Ostream& operator<<(Ostream& os, const curveStyle& cs)
00109 {
00110 os << int(cs.CurveStyleNo);
00111 return os;
00112 }
00113 };
00114
00115
00116 private:
00117
00118
00119
00120 string name_;
00121 curveStyle style_;
00122
00123
00124 public:
00125
00126
00127
00128
00129
00130
00131
00132 curve
00133 (
00134 const string& name,
00135 const curveStyle& style,
00136 const label l
00137 );
00138
00139
00140 curve
00141 (
00142 const string&,
00143 const curveStyle&,
00144 const scalarField& y
00145 );
00146
00147 autoPtr<curve> clone() const
00148 {
00149 return autoPtr<curve>(new curve(*this));
00150 }
00151
00152
00153
00154
00155
00156
00157 const string& name() const
00158 {
00159 return name_;
00160 }
00161
00162 const curveStyle& style() const
00163 {
00164 return style_;
00165 }
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176 friend Ostream& operator<<(Ostream&, const curve&);
00177 };
00178
00179
00180
00181
00182 }
00183
00184
00185
00186 #endif
00187
00188
Copyright © 2000-2009 OpenCFD Ltd