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 using std::vector;
00041 using std::string;
00042 using std::set;
00043 
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::WeatherRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <Angle.h>
00055 using  asdm::Angle;
00056 
00057 #include <Speed.h>
00058 using  asdm::Speed;
00059 
00060 #include <Tag.h>
00061 using  asdm::Tag;
00062 
00063 #include <Temperature.h>
00064 using  asdm::Temperature;
00065 
00066 #include <Humidity.h>
00067 using  asdm::Humidity;
00068 
00069 #include <ArrayTimeInterval.h>
00070 using  asdm::ArrayTimeInterval;
00071 
00072 #include <Pressure.h>
00073 using  asdm::Pressure;
00074 
00075 
00076 
00077 
00078         
00079 
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 #include <ConversionException.h>
00111 #include <NoSuchRow.h>
00112 #include <IllegalAccessException.h>
00113 
00114 
00115 /*\file Weather.h
00116     \brief Generated from model's revision "1.55", branch "HEAD"
00117 */
00118 
00119 namespace asdm {
00120 
00121 //class asdm::WeatherTable;
00122 
00123 
00124 // class asdm::StationRow;
00125 class StationRow;
00126         
00127 
00128 class WeatherRow;
00129 typedef void (WeatherRow::*WeatherAttributeFromBin) (EndianISStream& eiss);
00130 
00137 class WeatherRow {
00138 friend class asdm::WeatherTable;
00139 
00140 public:
00141 
00142         virtual ~WeatherRow();
00143 
00147         WeatherTable &getTable() const;
00148         
00153         bool isAdded() const;
00154                 
00156         // Intrinsic Table Attributes //
00158         
00159         
00160         // ===> Attribute timeInterval
00161         
00162         
00163         
00164 
00165         
00170         ArrayTimeInterval getTimeInterval() const;
00171         
00172  
00173         
00174         
00184         void setTimeInterval (ArrayTimeInterval timeInterval);
00185                 
00186         
00187         
00188         
00189 
00190 
00191         
00192         // ===> Attribute pressure
00193         
00194         
00195         
00196 
00197         
00202         Pressure getPressure() const;
00203         
00204  
00205         
00206         
00214         void setPressure (Pressure pressure);
00215                 
00216         
00217         
00218         
00219 
00220 
00221         
00222         // ===> Attribute pressureFlag
00223         
00224         
00225         
00226 
00227         
00232         bool getPressureFlag() const;
00233         
00234  
00235         
00236         
00244         void setPressureFlag (bool pressureFlag);
00245                 
00246         
00247         
00248         
00249 
00250 
00251         
00252         // ===> Attribute relHumidity
00253         
00254         
00255         
00256 
00257         
00262         Humidity getRelHumidity() const;
00263         
00264  
00265         
00266         
00274         void setRelHumidity (Humidity relHumidity);
00275                 
00276         
00277         
00278         
00279 
00280 
00281         
00282         // ===> Attribute relHumidityFlag
00283         
00284         
00285         
00286 
00287         
00292         bool getRelHumidityFlag() const;
00293         
00294  
00295         
00296         
00304         void setRelHumidityFlag (bool relHumidityFlag);
00305                 
00306         
00307         
00308         
00309 
00310 
00311         
00312         // ===> Attribute temperature
00313         
00314         
00315         
00316 
00317         
00322         Temperature getTemperature() const;
00323         
00324  
00325         
00326         
00334         void setTemperature (Temperature temperature);
00335                 
00336         
00337         
00338         
00339 
00340 
00341         
00342         // ===> Attribute temperatureFlag
00343         
00344         
00345         
00346 
00347         
00352         bool getTemperatureFlag() const;
00353         
00354  
00355         
00356         
00364         void setTemperatureFlag (bool temperatureFlag);
00365                 
00366         
00367         
00368         
00369 
00370 
00371         
00372         // ===> Attribute windDirection
00373         
00374         
00375         
00376 
00377         
00382         Angle getWindDirection() const;
00383         
00384  
00385         
00386         
00394         void setWindDirection (Angle windDirection);
00395                 
00396         
00397         
00398         
00399 
00400 
00401         
00402         // ===> Attribute windDirectionFlag
00403         
00404         
00405         
00406 
00407         
00412         bool getWindDirectionFlag() const;
00413         
00414  
00415         
00416         
00424         void setWindDirectionFlag (bool windDirectionFlag);
00425                 
00426         
00427         
00428         
00429 
00430 
00431         
00432         // ===> Attribute windSpeed
00433         
00434         
00435         
00436 
00437         
00442         Speed getWindSpeed() const;
00443         
00444  
00445         
00446         
00454         void setWindSpeed (Speed windSpeed);
00455                 
00456         
00457         
00458         
00459 
00460 
00461         
00462         // ===> Attribute windSpeedFlag
00463         
00464         
00465         
00466 
00467         
00472         bool getWindSpeedFlag() const;
00473         
00474  
00475         
00476         
00484         void setWindSpeedFlag (bool windSpeedFlag);
00485                 
00486         
00487         
00488         
00489 
00490 
00491         
00492         // ===> Attribute windMax
00493         
00494         
00495         
00496 
00497         
00502         Speed getWindMax() const;
00503         
00504  
00505         
00506         
00514         void setWindMax (Speed windMax);
00515                 
00516         
00517         
00518         
00519 
00520 
00521         
00522         // ===> Attribute windMaxFlag
00523         
00524         
00525         
00526 
00527         
00532         bool getWindMaxFlag() const;
00533         
00534  
00535         
00536         
00544         void setWindMaxFlag (bool windMaxFlag);
00545                 
00546         
00547         
00548         
00549 
00550 
00551         
00552         // ===> Attribute dewPoint, which is optional
00553         
00554         
00555         
00560         bool isDewPointExists() const;
00561         
00562 
00563         
00569         Temperature getDewPoint() const;
00570         
00571  
00572         
00573         
00580         void setDewPoint (Temperature dewPoint);
00581                 
00582         
00583         
00584         
00588         void clearDewPoint ();
00589         
00590 
00591 
00592         
00593         // ===> Attribute dewPointFlag, which is optional
00594         
00595         
00596         
00601         bool isDewPointFlagExists() const;
00602         
00603 
00604         
00610         bool getDewPointFlag() const;
00611         
00612  
00613         
00614         
00621         void setDewPointFlag (bool dewPointFlag);
00622                 
00623         
00624         
00625         
00629         void clearDewPointFlag ();
00630         
00631 
00632 
00634         // Extrinsic Table Attributes //
00636         
00637         
00638         // ===> Attribute stationId
00639         
00640         
00641         
00642 
00643         
00648         Tag getStationId() const;
00649         
00650  
00651         
00652         
00662         void setStationId (Tag stationId);
00663                 
00664         
00665         
00666         
00667 
00668 
00670         // Links //
00672         
00673         
00674 
00675         
00676                 
00683          StationRow* getStationUsingStationId();
00684          
00685 
00686         
00687 
00688         
00689         
00690         
00724         bool compareNoAutoInc(Tag stationId, ArrayTimeInterval timeInterval, Pressure pressure, bool pressureFlag, Humidity relHumidity, bool relHumidityFlag, Temperature temperature, bool temperatureFlag, Angle windDirection, bool windDirectionFlag, Speed windSpeed, bool windSpeedFlag, Speed windMax, bool windMaxFlag);
00725         
00726         
00727 
00728         
00758         bool compareRequiredValue(Pressure pressure, bool pressureFlag, Humidity relHumidity, bool relHumidityFlag, Temperature temperature, bool temperatureFlag, Angle windDirection, bool windDirectionFlag, Speed windSpeed, bool windSpeedFlag, Speed windMax, bool windMaxFlag); 
00759                  
00760         
00769         bool equalByRequiredValue(WeatherRow* x) ;
00770         
00771 #ifndef WITHOUT_ACS
00772 
00776         WeatherRowIDL *toIDL() const;
00777 #endif
00778         
00779 #ifndef WITHOUT_ACS
00780 
00785         void setFromIDL (WeatherRowIDL x) ;
00786 #endif
00787         
00792         string toXML() const;
00793 
00800         void setFromXML (string rowDoc) ;       
00801 
00802 private:
00806         WeatherTable &table;
00810         bool hasBeenAdded;
00811 
00812         // This method is used by the Table class when this row is added to the table.
00813         void isAdded(bool added);
00814 
00815 
00824         WeatherRow (WeatherTable &table);
00825 
00843          WeatherRow (WeatherTable &table, WeatherRow &row);
00844                 
00846         // Intrinsic Table Attributes //
00848         
00849         
00850         // ===> Attribute timeInterval
00851         
00852         
00853 
00854         ArrayTimeInterval timeInterval;
00855 
00856         
00857         
00858         
00859 
00860         
00861         // ===> Attribute pressure
00862         
00863         
00864 
00865         Pressure pressure;
00866 
00867         
00868         
00869         
00870 
00871         
00872         // ===> Attribute pressureFlag
00873         
00874         
00875 
00876         bool pressureFlag;
00877 
00878         
00879         
00880         
00881 
00882         
00883         // ===> Attribute relHumidity
00884         
00885         
00886 
00887         Humidity relHumidity;
00888 
00889         
00890         
00891         
00892 
00893         
00894         // ===> Attribute relHumidityFlag
00895         
00896         
00897 
00898         bool relHumidityFlag;
00899 
00900         
00901         
00902         
00903 
00904         
00905         // ===> Attribute temperature
00906         
00907         
00908 
00909         Temperature temperature;
00910 
00911         
00912         
00913         
00914 
00915         
00916         // ===> Attribute temperatureFlag
00917         
00918         
00919 
00920         bool temperatureFlag;
00921 
00922         
00923         
00924         
00925 
00926         
00927         // ===> Attribute windDirection
00928         
00929         
00930 
00931         Angle windDirection;
00932 
00933         
00934         
00935         
00936 
00937         
00938         // ===> Attribute windDirectionFlag
00939         
00940         
00941 
00942         bool windDirectionFlag;
00943 
00944         
00945         
00946         
00947 
00948         
00949         // ===> Attribute windSpeed
00950         
00951         
00952 
00953         Speed windSpeed;
00954 
00955         
00956         
00957         
00958 
00959         
00960         // ===> Attribute windSpeedFlag
00961         
00962         
00963 
00964         bool windSpeedFlag;
00965 
00966         
00967         
00968         
00969 
00970         
00971         // ===> Attribute windMax
00972         
00973         
00974 
00975         Speed windMax;
00976 
00977         
00978         
00979         
00980 
00981         
00982         // ===> Attribute windMaxFlag
00983         
00984         
00985 
00986         bool windMaxFlag;
00987 
00988         
00989         
00990         
00991 
00992         
00993         // ===> Attribute dewPoint, which is optional
00994         
00995         
00996         bool dewPointExists;
00997         
00998 
00999         Temperature dewPoint;
01000 
01001         
01002         
01003         
01004 
01005         
01006         // ===> Attribute dewPointFlag, which is optional
01007         
01008         
01009         bool dewPointFlagExists;
01010         
01011 
01012         bool dewPointFlag;
01013 
01014         
01015         
01016         
01017 
01019         // Extrinsic Table Attributes //
01021         
01022         
01023         // ===> Attribute stationId
01024         
01025         
01026 
01027         Tag stationId;
01028 
01029         
01030         
01031         
01032 
01034         // Links //
01036         
01037         
01038                 
01039 
01040          
01041 
01042         
01043 
01044         
01046         // binary-deserialization material//
01048         map<string, WeatherAttributeFromBin> fromBinMethods;
01049 void stationIdFromBin( EndianISStream& eiss);
01050 void timeIntervalFromBin( EndianISStream& eiss);
01051 void pressureFromBin( EndianISStream& eiss);
01052 void pressureFlagFromBin( EndianISStream& eiss);
01053 void relHumidityFromBin( EndianISStream& eiss);
01054 void relHumidityFlagFromBin( EndianISStream& eiss);
01055 void temperatureFromBin( EndianISStream& eiss);
01056 void temperatureFlagFromBin( EndianISStream& eiss);
01057 void windDirectionFromBin( EndianISStream& eiss);
01058 void windDirectionFlagFromBin( EndianISStream& eiss);
01059 void windSpeedFromBin( EndianISStream& eiss);
01060 void windSpeedFlagFromBin( EndianISStream& eiss);
01061 void windMaxFromBin( EndianISStream& eiss);
01062 void windMaxFlagFromBin( EndianISStream& eiss);
01063 
01064 void dewPointFromBin( EndianISStream& eiss);
01065 void dewPointFlagFromBin( EndianISStream& eiss);
01066         
01067         
01072          void toBin(EndianOSStream& eoss);
01073                  
01081          static WeatherRow* fromBin(EndianISStream& eiss, WeatherTable& table, const vector<string>& attributesSeq);     
01082 
01083 };
01084 
01085 } // End namespace asdm
01086 
01087 #endif /* Weather_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines