casa  $Rev:20696$
WeatherRow.h
Go to the documentation of this file.
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.62", 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 #endif
00867         
00868 #ifndef WITHOUT_ACS
00869 
00874         void setFromIDL (asdmIDL::WeatherRowIDL x) ;
00875 #endif
00876         
00881         std::string toXML() const;
00882 
00889         void setFromXML (std::string rowDoc) ;
00890 
00893         // binary-deserialization material from an EndianIStream  //
00895 
00896         std::map<std::string, WeatherAttributeFromBin> fromBinMethods;
00897 void stationIdFromBin( EndianIStream& eis);
00898 void timeIntervalFromBin( EndianIStream& eis);
00899 
00900 void pressureFromBin( EndianIStream& eis);
00901 void relHumidityFromBin( EndianIStream& eis);
00902 void temperatureFromBin( EndianIStream& eis);
00903 void windDirectionFromBin( EndianIStream& eis);
00904 void windSpeedFromBin( EndianIStream& eis);
00905 void windMaxFromBin( EndianIStream& eis);
00906 void dewPointFromBin( EndianIStream& eis);
00907 void numLayerFromBin( EndianIStream& eis);
00908 void layerHeightFromBin( EndianIStream& eis);
00909 void temperatureProfileFromBin( EndianIStream& eis);
00910 void cloudMonitorFromBin( EndianIStream& eis);
00911 void numWVRFromBin( EndianIStream& eis);
00912 void wvrTempFromBin( EndianIStream& eis);
00913 void waterFromBin( EndianIStream& eis);
00914 
00915 
00923          static WeatherRow* fromBin(EndianIStream& eis, WeatherTable& table, const std::vector<std::string>& attributesSeq);     
00924  
00931          void fromText(const std::string& attributeName, const std::string&  t);
00933 
00934 private:
00938         WeatherTable &table;
00942         bool hasBeenAdded;
00943 
00944         // This method is used by the Table class when this row is added to the table.
00945         void isAdded(bool added);
00946 
00947 
00956         WeatherRow (WeatherTable &table);
00957 
00975          WeatherRow (WeatherTable &table, WeatherRow &row);
00976                 
00978         // Intrinsic Table Attributes //
00980         
00981         
00982         // ===> Attribute timeInterval
00983         
00984         
00985 
00986         ArrayTimeInterval timeInterval;
00987 
00988         
00989         
00990         
00991 
00992         
00993         // ===> Attribute pressure, which is optional
00994         
00995         
00996         bool pressureExists;
00997         
00998 
00999         Pressure pressure;
01000 
01001         
01002         
01003         
01004 
01005         
01006         // ===> Attribute relHumidity, which is optional
01007         
01008         
01009         bool relHumidityExists;
01010         
01011 
01012         Humidity relHumidity;
01013 
01014         
01015         
01016         
01017 
01018         
01019         // ===> Attribute temperature, which is optional
01020         
01021         
01022         bool temperatureExists;
01023         
01024 
01025         Temperature temperature;
01026 
01027         
01028         
01029         
01030 
01031         
01032         // ===> Attribute windDirection, which is optional
01033         
01034         
01035         bool windDirectionExists;
01036         
01037 
01038         Angle windDirection;
01039 
01040         
01041         
01042         
01043 
01044         
01045         // ===> Attribute windSpeed, which is optional
01046         
01047         
01048         bool windSpeedExists;
01049         
01050 
01051         Speed windSpeed;
01052 
01053         
01054         
01055         
01056 
01057         
01058         // ===> Attribute windMax, which is optional
01059         
01060         
01061         bool windMaxExists;
01062         
01063 
01064         Speed windMax;
01065 
01066         
01067         
01068         
01069 
01070         
01071         // ===> Attribute dewPoint, which is optional
01072         
01073         
01074         bool dewPointExists;
01075         
01076 
01077         Temperature dewPoint;
01078 
01079         
01080         
01081         
01082 
01083         
01084         // ===> Attribute numLayer, which is optional
01085         
01086         
01087         bool numLayerExists;
01088         
01089 
01090         int numLayer;
01091 
01092         
01093         
01094         
01095 
01096         
01097         // ===> Attribute layerHeight, which is optional
01098         
01099         
01100         bool layerHeightExists;
01101         
01102 
01103         vector<Length > layerHeight;
01104 
01105         
01106         
01107         
01108 
01109         
01110         // ===> Attribute temperatureProfile, which is optional
01111         
01112         
01113         bool temperatureProfileExists;
01114         
01115 
01116         vector<Temperature > temperatureProfile;
01117 
01118         
01119         
01120         
01121 
01122         
01123         // ===> Attribute cloudMonitor, which is optional
01124         
01125         
01126         bool cloudMonitorExists;
01127         
01128 
01129         Temperature cloudMonitor;
01130 
01131         
01132         
01133         
01134 
01135         
01136         // ===> Attribute numWVR, which is optional
01137         
01138         
01139         bool numWVRExists;
01140         
01141 
01142         int numWVR;
01143 
01144         
01145         
01146         
01147 
01148         
01149         // ===> Attribute wvrTemp, which is optional
01150         
01151         
01152         bool wvrTempExists;
01153         
01154 
01155         vector<Temperature > wvrTemp;
01156 
01157         
01158         
01159         
01160 
01161         
01162         // ===> Attribute water, which is optional
01163         
01164         
01165         bool waterExists;
01166         
01167 
01168         double water;
01169 
01170         
01171         
01172         
01173 
01175         // Extrinsic Table Attributes //
01177         
01178         
01179         // ===> Attribute stationId
01180         
01181         
01182 
01183         Tag stationId;
01184 
01185         
01186         
01187         
01188 
01190         // Links //
01192         
01193         
01194                 
01195 
01196          
01197 
01198         
01199 
01200         
01201 /*
01203         // binary-deserialization material from an EndianIStream  //
01205         std::map<std::string, WeatherAttributeFromBin> fromBinMethods;
01206 void stationIdFromBin( EndianIStream& eis);
01207 void timeIntervalFromBin( EndianIStream& eis);
01208 
01209 void pressureFromBin( EndianIStream& eis);
01210 void relHumidityFromBin( EndianIStream& eis);
01211 void temperatureFromBin( EndianIStream& eis);
01212 void windDirectionFromBin( EndianIStream& eis);
01213 void windSpeedFromBin( EndianIStream& eis);
01214 void windMaxFromBin( EndianIStream& eis);
01215 void dewPointFromBin( EndianIStream& eis);
01216 void numLayerFromBin( EndianIStream& eis);
01217 void layerHeightFromBin( EndianIStream& eis);
01218 void temperatureProfileFromBin( EndianIStream& eis);
01219 void cloudMonitorFromBin( EndianIStream& eis);
01220 void numWVRFromBin( EndianIStream& eis);
01221 void wvrTempFromBin( EndianIStream& eis);
01222 void waterFromBin( EndianIStream& eis);
01223 
01224 */
01225         
01227         // text-deserialization material //
01229         std::map<std::string, WeatherAttributeFromText> fromTextMethods;
01230         
01231 void stationIdFromText (const string & s);
01232         
01233         
01234 void timeIntervalFromText (const string & s);
01235         
01236 
01237         
01238 void pressureFromText (const string & s);
01239         
01240         
01241 void relHumidityFromText (const string & s);
01242         
01243         
01244 void temperatureFromText (const string & s);
01245         
01246         
01247 void windDirectionFromText (const string & s);
01248         
01249         
01250 void windSpeedFromText (const string & s);
01251         
01252         
01253 void windMaxFromText (const string & s);
01254         
01255         
01256 void dewPointFromText (const string & s);
01257         
01258         
01259 void numLayerFromText (const string & s);
01260         
01261         
01262 void layerHeightFromText (const string & s);
01263         
01264         
01265 void temperatureProfileFromText (const string & s);
01266         
01267         
01268 void cloudMonitorFromText (const string & s);
01269         
01270         
01271 void numWVRFromText (const string & s);
01272         
01273         
01274 void wvrTempFromText (const string & s);
01275         
01276         
01277 void waterFromText (const string & s);
01278         
01279         
01280         
01285          void toBin(EndianOSStream& eoss);
01286                  
01296 };
01297 
01298 } // End namespace asdm
01299 
01300 #endif /* Weather_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines