FreqOffsetRow.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 FreqOffsetRow_CLASS
00035 #define FreqOffsetRow_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 <Tag.h>
00052
00053
00054
00055 #include <Frequency.h>
00056
00057
00058
00059 #include <ArrayTimeInterval.h>
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 #include <ConversionException.h>
00072 #include <NoSuchRow.h>
00073 #include <IllegalAccessException.h>
00074
00075 #include <RowTransformer.h>
00076
00077
00078
00079
00080
00081
00082 namespace asdm {
00083
00084
00085
00086
00087
00088 class AntennaRow;
00089
00090
00091 class SpectralWindowRow;
00092
00093
00094 class FeedRow;
00095
00096
00097 class FreqOffsetRow;
00098 typedef void (FreqOffsetRow::*FreqOffsetAttributeFromBin) (EndianIStream& eis);
00099 typedef void (FreqOffsetRow::*FreqOffsetAttributeFromText) (const string& s);
00100
00107 class FreqOffsetRow {
00108 friend class asdm::FreqOffsetTable;
00109 friend class asdm::RowTransformer<FreqOffsetRow>;
00110
00111
00112 public:
00113
00114 virtual ~FreqOffsetRow();
00115
00119 FreqOffsetTable &getTable() const;
00120
00125 bool isAdded() const;
00126
00128
00130
00131
00132
00133
00134
00135
00136
00137
00142 ArrayTimeInterval getTimeInterval() const;
00143
00144
00145
00146
00156 void setTimeInterval (ArrayTimeInterval timeInterval);
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00174 Frequency getOffset() const;
00175
00176
00177
00178
00186 void setOffset (Frequency offset);
00187
00188
00189
00190
00191
00192
00194
00196
00197
00198
00199
00200
00201
00202
00203
00208 Tag getAntennaId() const;
00209
00210
00211
00212
00222 void setAntennaId (Tag antennaId);
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00240 int getFeedId() const;
00241
00242
00243
00244
00254 void setFeedId (int feedId);
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00272 Tag getSpectralWindowId() const;
00273
00274
00275
00276
00286 void setSpectralWindowId (Tag spectralWindowId);
00287
00288
00289
00290
00291
00292
00294
00296
00297
00298
00299
00300
00307 AntennaRow* getAntennaUsingAntennaId();
00308
00309
00310
00311
00312
00313
00314
00315
00322 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00338 vector <FeedRow *> getFeeds();
00339
00340
00341
00342
00343
00344
00345
00346
00362 bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, Frequency offset);
00363
00364
00365
00366
00374 bool compareRequiredValue(Frequency offset);
00375
00376
00385 bool equalByRequiredValue(FreqOffsetRow* x) ;
00386
00387 #ifndef WITHOUT_ACS
00388
00392 asdmIDL::FreqOffsetRowIDL *toIDL() const;
00393
00401 void toIDL(asdmIDL::FreqOffsetRowIDL& x) const;
00402 #endif
00403
00404 #ifndef WITHOUT_ACS
00405
00410 void setFromIDL (asdmIDL::FreqOffsetRowIDL x) ;
00411 #endif
00412
00417 std::string toXML() const;
00418
00425 void setFromXML (std::string rowDoc) ;
00426
00429
00431
00432 std::map<std::string, FreqOffsetAttributeFromBin> fromBinMethods;
00433 void antennaIdFromBin( EndianIStream& eis);
00434 void spectralWindowIdFromBin( EndianIStream& eis);
00435 void timeIntervalFromBin( EndianIStream& eis);
00436 void feedIdFromBin( EndianIStream& eis);
00437 void offsetFromBin( EndianIStream& eis);
00438
00439
00440
00448 static FreqOffsetRow* fromBin(EndianIStream& eis, FreqOffsetTable& table, const std::vector<std::string>& attributesSeq);
00449
00456 void fromText(const std::string& attributeName, const std::string& t);
00458
00459 private:
00463 FreqOffsetTable &table;
00467 bool hasBeenAdded;
00468
00469
00470 void isAdded(bool added);
00471
00472
00481 FreqOffsetRow (FreqOffsetTable &table);
00482
00500 FreqOffsetRow (FreqOffsetTable &table, FreqOffsetRow &row);
00501
00503
00505
00506
00507
00508
00509
00510
00511 ArrayTimeInterval timeInterval;
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522 Frequency offset;
00523
00524
00525
00526
00527
00529
00531
00532
00533
00534
00535
00536
00537 Tag antennaId;
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548 int feedId;
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559 Tag spectralWindowId;
00560
00561
00562
00563
00564
00566
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00592
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00605
00607 std::map<std::string, FreqOffsetAttributeFromText> fromTextMethods;
00608
00609 void antennaIdFromText (const string & s);
00610
00611
00612 void spectralWindowIdFromText (const string & s);
00613
00614
00615 void timeIntervalFromText (const string & s);
00616
00617
00618 void feedIdFromText (const string & s);
00619
00620
00621 void offsetFromText (const string & s);
00622
00623
00624
00625
00630 void toBin(EndianOSStream& eoss);
00631
00641 };
00642
00643 }
00644
00645 #endif