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 TotalPowerTable_CLASS
00035 #define TotalPowerTable_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 <ArrayTime.h>
00048 using asdm::ArrayTime;
00049
00050 #include <Interval.h>
00051 using asdm::Interval;
00052
00053 #include <Tag.h>
00054 using asdm::Tag;
00055
00056 #include <Length.h>
00057 using asdm::Length;
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 #include <ConversionException.h>
00091 #include <DuplicateKey.h>
00092 #include <UniquenessViolationException.h>
00093 #include <NoSuchRow.h>
00094 #include <DuplicateKey.h>
00095 using asdm::DuplicateKey;
00096 using asdm::ConversionException;
00097 using asdm::NoSuchRow;
00098 using asdm::DuplicateKey;
00099
00100 #ifndef WITHOUT_ACS
00101 #include <asdmIDLC.h>
00102 using asdmIDL::TotalPowerTableIDL;
00103 #endif
00104
00105 #include <Representable.h>
00106
00107 namespace asdm {
00108
00109
00110
00111
00112 class ASDM;
00113 class TotalPowerRow;
00266 class TotalPowerTable : public Representable {
00267 friend class ASDM;
00268
00269 public:
00270
00271
00277 static vector<string> getKeyName();
00278
00279
00280 virtual ~TotalPowerTable();
00281
00287 ASDM &getContainer() const;
00288
00294 unsigned int size() ;
00295
00301 string getName() const;
00302
00308 static const vector<string>& getAttributesNames();
00309
00313 Entity getEntity() const;
00314
00319 void setEntity(Entity e);
00320
00328 string toXML() ;
00329
00330 #ifndef WITHOUT_ACS
00331
00337 TotalPowerTableIDL *toIDL() ;
00338 #endif
00339
00340 #ifndef WITHOUT_ACS
00341
00347 void fromIDL(TotalPowerTableIDL x) ;
00348 #endif
00349
00350
00351
00352
00353
00358 TotalPowerRow *newRow();
00359
00360
00398 TotalPowerRow *newRow(ArrayTime time, Tag configDescriptionId, Tag fieldId, int scanNumber, int subscanNumber, int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol, bool flagRow, Interval interval, vector<Tag> stateId, Tag execBlockId);
00399
00400
00401
00414 TotalPowerRow *newRow(TotalPowerRow *row);
00415
00416
00417
00418
00419
00420
00437 TotalPowerRow* add(TotalPowerRow* x) ;
00438
00439
00440
00441
00442
00443
00444
00445
00446
00452 vector<TotalPowerRow *> get() ;
00453
00454
00462 vector <TotalPowerRow*> *getByContext(Tag configDescriptionId, Tag fieldId);
00463
00464
00465
00466
00467
00481 TotalPowerRow* getRowByKey(ArrayTime time, Tag configDescriptionId, Tag fieldId);
00482
00483
00484
00485
00486
00526 TotalPowerRow* lookup(ArrayTime time, Tag configDescriptionId, Tag fieldId, int scanNumber, int subscanNumber, int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol, bool flagRow, Interval interval, vector<Tag> stateId, Tag execBlockId);
00527
00528
00529 private:
00530
00539 TotalPowerTable (ASDM & container);
00540
00541 ASDM & container;
00542
00543 bool archiveAsBin;
00544 bool fileAsBin ;
00545
00546 Entity entity;
00547
00548
00549
00553 static string tableName;
00554
00558 static const vector<string> attributesNames;
00559
00563 static vector<string> initAttributesNames();
00564
00565
00569 static vector<string> key;
00570
00571
00579 TotalPowerRow* checkAndAdd(TotalPowerRow* x) ;
00580
00581
00582
00583
00591 TotalPowerRow * insertByTime(TotalPowerRow* x, vector<TotalPowerRow *>&row );
00592
00593
00594
00595
00596
00597
00598 vector<TotalPowerRow * > privateRows;
00599
00600
00601
00602
00603
00604
00605
00606
00607 typedef vector <TotalPowerRow* > TIME_ROWS;
00608 map<string, TIME_ROWS > context;
00609
00614 string Key(Tag configDescriptionId, Tag fieldId) ;
00615
00616
00617
00618
00624 void getByKeyNoAutoIncNoTime(vector <TotalPowerRow*>& vin, vector <TotalPowerRow*>& vout, Tag configDescriptionId, Tag fieldId);
00625
00626
00627
00628 void error() ;
00629
00630
00637 void fromXML(string xmlDoc) ;
00638
00643 void setFromMIMEFile(const string& directory);
00644 void setFromXMLFile(const string& directory);
00645
00653 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00654
00655
00662 void setFromMIME(const string & mimeMsg);
00663
00667 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00668
00678 void toFile(string directory);
00679
00688 void setFromFile(const string& directory);
00689
00690 };
00691
00692 }
00693
00694 #endif