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 #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 #include <Angle.h>
00050 #include <AngularRate.h>
00051 #include <ArrayTime.h>
00052 #include <ArrayTimeInterval.h>
00053 #include <Complex.h>
00054 #include <Entity.h>
00055 #include <EntityId.h>
00056 #include <EntityRef.h>
00057 #include <Flux.h>
00058 #include <Frequency.h>
00059 #include <Humidity.h>
00060 #include <Interval.h>
00061 #include <Length.h>
00062 #include <Pressure.h>
00063 #include <Speed.h>
00064 #include <Tag.h>
00065 #include <Temperature.h>
00066 #include <ConversionException.h>
00067 #include <NoSuchRow.h>
00068 #include <IllegalAccessException.h>
00069
00070
00071
00072
00073
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 using asdm::Angle;
00111 using asdm::AngularRate;
00112 using asdm::ArrayTime;
00113 using asdm::Complex;
00114 using asdm::Entity;
00115 using asdm::EntityId;
00116 using asdm::EntityRef;
00117 using asdm::Flux;
00118 using asdm::Frequency;
00119 using asdm::Humidity;
00120 using asdm::Interval;
00121 using asdm::Length;
00122 using asdm::Pressure;
00123 using asdm::Speed;
00124 using asdm::Tag;
00125 using asdm::Temperature;
00126 using asdm::ConversionException;
00127 using asdm::NoSuchRow;
00128 using asdm::IllegalAccessException;
00129
00130
00131
00132
00133
00134 namespace asdm {
00135
00136
00137
00138
00139
00140 class StationRow;
00141
00142
00149 class WeatherRow {
00150 friend class asdm::WeatherTable;
00151
00152 public:
00153
00154 virtual ~WeatherRow();
00155
00159 WeatherTable &getTable() const;
00160
00161 #ifndef WITHOUT_ACS
00162
00166 WeatherRowIDL *toIDL() const;
00167 #endif
00168
00169 #ifndef WITHOUT_ACS
00170
00174 void setFromIDL (WeatherRowIDL x) throw(ConversionException);
00175 #endif
00176
00181 string toXML() const;
00182
00188 void setFromXML (string rowDoc) throw(ConversionException);
00189
00191
00193
00194
00195
00196
00197
00198
00199
00200
00205 ArrayTimeInterval getTimeInterval() const;
00206
00207
00208
00209
00216 void setTimeInterval (ArrayTimeInterval timeInterval) throw(IllegalAccessException);
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00234 Pressure getPressure() const;
00235
00236
00237
00238
00244 void setPressure (Pressure pressure);
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00262 Humidity getRelHumidity() const;
00263
00264
00265
00266
00272 void setRelHumidity (Humidity relHumidity);
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00290 Temperature getTemperature() const;
00291
00292
00293
00294
00300 void setTemperature (Temperature temperature);
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00316 bool isDewPointExists() const;
00317
00318
00319
00325 Temperature getDewPoint() const throw(IllegalAccessException);
00326
00327
00328
00329
00335 void setDewPoint (Temperature dewPoint);
00336
00337
00338
00339
00343 void clearDewPoint ();
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00358 Angle getWindDirection() const;
00359
00360
00361
00362
00368 void setWindDirection (Angle windDirection);
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00386 Speed getWindSpeed() const;
00387
00388
00389
00390
00396 void setWindSpeed (Speed windSpeed);
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00414 Speed getWindMax() const;
00415
00416
00417
00418
00424 void setWindMax (Speed windMax);
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00442 bool getPressureFlag() const;
00443
00444
00445
00446
00452 void setPressureFlag (bool pressureFlag);
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00470 bool getRelHumidityFlag() const;
00471
00472
00473
00474
00480 void setRelHumidityFlag (bool relHumidityFlag);
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00498 bool getTemperatureFlag() const;
00499
00500
00501
00502
00508 void setTemperatureFlag (bool temperatureFlag);
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00524 bool isDewPointFlagExists() const;
00525
00526
00527
00533 bool getDewPointFlag() const throw(IllegalAccessException);
00534
00535
00536
00537
00543 void setDewPointFlag (bool dewPointFlag);
00544
00545
00546
00547
00551 void clearDewPointFlag ();
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00566 bool getWindDirectionFlag() const;
00567
00568
00569
00570
00576 void setWindDirectionFlag (bool windDirectionFlag);
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00594 bool getWindSpeedFlag() const;
00595
00596
00597
00598
00604 void setWindSpeedFlag (bool windSpeedFlag);
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00622 bool getWindMaxFlag() const;
00623
00624
00625
00626
00632 void setWindMaxFlag (bool windMaxFlag);
00633
00634
00635
00636
00637
00638
00640
00642
00643
00644
00645
00646
00647
00648
00649
00654 Tag getStationId() const;
00655
00656
00657
00658
00665 void setStationId (Tag stationId) throw(IllegalAccessException);
00666
00667
00668
00669
00670
00671
00673
00675
00676
00677
00678
00679
00686 StationRow* getStationUsingStationId();
00687
00688
00689
00690
00691
00692
00693
00698 bool compareNoAutoInc(Tag stationId, ArrayTimeInterval timeInterval, Pressure pressure, Humidity relHumidity, Temperature temperature, Angle windDirection, Speed windSpeed, Speed windMax, bool pressureFlag, bool relHumidityFlag, bool temperatureFlag, bool windDirectionFlag, bool windSpeedFlag, bool windMaxFlag);
00699
00700
00701
00702
00703 bool compareRequiredValue(Pressure pressure, Humidity relHumidity, Temperature temperature, Angle windDirection, Speed windSpeed, Speed windMax, bool pressureFlag, bool relHumidityFlag, bool temperatureFlag, bool windDirectionFlag, bool windSpeedFlag, bool windMaxFlag);
00704
00705
00714 bool equalByRequiredValue(WeatherRow* x) ;
00715
00716 private:
00720 WeatherTable &table;
00724 bool hasBeenAdded;
00725
00726
00727 void isAdded();
00728
00729
00738 WeatherRow (WeatherTable &table);
00739
00757 WeatherRow (WeatherTable &table, WeatherRow &row);
00758
00760
00762
00763
00764
00765
00766
00767
00768 ArrayTimeInterval timeInterval;
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779 Pressure pressure;
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790 Humidity relHumidity;
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801 Temperature temperature;
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811 bool dewPointExists;
00812
00813
00814 Temperature dewPoint;
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825 Angle windDirection;
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836 Speed windSpeed;
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847 Speed windMax;
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858 bool pressureFlag;
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869 bool relHumidityFlag;
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880 bool temperatureFlag;
00881
00882
00883
00884
00885
00886
00887
00888
00889
00890 bool dewPointFlagExists;
00891
00892
00893 bool dewPointFlag;
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904 bool windDirectionFlag;
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915 bool windSpeedFlag;
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926 bool windMaxFlag;
00927
00928
00929
00930
00931
00933
00935
00936
00937
00938
00939
00940
00941 Tag stationId;
00942
00943
00944
00945
00946
00948
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959 };
00960
00961 }
00962
00963 #endif