FocusRow.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 FocusRow_CLASS
00035 #define FocusRow_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 <Tag.h>
00056
00057
00058
00059 #include <Length.h>
00060
00061
00062
00063 #include <ArrayTimeInterval.h>
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 #include <ConversionException.h>
00084 #include <NoSuchRow.h>
00085 #include <IllegalAccessException.h>
00086
00087 #include <RowTransformer.h>
00088
00089
00090
00091
00092
00093
00094 namespace asdm {
00095
00096
00097
00098
00099
00100 class AntennaRow;
00101
00102
00103 class FocusModelRow;
00104
00105
00106 class FocusRow;
00107 typedef void (FocusRow::*FocusAttributeFromBin) (EndianIStream& eis);
00108 typedef void (FocusRow::*FocusAttributeFromText) (const string& s);
00109
00116 class FocusRow {
00117 friend class asdm::FocusTable;
00118 friend class asdm::RowTransformer<FocusRow>;
00119
00120
00121 public:
00122
00123 virtual ~FocusRow();
00124
00128 FocusTable &getTable() const;
00129
00134 bool isAdded() const;
00135
00137
00139
00140
00141
00142
00143
00144
00145
00146
00151 ArrayTimeInterval getTimeInterval() const;
00152
00153
00154
00155
00165 void setTimeInterval (ArrayTimeInterval timeInterval);
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00183 bool getFocusTracking() const;
00184
00185
00186
00187
00195 void setFocusTracking (bool focusTracking);
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00213 vector<Length > getFocusOffset() const;
00214
00215
00216
00217
00225 void setFocusOffset (vector<Length > focusOffset);
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00243 vector<Angle > getFocusRotationOffset() const;
00244
00245
00246
00247
00255 void setFocusRotationOffset (vector<Angle > focusRotationOffset);
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00271 bool isMeasuredFocusPositionExists() const;
00272
00273
00274
00280 vector<Length > getMeasuredFocusPosition() const;
00281
00282
00283
00284
00291 void setMeasuredFocusPosition (vector<Length > measuredFocusPosition);
00292
00293
00294
00295
00299 void clearMeasuredFocusPosition ();
00300
00301
00302
00303
00304
00305
00306
00307
00312 bool isMeasuredFocusRotationExists() const;
00313
00314
00315
00321 vector<Angle > getMeasuredFocusRotation() const;
00322
00323
00324
00325
00332 void setMeasuredFocusRotation (vector<Angle > measuredFocusRotation);
00333
00334
00335
00336
00340 void clearMeasuredFocusRotation ();
00341
00342
00343
00345
00347
00348
00349
00350
00351
00352
00353
00354
00359 Tag getAntennaId() const;
00360
00361
00362
00363
00373 void setAntennaId (Tag antennaId);
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00391 int getFocusModelId() const;
00392
00393
00394
00395
00403 void setFocusModelId (int focusModelId);
00404
00405
00406
00407
00408
00409
00411
00413
00414
00415
00416
00417
00424 AntennaRow* getAntennaUsingAntennaId();
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00440 vector <FocusModelRow *> getFocusModels();
00441
00442
00443
00444
00445
00446
00447
00448
00466 bool compareNoAutoInc(Tag antennaId, ArrayTimeInterval timeInterval, bool focusTracking, vector<Length > focusOffset, vector<Angle > focusRotationOffset, int focusModelId);
00467
00468
00469
00470
00484 bool compareRequiredValue(bool focusTracking, vector<Length > focusOffset, vector<Angle > focusRotationOffset, int focusModelId);
00485
00486
00495 bool equalByRequiredValue(FocusRow* x) ;
00496
00497 #ifndef WITHOUT_ACS
00498
00502 asdmIDL::FocusRowIDL *toIDL() const;
00503
00511 void toIDL(asdmIDL::FocusRowIDL& x) const;
00512 #endif
00513
00514 #ifndef WITHOUT_ACS
00515
00520 void setFromIDL (asdmIDL::FocusRowIDL x) ;
00521 #endif
00522
00527 std::string toXML() const;
00528
00535 void setFromXML (std::string rowDoc) ;
00536
00539
00541
00542 std::map<std::string, FocusAttributeFromBin> fromBinMethods;
00543 void antennaIdFromBin( EndianIStream& eis);
00544 void timeIntervalFromBin( EndianIStream& eis);
00545 void focusTrackingFromBin( EndianIStream& eis);
00546 void focusOffsetFromBin( EndianIStream& eis);
00547 void focusRotationOffsetFromBin( EndianIStream& eis);
00548 void focusModelIdFromBin( EndianIStream& eis);
00549
00550 void measuredFocusPositionFromBin( EndianIStream& eis);
00551 void measuredFocusRotationFromBin( EndianIStream& eis);
00552
00553
00561 static FocusRow* fromBin(EndianIStream& eis, FocusTable& table, const std::vector<std::string>& attributesSeq);
00562
00569 void fromText(const std::string& attributeName, const std::string& t);
00571
00572 private:
00576 FocusTable &table;
00580 bool hasBeenAdded;
00581
00582
00583 void isAdded(bool added);
00584
00585
00594 FocusRow (FocusTable &table);
00595
00613 FocusRow (FocusTable &table, FocusRow &row);
00614
00616
00618
00619
00620
00621
00622
00623
00624 ArrayTimeInterval timeInterval;
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635 bool focusTracking;
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646 vector<Length > focusOffset;
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657 vector<Angle > focusRotationOffset;
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667 bool measuredFocusPositionExists;
00668
00669
00670 vector<Length > measuredFocusPosition;
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680 bool measuredFocusRotationExists;
00681
00682
00683 vector<Angle > measuredFocusRotation;
00684
00685
00686
00687
00688
00690
00692
00693
00694
00695
00696
00697
00698 Tag antennaId;
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709 int focusModelId;
00710
00711
00712
00713
00714
00716
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00735
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00751
00753 std::map<std::string, FocusAttributeFromText> fromTextMethods;
00754
00755 void antennaIdFromText (const string & s);
00756
00757
00758 void timeIntervalFromText (const string & s);
00759
00760
00761 void focusTrackingFromText (const string & s);
00762
00763
00764 void focusOffsetFromText (const string & s);
00765
00766
00767 void focusRotationOffsetFromText (const string & s);
00768
00769
00770 void focusModelIdFromText (const string & s);
00771
00772
00773
00774 void measuredFocusPositionFromText (const string & s);
00775
00776
00777 void measuredFocusRotationFromText (const string & s);
00778
00779
00780
00785 void toBin(EndianOSStream& eoss);
00786
00796 };
00797
00798 }
00799
00800 #endif