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