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 FreqOffsetTable_CLASS
00035 #define FreqOffsetTable_CLASS
00036
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <set>
00041 using std::string;
00042 using std::vector;
00043 using std::map;
00044
00045
00046
00047 #include <Tag.h>
00048 using asdm::Tag;
00049
00050 #include <Frequency.h>
00051 using asdm::Frequency;
00052
00053 #include <ArrayTimeInterval.h>
00054 using asdm::ArrayTimeInterval;
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #include <ConversionException.h>
00066 #include <DuplicateKey.h>
00067 #include <UniquenessViolationException.h>
00068 #include <NoSuchRow.h>
00069 #include <DuplicateKey.h>
00070 using asdm::DuplicateKey;
00071 using asdm::ConversionException;
00072 using asdm::NoSuchRow;
00073 using asdm::DuplicateKey;
00074
00075 #ifndef WITHOUT_ACS
00076 #include <asdmIDLC.h>
00077 using asdmIDL::FreqOffsetTableIDL;
00078 #endif
00079
00080 #include <Representable.h>
00081
00082 namespace asdm {
00083
00084
00085
00086
00087 class ASDM;
00088 class FreqOffsetRow;
00156 class FreqOffsetTable : public Representable {
00157 friend class ASDM;
00158
00159 public:
00160
00161
00167 static vector<string> getKeyName();
00168
00169
00170 virtual ~FreqOffsetTable();
00171
00177 ASDM &getContainer() const;
00178
00184 unsigned int size() ;
00185
00191 string getName() const;
00192
00198 static const vector<string>& getAttributesNames();
00199
00203 Entity getEntity() const;
00204
00209 void setEntity(Entity e);
00210
00218 string toXML() ;
00219
00220 #ifndef WITHOUT_ACS
00221
00227 FreqOffsetTableIDL *toIDL() ;
00228 #endif
00229
00230 #ifndef WITHOUT_ACS
00231
00237 void fromIDL(FreqOffsetTableIDL x) ;
00238 #endif
00239
00240
00241
00242
00243
00248 FreqOffsetRow *newRow();
00249
00250
00266 FreqOffsetRow *newRow(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, Frequency offset);
00267
00268
00269
00282 FreqOffsetRow *newRow(FreqOffsetRow *row);
00283
00284
00285
00286
00287
00288
00305 FreqOffsetRow* add(FreqOffsetRow* x) ;
00306
00307
00308
00309
00310
00311
00312
00313
00314
00320 vector<FreqOffsetRow *> get() ;
00321
00322
00330 vector <FreqOffsetRow*> *getByContext(Tag antennaId, Tag spectralWindowId, int feedId);
00331
00332
00333
00334
00335
00351 FreqOffsetRow* getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId);
00352
00353
00354
00355
00356
00374 FreqOffsetRow* lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, Frequency offset);
00375
00376
00377 private:
00378
00387 FreqOffsetTable (ASDM & container);
00388
00389 ASDM & container;
00390
00391 bool archiveAsBin;
00392 bool fileAsBin ;
00393
00394 Entity entity;
00395
00396
00397
00401 static string tableName;
00402
00406 static const vector<string> attributesNames;
00407
00411 static vector<string> initAttributesNames();
00412
00413
00417 static vector<string> key;
00418
00419
00427 FreqOffsetRow* checkAndAdd(FreqOffsetRow* x) ;
00428
00429
00430
00431
00439 FreqOffsetRow * insertByStartTime(FreqOffsetRow* x, vector<FreqOffsetRow* >& row);
00440
00441
00442
00443
00444
00445
00446 vector<FreqOffsetRow * > privateRows;
00447
00448
00449
00450
00451
00452
00453
00454
00455 typedef vector <FreqOffsetRow* > TIME_ROWS;
00456 map<string, TIME_ROWS > context;
00457
00462 string Key(Tag antennaId, Tag spectralWindowId, int feedId) ;
00463
00464
00465
00466
00472 void getByKeyNoAutoIncNoTime(vector <FreqOffsetRow*>& vin, vector <FreqOffsetRow*>& vout, Tag antennaId, Tag spectralWindowId, int feedId);
00473
00474
00475
00476 void error() ;
00477
00478
00485 void fromXML(string xmlDoc) ;
00486
00491 void setFromMIMEFile(const string& directory);
00492 void setFromXMLFile(const string& directory);
00493
00501 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00502
00503
00510 void setFromMIME(const string & mimeMsg);
00511
00515 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00516
00526 void toFile(string directory);
00527
00536 void setFromFile(const string& directory);
00537
00538 };
00539
00540 }
00541
00542 #endif