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 SubscanRow_CLASS
00035 #define SubscanRow_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::SubscanRowIDL;
00047 #endif
00048
00049
00050
00051
00052
00053
00054 #include <ArrayTime.h>
00055 using asdm::ArrayTime;
00056
00057 #include <Tag.h>
00058 using asdm::Tag;
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 #include "CSubscanIntent.h"
00075 using namespace SubscanIntentMod;
00076
00077
00078
00079 #include "CSwitchingMode.h"
00080 using namespace SwitchingModeMod;
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 #include "CCorrelatorCalibration.h"
00091 using namespace CorrelatorCalibrationMod;
00092
00093
00094
00095
00096 #include <ConversionException.h>
00097 #include <NoSuchRow.h>
00098 #include <IllegalAccessException.h>
00099
00100
00101
00102
00103
00104
00105 namespace asdm {
00106
00107
00108
00109
00110
00111 class ExecBlockRow;
00112
00113
00114 class SubscanRow;
00115 typedef void (SubscanRow::*SubscanAttributeFromBin) (EndianISStream& eiss);
00116
00123 class SubscanRow {
00124 friend class asdm::SubscanTable;
00125
00126 public:
00127
00128 virtual ~SubscanRow();
00129
00133 SubscanTable &getTable() const;
00134
00139 bool isAdded() const;
00140
00142
00144
00145
00146
00147
00148
00149
00150
00151
00156 int getScanNumber() const;
00157
00158
00159
00160
00170 void setScanNumber (int scanNumber);
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00188 int getSubscanNumber() const;
00189
00190
00191
00192
00202 void setSubscanNumber (int subscanNumber);
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00220 ArrayTime getStartTime() const;
00221
00222
00223
00224
00232 void setStartTime (ArrayTime startTime);
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00250 ArrayTime getEndTime() const;
00251
00252
00253
00254
00262 void setEndTime (ArrayTime endTime);
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00280 string getFieldName() const;
00281
00282
00283
00284
00292 void setFieldName (string fieldName);
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00310 SubscanIntentMod::SubscanIntent getSubscanIntent() const;
00311
00312
00313
00314
00322 void setSubscanIntent (SubscanIntentMod::SubscanIntent subscanIntent);
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00338 bool isSubscanModeExists() const;
00339
00340
00341
00347 SwitchingModeMod::SwitchingMode getSubscanMode() const;
00348
00349
00350
00351
00358 void setSubscanMode (SwitchingModeMod::SwitchingMode subscanMode);
00359
00360
00361
00362
00366 void clearSubscanMode ();
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00381 int getNumberIntegration() const;
00382
00383
00384
00385
00393 void setNumberIntegration (int numberIntegration);
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00411 vector<int > getNumberSubintegration() const;
00412
00413
00414
00415
00423 void setNumberSubintegration (vector<int > numberSubintegration);
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00441 bool getFlagRow() const;
00442
00443
00444
00445
00453 void setFlagRow (bool flagRow);
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00469 bool isCorrelatorCalibrationExists() const;
00470
00471
00472
00478 CorrelatorCalibrationMod::CorrelatorCalibration getCorrelatorCalibration() const;
00479
00480
00481
00482
00489 void setCorrelatorCalibration (CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration);
00490
00491
00492
00493
00497 void clearCorrelatorCalibration ();
00498
00499
00500
00502
00504
00505
00506
00507
00508
00509
00510
00511
00516 Tag getExecBlockId() const;
00517
00518
00519
00520
00530 void setExecBlockId (Tag execBlockId);
00531
00532
00533
00534
00535
00536
00538
00540
00541
00542
00543
00544
00551 ExecBlockRow* getExecBlockUsingExecBlockId();
00552
00553
00554
00555
00556
00557
00558
00584 bool compareNoAutoInc(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numberIntegration, vector<int > numberSubintegration, bool flagRow);
00585
00586
00587
00588
00608 bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numberIntegration, vector<int > numberSubintegration, bool flagRow);
00609
00610
00619 bool equalByRequiredValue(SubscanRow* x) ;
00620
00621 #ifndef WITHOUT_ACS
00622
00626 SubscanRowIDL *toIDL() const;
00627 #endif
00628
00629 #ifndef WITHOUT_ACS
00630
00635 void setFromIDL (SubscanRowIDL x) ;
00636 #endif
00637
00642 string toXML() const;
00643
00650 void setFromXML (string rowDoc) ;
00651
00652 private:
00656 SubscanTable &table;
00660 bool hasBeenAdded;
00661
00662
00663 void isAdded(bool added);
00664
00665
00674 SubscanRow (SubscanTable &table);
00675
00693 SubscanRow (SubscanTable &table, SubscanRow &row);
00694
00696
00698
00699
00700
00701
00702
00703
00704 int scanNumber;
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715 int subscanNumber;
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726 ArrayTime startTime;
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737 ArrayTime endTime;
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748 string fieldName;
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759 SubscanIntentMod::SubscanIntent subscanIntent;
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769 bool subscanModeExists;
00770
00771
00772 SwitchingModeMod::SwitchingMode subscanMode;
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783 int numberIntegration;
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794 vector<int > numberSubintegration;
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805 bool flagRow;
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815 bool correlatorCalibrationExists;
00816
00817
00818 CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration;
00819
00820
00821
00822
00823
00825
00827
00828
00829
00830
00831
00832
00833 Tag execBlockId;
00834
00835
00836
00837
00838
00840
00842
00843
00844
00845
00846
00847
00848
00849
00850
00852
00854 map<string, SubscanAttributeFromBin> fromBinMethods;
00855 void execBlockIdFromBin( EndianISStream& eiss);
00856 void scanNumberFromBin( EndianISStream& eiss);
00857 void subscanNumberFromBin( EndianISStream& eiss);
00858 void startTimeFromBin( EndianISStream& eiss);
00859 void endTimeFromBin( EndianISStream& eiss);
00860 void fieldNameFromBin( EndianISStream& eiss);
00861 void subscanIntentFromBin( EndianISStream& eiss);
00862 void numberIntegrationFromBin( EndianISStream& eiss);
00863 void numberSubintegrationFromBin( EndianISStream& eiss);
00864 void flagRowFromBin( EndianISStream& eiss);
00865
00866 void subscanModeFromBin( EndianISStream& eiss);
00867 void correlatorCalibrationFromBin( EndianISStream& eiss);
00868
00869
00874 void toBin(EndianOSStream& eoss);
00875
00883 static SubscanRow* fromBin(EndianISStream& eiss, SubscanTable& table, const vector<string>& attributesSeq);
00884
00885 };
00886
00887 }
00888
00889 #endif