SubscanRow.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 SubscanRow_CLASS
00035 #define SubscanRow_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 <ArrayTime.h>
00052
00053
00054
00055 #include <Tag.h>
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 #include "CSubscanIntent.h"
00073
00074
00075
00076 #include "CSwitchingMode.h"
00077
00078
00079
00080
00081
00082
00083
00084 #include "CCorrelatorCalibration.h"
00085
00086
00087
00088
00089 #include <ConversionException.h>
00090 #include <NoSuchRow.h>
00091 #include <IllegalAccessException.h>
00092
00093 #include <RowTransformer.h>
00094
00095
00096
00097
00098
00099
00100 namespace asdm {
00101
00102
00103
00104
00105
00106 class ExecBlockRow;
00107
00108
00109 class SubscanRow;
00110 typedef void (SubscanRow::*SubscanAttributeFromBin) (EndianIStream& eis);
00111 typedef void (SubscanRow::*SubscanAttributeFromText) (const string& s);
00112
00119 class SubscanRow {
00120 friend class asdm::SubscanTable;
00121 friend class asdm::RowTransformer<SubscanRow>;
00122
00123
00124 public:
00125
00126 virtual ~SubscanRow();
00127
00131 SubscanTable &getTable() const;
00132
00137 bool isAdded() const;
00138
00140
00142
00143
00144
00145
00146
00147
00148
00149
00154 int getScanNumber() const;
00155
00156
00157
00158
00168 void setScanNumber (int scanNumber);
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00186 int getSubscanNumber() const;
00187
00188
00189
00190
00200 void setSubscanNumber (int subscanNumber);
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00218 ArrayTime getStartTime() const;
00219
00220
00221
00222
00230 void setStartTime (ArrayTime startTime);
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00248 ArrayTime getEndTime() const;
00249
00250
00251
00252
00260 void setEndTime (ArrayTime endTime);
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00278 string getFieldName() const;
00279
00280
00281
00282
00290 void setFieldName (string fieldName);
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00308 SubscanIntentMod::SubscanIntent getSubscanIntent() const;
00309
00310
00311
00312
00320 void setSubscanIntent (SubscanIntentMod::SubscanIntent subscanIntent);
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00336 bool isSubscanModeExists() const;
00337
00338
00339
00345 SwitchingModeMod::SwitchingMode getSubscanMode() const;
00346
00347
00348
00349
00356 void setSubscanMode (SwitchingModeMod::SwitchingMode subscanMode);
00357
00358
00359
00360
00364 void clearSubscanMode ();
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00379 int getNumIntegration() const;
00380
00381
00382
00383
00391 void setNumIntegration (int numIntegration);
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00409 vector<int > getNumSubintegration() const;
00410
00411
00412
00413
00421 void setNumSubintegration (vector<int > numSubintegration);
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00437 bool isCorrelatorCalibrationExists() const;
00438
00439
00440
00446 CorrelatorCalibrationMod::CorrelatorCalibration getCorrelatorCalibration() const;
00447
00448
00449
00450
00457 void setCorrelatorCalibration (CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration);
00458
00459
00460
00461
00465 void clearCorrelatorCalibration ();
00466
00467
00468
00470
00472
00473
00474
00475
00476
00477
00478
00479
00484 Tag getExecBlockId() const;
00485
00486
00487
00488
00498 void setExecBlockId (Tag execBlockId);
00499
00500
00501
00502
00503
00504
00506
00508
00509
00510
00511
00512
00519 ExecBlockRow* getExecBlockUsingExecBlockId();
00520
00521
00522
00523
00524
00525
00526
00550 bool compareNoAutoInc(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, vector<int > numSubintegration);
00551
00552
00553
00554
00572 bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, vector<int > numSubintegration);
00573
00574
00583 bool equalByRequiredValue(SubscanRow* x) ;
00584
00585 #ifndef WITHOUT_ACS
00586
00590 asdmIDL::SubscanRowIDL *toIDL() const;
00591
00599 void toIDL(asdmIDL::SubscanRowIDL& x) const;
00600 #endif
00601
00602 #ifndef WITHOUT_ACS
00603
00608 void setFromIDL (asdmIDL::SubscanRowIDL x) ;
00609 #endif
00610
00615 std::string toXML() const;
00616
00623 void setFromXML (std::string rowDoc) ;
00624
00627
00629
00630 std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
00631 void execBlockIdFromBin( EndianIStream& eis);
00632 void scanNumberFromBin( EndianIStream& eis);
00633 void subscanNumberFromBin( EndianIStream& eis);
00634 void startTimeFromBin( EndianIStream& eis);
00635 void endTimeFromBin( EndianIStream& eis);
00636 void fieldNameFromBin( EndianIStream& eis);
00637 void subscanIntentFromBin( EndianIStream& eis);
00638 void numIntegrationFromBin( EndianIStream& eis);
00639 void numSubintegrationFromBin( EndianIStream& eis);
00640
00641 void subscanModeFromBin( EndianIStream& eis);
00642 void correlatorCalibrationFromBin( EndianIStream& eis);
00643
00644
00652 static SubscanRow* fromBin(EndianIStream& eis, SubscanTable& table, const std::vector<std::string>& attributesSeq);
00653
00660 void fromText(const std::string& attributeName, const std::string& t);
00662
00663 private:
00667 SubscanTable &table;
00671 bool hasBeenAdded;
00672
00673
00674 void isAdded(bool added);
00675
00676
00685 SubscanRow (SubscanTable &table);
00686
00704 SubscanRow (SubscanTable &table, SubscanRow &row);
00705
00707
00709
00710
00711
00712
00713
00714
00715 int scanNumber;
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726 int subscanNumber;
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737 ArrayTime startTime;
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748 ArrayTime endTime;
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759 string fieldName;
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770 SubscanIntentMod::SubscanIntent subscanIntent;
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780 bool subscanModeExists;
00781
00782
00783 SwitchingModeMod::SwitchingMode subscanMode;
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794 int numIntegration;
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805 vector<int > numSubintegration;
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
00851
00853
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00872
00874 std::map<std::string, SubscanAttributeFromText> fromTextMethods;
00875
00876 void execBlockIdFromText (const string & s);
00877
00878
00879 void scanNumberFromText (const string & s);
00880
00881
00882 void subscanNumberFromText (const string & s);
00883
00884
00885 void startTimeFromText (const string & s);
00886
00887
00888 void endTimeFromText (const string & s);
00889
00890
00891 void fieldNameFromText (const string & s);
00892
00893
00894 void subscanIntentFromText (const string & s);
00895
00896
00897 void numIntegrationFromText (const string & s);
00898
00899
00900 void numSubintegrationFromText (const string & s);
00901
00902
00903
00904 void subscanModeFromText (const string & s);
00905
00906
00907 void correlatorCalibrationFromText (const string & s);
00908
00909
00910
00915 void toBin(EndianOSStream& eoss);
00916
00926 };
00927
00928 }
00929
00930 #endif