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 CalPositionTable_CLASS
00035 #define CalPositionTable_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 <Angle.h>
00051 using asdm::Angle;
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 #include "CAtmPhaseCorrection.h"
00066 using namespace AtmPhaseCorrectionMod;
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #include "CPositionMethod.h"
00081 using namespace PositionMethodMod;
00082
00083
00084
00085 #include "CReceiverBand.h"
00086 using namespace ReceiverBandMod;
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 #include <ConversionException.h>
00112 #include <DuplicateKey.h>
00113 #include <UniquenessViolationException.h>
00114 #include <NoSuchRow.h>
00115 #include <DuplicateKey.h>
00116 using asdm::DuplicateKey;
00117 using asdm::ConversionException;
00118 using asdm::NoSuchRow;
00119 using asdm::DuplicateKey;
00120
00121 #ifndef WITHOUT_ACS
00122 #include <asdmIDLC.h>
00123 using asdmIDL::CalPositionTableIDL;
00124 #endif
00125
00126 #include <Representable.h>
00127
00128 namespace asdm {
00129
00130
00131
00132
00133 class ASDM;
00134 class CalPositionRow;
00317 class CalPositionTable : public Representable {
00318 friend class ASDM;
00319
00320 public:
00321
00322
00328 static vector<string> getKeyName();
00329
00330
00331 virtual ~CalPositionTable();
00332
00338 ASDM &getContainer() const;
00339
00345 unsigned int size() ;
00346
00352 string getName() const;
00353
00359 static const vector<string>& getAttributesNames();
00360
00364 Entity getEntity() const;
00365
00370 void setEntity(Entity e);
00371
00379 string toXML() ;
00380
00381 #ifndef WITHOUT_ACS
00382
00388 CalPositionTableIDL *toIDL() ;
00389 #endif
00390
00391 #ifndef WITHOUT_ACS
00392
00398 void fromIDL(CalPositionTableIDL x) ;
00399 #endif
00400
00401
00402
00403
00404
00409 CalPositionRow *newRow();
00410
00411
00455 CalPositionRow *newRow(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Length > antennaPosition, string stationName, vector<Length > stationPosition, PositionMethodMod::PositionMethod positionMethod, ReceiverBandMod::ReceiverBand receiverBand, int numAntenna, vector<string > refAntennaNames, Length axesOffset, Length axesOffsetErr, bool axesOffsetFixed, vector<Length > positionOffset, vector<Length > positionErr, double reducedChiSquared);
00456
00457
00458
00471 CalPositionRow *newRow(CalPositionRow *row);
00472
00473
00474
00475
00476
00477
00490 CalPositionRow* add(CalPositionRow* x) ;
00491
00492
00493
00494
00495
00496
00497
00498
00499
00505 vector<CalPositionRow *> get() ;
00506
00507
00508
00509
00510
00526 CalPositionRow* getRowByKey(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId);
00527
00528
00529
00530
00531
00577 CalPositionRow* lookup(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Length > antennaPosition, string stationName, vector<Length > stationPosition, PositionMethodMod::PositionMethod positionMethod, ReceiverBandMod::ReceiverBand receiverBand, int numAntenna, vector<string > refAntennaNames, Length axesOffset, Length axesOffsetErr, bool axesOffsetFixed, vector<Length > positionOffset, vector<Length > positionErr, double reducedChiSquared);
00578
00579
00580 private:
00581
00590 CalPositionTable (ASDM & container);
00591
00592 ASDM & container;
00593
00594 bool archiveAsBin;
00595 bool fileAsBin ;
00596
00597 Entity entity;
00598
00599
00600
00604 static string tableName;
00605
00609 static const vector<string> attributesNames;
00610
00614 static vector<string> initAttributesNames();
00615
00616
00620 static vector<string> key;
00621
00622
00630 CalPositionRow* checkAndAdd(CalPositionRow* x) ;
00631
00632
00633
00634
00635
00636
00637 vector<CalPositionRow * > privateRows;
00638
00639
00640
00641 vector<CalPositionRow *> row;
00642
00643
00644 void error() ;
00645
00646
00653 void fromXML(string xmlDoc) ;
00654
00659 void setFromMIMEFile(const string& directory);
00660 void setFromXMLFile(const string& directory);
00661
00669 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00670
00671
00678 void setFromMIME(const string & mimeMsg);
00679
00683 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00684
00694 void toFile(string directory);
00695
00704 void setFromFile(const string& directory);
00705
00706 };
00707
00708 }
00709
00710 #endif