SeeingRow.h
Go to the documentation of this file.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 SeeingRow_CLASS
00035 #define SeeingRow_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 <Length.h>
00056
00057
00058
00059 #include <ArrayTimeInterval.h>
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 #include <ConversionException.h>
00080 #include <NoSuchRow.h>
00081 #include <IllegalAccessException.h>
00082
00083 #include <RowTransformer.h>
00084
00085
00086
00087
00088
00089
00090 namespace asdm {
00091
00092
00093
00094
00095
00096 class SeeingRow;
00097 typedef void (SeeingRow::*SeeingAttributeFromBin) (EndianIStream& eis);
00098 typedef void (SeeingRow::*SeeingAttributeFromText) (const string& s);
00099
00106 class SeeingRow {
00107 friend class asdm::SeeingTable;
00108 friend class asdm::RowTransformer<SeeingRow>;
00109
00110
00111 public:
00112
00113 virtual ~SeeingRow();
00114
00118 SeeingTable &getTable() const;
00119
00124 bool isAdded() const;
00125
00127
00129
00130
00131
00132
00133
00134
00135
00136
00141 ArrayTimeInterval getTimeInterval() const;
00142
00143
00144
00145
00155 void setTimeInterval (ArrayTimeInterval timeInterval);
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00173 int getNumBaseLength() const;
00174
00175
00176
00177
00185 void setNumBaseLength (int numBaseLength);
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00203 vector<Length > getBaseLength() const;
00204
00205
00206
00207
00215 void setBaseLength (vector<Length > baseLength);
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00233 vector<Angle > getPhaseRms() const;
00234
00235
00236
00237
00245 void setPhaseRms (vector<Angle > phaseRms);
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00263 float getSeeing() const;
00264
00265
00266
00267
00275 void setSeeing (float seeing);
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00293 float getExponent() const;
00294
00295
00296
00297
00305 void setExponent (float exponent);
00306
00307
00308
00309
00310
00311
00313
00315
00317
00319
00320
00321
00322
00340 bool compareNoAutoInc(ArrayTimeInterval timeInterval, int numBaseLength, vector<Length > baseLength, vector<Angle > phaseRms, float seeing, float exponent);
00341
00342
00343
00344
00360 bool compareRequiredValue(int numBaseLength, vector<Length > baseLength, vector<Angle > phaseRms, float seeing, float exponent);
00361
00362
00371 bool equalByRequiredValue(SeeingRow* x) ;
00372
00373 #ifndef WITHOUT_ACS
00374
00378 asdmIDL::SeeingRowIDL *toIDL() const;
00379
00387 void toIDL(asdmIDL::SeeingRowIDL& x) const;
00388 #endif
00389
00390 #ifndef WITHOUT_ACS
00391
00396 void setFromIDL (asdmIDL::SeeingRowIDL x) ;
00397 #endif
00398
00403 std::string toXML() const;
00404
00411 void setFromXML (std::string rowDoc) ;
00412
00415
00417
00418 std::map<std::string, SeeingAttributeFromBin> fromBinMethods;
00419 void timeIntervalFromBin( EndianIStream& eis);
00420 void numBaseLengthFromBin( EndianIStream& eis);
00421 void baseLengthFromBin( EndianIStream& eis);
00422 void phaseRmsFromBin( EndianIStream& eis);
00423 void seeingFromBin( EndianIStream& eis);
00424 void exponentFromBin( EndianIStream& eis);
00425
00426
00427
00435 static SeeingRow* fromBin(EndianIStream& eis, SeeingTable& table, const std::vector<std::string>& attributesSeq);
00436
00443 void fromText(const std::string& attributeName, const std::string& t);
00445
00446 private:
00450 SeeingTable &table;
00454 bool hasBeenAdded;
00455
00456
00457 void isAdded(bool added);
00458
00459
00468 SeeingRow (SeeingTable &table);
00469
00487 SeeingRow (SeeingTable &table, SeeingRow &row);
00488
00490
00492
00493
00494
00495
00496
00497
00498 ArrayTimeInterval timeInterval;
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509 int numBaseLength;
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520 vector<Length > baseLength;
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531 vector<Angle > phaseRms;
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 float seeing;
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553 float exponent;
00554
00555
00556
00557
00558
00560
00562
00564
00566
00567
00568
00570
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00584
00586 std::map<std::string, SeeingAttributeFromText> fromTextMethods;
00587
00588 void timeIntervalFromText (const string & s);
00589
00590
00591 void numBaseLengthFromText (const string & s);
00592
00593
00594 void baseLengthFromText (const string & s);
00595
00596
00597 void phaseRmsFromText (const string & s);
00598
00599
00600 void seeingFromText (const string & s);
00601
00602
00603 void exponentFromText (const string & s);
00604
00605
00606
00607
00612 void toBin(EndianOSStream& eoss);
00613
00623 };
00624
00625 }
00626
00627 #endif