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 SysCalTable_CLASS
00035 #define SysCalTable_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 <Temperature.h>
00051 using asdm::Temperature;
00052
00053 #include <ArrayTimeInterval.h>
00054 using asdm::ArrayTimeInterval;
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 #include <ConversionException.h>
00096 #include <DuplicateKey.h>
00097 #include <UniquenessViolationException.h>
00098 #include <NoSuchRow.h>
00099 #include <DuplicateKey.h>
00100 using asdm::DuplicateKey;
00101 using asdm::ConversionException;
00102 using asdm::NoSuchRow;
00103 using asdm::DuplicateKey;
00104
00105 #ifndef WITHOUT_ACS
00106 #include <asdmIDLC.h>
00107 using asdmIDL::SysCalTableIDL;
00108 #endif
00109
00110 #include <Representable.h>
00111
00112 namespace asdm {
00113
00114
00115
00116
00117 class ASDM;
00118 class SysCalRow;
00294 class SysCalTable : public Representable {
00295 friend class ASDM;
00296
00297 public:
00298
00299
00305 static vector<string> getKeyName();
00306
00307
00308 virtual ~SysCalTable();
00309
00315 ASDM &getContainer() const;
00316
00322 unsigned int size() ;
00323
00329 string getName() const;
00330
00336 static const vector<string>& getAttributesNames();
00337
00341 Entity getEntity() const;
00342
00347 void setEntity(Entity e);
00348
00356 string toXML() ;
00357
00358 #ifndef WITHOUT_ACS
00359
00365 SysCalTableIDL *toIDL() ;
00366 #endif
00367
00368 #ifndef WITHOUT_ACS
00369
00375 void fromIDL(SysCalTableIDL x) ;
00376 #endif
00377
00378
00379
00380
00381
00386 SysCalRow *newRow();
00387
00388
00406 SysCalRow *newRow(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numReceptor, int numChan);
00407
00408
00409
00422 SysCalRow *newRow(SysCalRow *row);
00423
00424
00425
00426
00427
00428
00445 SysCalRow* add(SysCalRow* x) ;
00446
00447
00448
00449
00450
00451
00452
00453
00454
00460 vector<SysCalRow *> get() ;
00461
00462
00470 vector <SysCalRow*> *getByContext(Tag antennaId, Tag spectralWindowId, int feedId);
00471
00472
00473
00474
00475
00491 SysCalRow* getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId);
00492
00493
00494
00495
00496
00516 SysCalRow* lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numReceptor, int numChan);
00517
00518
00519 private:
00520
00529 SysCalTable (ASDM & container);
00530
00531 ASDM & container;
00532
00533 bool archiveAsBin;
00534 bool fileAsBin ;
00535
00536 Entity entity;
00537
00538
00539
00543 static string tableName;
00544
00548 static const vector<string> attributesNames;
00549
00553 static vector<string> initAttributesNames();
00554
00555
00559 static vector<string> key;
00560
00561
00569 SysCalRow* checkAndAdd(SysCalRow* x) ;
00570
00571
00572
00573
00581 SysCalRow * insertByStartTime(SysCalRow* x, vector<SysCalRow* >& row);
00582
00583
00584
00585
00586
00587
00588 vector<SysCalRow * > privateRows;
00589
00590
00591
00592
00593
00594
00595
00596
00597 typedef vector <SysCalRow* > TIME_ROWS;
00598 map<string, TIME_ROWS > context;
00599
00604 string Key(Tag antennaId, Tag spectralWindowId, int feedId) ;
00605
00606
00607
00608
00614 void getByKeyNoAutoIncNoTime(vector <SysCalRow*>& vin, vector <SysCalRow*>& vout, Tag antennaId, Tag spectralWindowId, int feedId);
00615
00616
00617
00618 void error() ;
00619
00620
00627 void fromXML(string xmlDoc) ;
00628
00633 void setFromMIMEFile(const string& directory);
00634 void setFromXMLFile(const string& directory);
00635
00643 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00644
00645
00652 void setFromMIME(const string & mimeMsg);
00653
00657 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00658
00668 void toFile(string directory);
00669
00678 void setFromFile(const string& directory);
00679
00680 };
00681
00682 }
00683
00684 #endif