casa
$Rev:20696$
|
00001 00002 /* 00003 * ALMA - Atacama Large Millimeter Array 00004 * (c) European Southern Observatory, 2002 00005 * (c) Associated Universities Inc., 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration), 00007 * Copyright by AUI (in the framework of the ALMA collaboration), 00008 * All rights reserved. 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY, without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00023 * MA 02111-1307 USA 00024 * 00025 * Warning! 00026 * -------------------------------------------------------------------- 00027 * | This is generated code! Do not modify this file. | 00028 * | If you do, all changes will be lost when the file is re-generated. | 00029 * -------------------------------------------------------------------- 00030 * 00031 * File WeatherRow.h 00032 */ 00033 00034 #ifndef WeatherRow_CLASS 00035 #define WeatherRow_CLASS 00036 00037 #include <vector> 00038 #include <string> 00039 #include <set> 00040 00041 #ifndef WITHOUT_ACS 00042 #include <asdmIDLC.h> 00043 #endif 00044 00045 00046 00047 00048 00049 00050 00051 #include <Angle.h> 00052 00053 00054 00055 #include <Speed.h> 00056 00057 00058 00059 #include <Tag.h> 00060 00061 00062 00063 #include <Length.h> 00064 00065 00066 00067 #include <Temperature.h> 00068 00069 00070 00071 #include <Humidity.h> 00072 00073 00074 00075 #include <ArrayTimeInterval.h> 00076 00077 00078 00079 #include <Pressure.h> 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 #include <ConversionException.h> 00118 #include <NoSuchRow.h> 00119 #include <IllegalAccessException.h> 00120 00121 #include <RowTransformer.h> 00122 //#include <TableStreamReader.h> 00123 00124 /*\file Weather.h 00125 \brief Generated from model's revision "1.64", branch "HEAD" 00126 */ 00127 00128 namespace asdm { 00129 00130 //class asdm::WeatherTable; 00131 00132 00133 // class asdm::StationRow; 00134 class StationRow; 00135 00136 00137 class WeatherRow; 00138 typedef void (WeatherRow::*WeatherAttributeFromBin) (EndianIStream& eis); 00139 typedef void (WeatherRow::*WeatherAttributeFromText) (const string& s); 00140 00147 class WeatherRow { 00148 friend class asdm::WeatherTable; 00149 friend class asdm::RowTransformer<WeatherRow>; 00150 //friend class asdm::TableStreamReader<WeatherTable, WeatherRow>; 00151 00152 public: 00153 00154 virtual ~WeatherRow(); 00155 00159 WeatherTable &getTable() const; 00160 00165 bool isAdded() const; 00166 00168 // Intrinsic Table Attributes // 00170 00171 00172 // ===> Attribute timeInterval 00173 00174 00175 00176 00177 00182 ArrayTimeInterval getTimeInterval() const; 00183 00184 00185 00186 00196 void setTimeInterval (ArrayTimeInterval timeInterval); 00197 00198 00199 00200 00201 00202 00203 00204 // ===> Attribute pressure, which is optional 00205 00206 00207 00212 bool isPressureExists() const; 00213 00214 00215 00221 Pressure getPressure() const; 00222 00223 00224 00225 00232 void setPressure (Pressure pressure); 00233 00234 00235 00236 00240 void clearPressure (); 00241 00242 00243 00244 00245 // ===> Attribute relHumidity, which is optional 00246 00247 00248 00253 bool isRelHumidityExists() const; 00254 00255 00256 00262 Humidity getRelHumidity() const; 00263 00264 00265 00266 00273 void setRelHumidity (Humidity relHumidity); 00274 00275 00276 00277 00281 void clearRelHumidity (); 00282 00283 00284 00285 00286 // ===> Attribute temperature, which is optional 00287 00288 00289 00294 bool isTemperatureExists() const; 00295 00296 00297 00303 Temperature getTemperature() const; 00304 00305 00306 00307 00314 void setTemperature (Temperature temperature); 00315 00316 00317 00318 00322 void clearTemperature (); 00323 00324 00325 00326 00327 // ===> Attribute windDirection, which is optional 00328 00329 00330 00335 bool isWindDirectionExists() const; 00336 00337 00338 00344 Angle getWindDirection() const; 00345 00346 00347 00348 00355 void setWindDirection (Angle windDirection); 00356 00357 00358 00359 00363 void clearWindDirection (); 00364 00365 00366 00367 00368 // ===> Attribute windSpeed, which is optional 00369 00370 00371 00376 bool isWindSpeedExists() const; 00377 00378 00379 00385 Speed getWindSpeed() const; 00386 00387 00388 00389 00396 void setWindSpeed (Speed windSpeed); 00397 00398 00399 00400 00404 void clearWindSpeed (); 00405 00406 00407 00408 00409 // ===> Attribute windMax, which is optional 00410 00411 00412 00417 bool isWindMaxExists() const; 00418 00419 00420 00426 Speed getWindMax() const; 00427 00428 00429 00430 00437 void setWindMax (Speed windMax); 00438 00439 00440 00441 00445 void clearWindMax (); 00446 00447 00448 00449 00450 // ===> Attribute dewPoint, which is optional 00451 00452 00453 00458 bool isDewPointExists() const; 00459 00460 00461 00467 Temperature getDewPoint() const; 00468 00469 00470 00471 00478 void setDewPoint (Temperature dewPoint); 00479 00480 00481 00482 00486 void clearDewPoint (); 00487 00488 00489 00490 00491 // ===> Attribute numLayer, which is optional 00492 00493 00494 00499 bool isNumLayerExists() const; 00500 00501 00502 00508 int getNumLayer() const; 00509 00510 00511 00512 00519 void setNumLayer (int numLayer); 00520 00521 00522 00523 00527 void clearNumLayer (); 00528 00529 00530 00531 00532 // ===> Attribute layerHeight, which is optional 00533 00534 00535 00540 bool isLayerHeightExists() const; 00541 00542 00543 00549 vector<Length > getLayerHeight() const; 00550 00551 00552 00553 00560 void setLayerHeight (vector<Length > layerHeight); 00561 00562 00563 00564 00568 void clearLayerHeight (); 00569 00570 00571 00572 00573 // ===> Attribute temperatureProfile, which is optional 00574 00575 00576 00581 bool isTemperatureProfileExists() const; 00582 00583 00584 00590 vector<Temperature > getTemperatureProfile() const; 00591 00592 00593 00594 00601 void setTemperatureProfile (vector<Temperature > temperatureProfile); 00602 00603 00604 00605 00609 void clearTemperatureProfile (); 00610 00611 00612 00613 00614 // ===> Attribute cloudMonitor, which is optional 00615 00616 00617 00622 bool isCloudMonitorExists() const; 00623 00624 00625 00631 Temperature getCloudMonitor() const; 00632 00633 00634 00635 00642 void setCloudMonitor (Temperature cloudMonitor); 00643 00644 00645 00646 00650 void clearCloudMonitor (); 00651 00652 00653 00654 00655 // ===> Attribute numWVR, which is optional 00656 00657 00658 00663 bool isNumWVRExists() const; 00664 00665 00666 00672 int getNumWVR() const; 00673 00674 00675 00676 00683 void setNumWVR (int numWVR); 00684 00685 00686 00687 00691 void clearNumWVR (); 00692 00693 00694 00695 00696 // ===> Attribute wvrTemp, which is optional 00697 00698 00699 00704 bool isWvrTempExists() const; 00705 00706 00707 00713 vector<Temperature > getWvrTemp() const; 00714 00715 00716 00717 00724 void setWvrTemp (vector<Temperature > wvrTemp); 00725 00726 00727 00728 00732 void clearWvrTemp (); 00733 00734 00735 00736 00737 // ===> Attribute water, which is optional 00738 00739 00740 00745 bool isWaterExists() const; 00746 00747 00748 00754 double getWater() const; 00755 00756 00757 00758 00765 void setWater (double water); 00766 00767 00768 00769 00773 void clearWater (); 00774 00775 00776 00778 // Extrinsic Table Attributes // 00780 00781 00782 // ===> Attribute stationId 00783 00784 00785 00786 00787 00792 Tag getStationId() const; 00793 00794 00795 00796 00806 void setStationId (Tag stationId); 00807 00808 00809 00810 00811 00812 00814 // Links // 00816 00817 00818 00819 00820 00827 StationRow* getStationUsingStationId(); 00828 00829 00830 00831 00832 00833 00834 00844 bool compareNoAutoInc(Tag stationId, ArrayTimeInterval timeInterval); 00845 00846 00847 00848 00849 00858 bool equalByRequiredValue(WeatherRow* x) ; 00859 00860 #ifndef WITHOUT_ACS 00861 00865 asdmIDL::WeatherRowIDL *toIDL() const; 00866 00874 void toIDL(asdmIDL::WeatherRowIDL& x) const; 00875 #endif 00876 00877 #ifndef WITHOUT_ACS 00878 00883 void setFromIDL (asdmIDL::WeatherRowIDL x) ; 00884 #endif 00885 00890 std::string toXML() const; 00891 00898 void setFromXML (std::string rowDoc) ; 00899 00902 // binary-deserialization material from an EndianIStream // 00904 00905 std::map<std::string, WeatherAttributeFromBin> fromBinMethods; 00906 void stationIdFromBin( EndianIStream& eis); 00907 void timeIntervalFromBin( EndianIStream& eis); 00908 00909 void pressureFromBin( EndianIStream& eis); 00910 void relHumidityFromBin( EndianIStream& eis); 00911 void temperatureFromBin( EndianIStream& eis); 00912 void windDirectionFromBin( EndianIStream& eis); 00913 void windSpeedFromBin( EndianIStream& eis); 00914 void windMaxFromBin( EndianIStream& eis); 00915 void dewPointFromBin( EndianIStream& eis); 00916 void numLayerFromBin( EndianIStream& eis); 00917 void layerHeightFromBin( EndianIStream& eis); 00918 void temperatureProfileFromBin( EndianIStream& eis); 00919 void cloudMonitorFromBin( EndianIStream& eis); 00920 void numWVRFromBin( EndianIStream& eis); 00921 void wvrTempFromBin( EndianIStream& eis); 00922 void waterFromBin( EndianIStream& eis); 00923 00924 00932 static WeatherRow* fromBin(EndianIStream& eis, WeatherTable& table, const std::vector<std::string>& attributesSeq); 00933 00940 void fromText(const std::string& attributeName, const std::string& t); 00942 00943 private: 00947 WeatherTable &table; 00951 bool hasBeenAdded; 00952 00953 // This method is used by the Table class when this row is added to the table. 00954 void isAdded(bool added); 00955 00956 00965 WeatherRow (WeatherTable &table); 00966 00984 WeatherRow (WeatherTable &table, WeatherRow &row); 00985 00987 // Intrinsic Table Attributes // 00989 00990 00991 // ===> Attribute timeInterval 00992 00993 00994 00995 ArrayTimeInterval timeInterval; 00996 00997 00998 00999 01000 01001 01002 // ===> Attribute pressure, which is optional 01003 01004 01005 bool pressureExists; 01006 01007 01008 Pressure pressure; 01009 01010 01011 01012 01013 01014 01015 // ===> Attribute relHumidity, which is optional 01016 01017 01018 bool relHumidityExists; 01019 01020 01021 Humidity relHumidity; 01022 01023 01024 01025 01026 01027 01028 // ===> Attribute temperature, which is optional 01029 01030 01031 bool temperatureExists; 01032 01033 01034 Temperature temperature; 01035 01036 01037 01038 01039 01040 01041 // ===> Attribute windDirection, which is optional 01042 01043 01044 bool windDirectionExists; 01045 01046 01047 Angle windDirection; 01048 01049 01050 01051 01052 01053 01054 // ===> Attribute windSpeed, which is optional 01055 01056 01057 bool windSpeedExists; 01058 01059 01060 Speed windSpeed; 01061 01062 01063 01064 01065 01066 01067 // ===> Attribute windMax, which is optional 01068 01069 01070 bool windMaxExists; 01071 01072 01073 Speed windMax; 01074 01075 01076 01077 01078 01079 01080 // ===> Attribute dewPoint, which is optional 01081 01082 01083 bool dewPointExists; 01084 01085 01086 Temperature dewPoint; 01087 01088 01089 01090 01091 01092 01093 // ===> Attribute numLayer, which is optional 01094 01095 01096 bool numLayerExists; 01097 01098 01099 int numLayer; 01100 01101 01102 01103 01104 01105 01106 // ===> Attribute layerHeight, which is optional 01107 01108 01109 bool layerHeightExists; 01110 01111 01112 vector<Length > layerHeight; 01113 01114 01115 01116 01117 01118 01119 // ===> Attribute temperatureProfile, which is optional 01120 01121 01122 bool temperatureProfileExists; 01123 01124 01125 vector<Temperature > temperatureProfile; 01126 01127 01128 01129 01130 01131 01132 // ===> Attribute cloudMonitor, which is optional 01133 01134 01135 bool cloudMonitorExists; 01136 01137 01138 Temperature cloudMonitor; 01139 01140 01141 01142 01143 01144 01145 // ===> Attribute numWVR, which is optional 01146 01147 01148 bool numWVRExists; 01149 01150 01151 int numWVR; 01152 01153 01154 01155 01156 01157 01158 // ===> Attribute wvrTemp, which is optional 01159 01160 01161 bool wvrTempExists; 01162 01163 01164 vector<Temperature > wvrTemp; 01165 01166 01167 01168 01169 01170 01171 // ===> Attribute water, which is optional 01172 01173 01174 bool waterExists; 01175 01176 01177 double water; 01178 01179 01180 01181 01182 01184 // Extrinsic Table Attributes // 01186 01187 01188 // ===> Attribute stationId 01189 01190 01191 01192 Tag stationId; 01193 01194 01195 01196 01197 01199 // Links // 01201 01202 01203 01204 01205 01206 01207 01208 01209 01210 /* 01212 // binary-deserialization material from an EndianIStream // 01214 std::map<std::string, WeatherAttributeFromBin> fromBinMethods; 01215 void stationIdFromBin( EndianIStream& eis); 01216 void timeIntervalFromBin( EndianIStream& eis); 01217 01218 void pressureFromBin( EndianIStream& eis); 01219 void relHumidityFromBin( EndianIStream& eis); 01220 void temperatureFromBin( EndianIStream& eis); 01221 void windDirectionFromBin( EndianIStream& eis); 01222 void windSpeedFromBin( EndianIStream& eis); 01223 void windMaxFromBin( EndianIStream& eis); 01224 void dewPointFromBin( EndianIStream& eis); 01225 void numLayerFromBin( EndianIStream& eis); 01226 void layerHeightFromBin( EndianIStream& eis); 01227 void temperatureProfileFromBin( EndianIStream& eis); 01228 void cloudMonitorFromBin( EndianIStream& eis); 01229 void numWVRFromBin( EndianIStream& eis); 01230 void wvrTempFromBin( EndianIStream& eis); 01231 void waterFromBin( EndianIStream& eis); 01232 01233 */ 01234 01236 // text-deserialization material // 01238 std::map<std::string, WeatherAttributeFromText> fromTextMethods; 01239 01240 void stationIdFromText (const string & s); 01241 01242 01243 void timeIntervalFromText (const string & s); 01244 01245 01246 01247 void pressureFromText (const string & s); 01248 01249 01250 void relHumidityFromText (const string & s); 01251 01252 01253 void temperatureFromText (const string & s); 01254 01255 01256 void windDirectionFromText (const string & s); 01257 01258 01259 void windSpeedFromText (const string & s); 01260 01261 01262 void windMaxFromText (const string & s); 01263 01264 01265 void dewPointFromText (const string & s); 01266 01267 01268 void numLayerFromText (const string & s); 01269 01270 01271 void layerHeightFromText (const string & s); 01272 01273 01274 void temperatureProfileFromText (const string & s); 01275 01276 01277 void cloudMonitorFromText (const string & s); 01278 01279 01280 void numWVRFromText (const string & s); 01281 01282 01283 void wvrTempFromText (const string & s); 01284 01285 01286 void waterFromText (const string & s); 01287 01288 01289 01294 void toBin(EndianOSStream& eoss); 01295 01305 }; 01306 01307 } // End namespace asdm 01308 01309 #endif /* Weather_CLASS */