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 SeeingTable_CLASS
00035 #define SeeingTable_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 <Angle.h>
00048 using asdm::Angle;
00049
00050 #include <Length.h>
00051 using asdm::Length;
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 #include <ConversionException.h>
00074 #include <DuplicateKey.h>
00075 #include <UniquenessViolationException.h>
00076 #include <NoSuchRow.h>
00077 #include <DuplicateKey.h>
00078 using asdm::DuplicateKey;
00079 using asdm::ConversionException;
00080 using asdm::NoSuchRow;
00081 using asdm::DuplicateKey;
00082
00083 #ifndef WITHOUT_ACS
00084 #include <asdmIDLC.h>
00085 using asdmIDL::SeeingTableIDL;
00086 #endif
00087
00088 #include <Representable.h>
00089
00090 namespace asdm {
00091
00092
00093
00094
00095 class ASDM;
00096 class SeeingRow;
00165 class SeeingTable : public Representable {
00166 friend class ASDM;
00167
00168 public:
00169
00170
00176 static vector<string> getKeyName();
00177
00178
00179 virtual ~SeeingTable();
00180
00186 ASDM &getContainer() const;
00187
00193 unsigned int size() ;
00194
00200 string getName() const;
00201
00207 static const vector<string>& getAttributesNames();
00208
00212 Entity getEntity() const;
00213
00218 void setEntity(Entity e);
00219
00227 string toXML() ;
00228
00229 #ifndef WITHOUT_ACS
00230
00236 SeeingTableIDL *toIDL() ;
00237 #endif
00238
00239 #ifndef WITHOUT_ACS
00240
00246 void fromIDL(SeeingTableIDL x) ;
00247 #endif
00248
00249
00250
00251
00252
00257 SeeingRow *newRow();
00258
00259
00277 SeeingRow *newRow(ArrayTimeInterval timeInterval, int numBaseLength, vector<Length > baseLength, vector<Angle > phaseRms, float seeing, float exponent);
00278
00279
00280
00293 SeeingRow *newRow(SeeingRow *row);
00294
00295
00296
00297
00298
00299
00316 SeeingRow* add(SeeingRow* x) ;
00317
00318
00319
00320
00321
00322
00323
00324
00325
00331 vector<SeeingRow *> get() ;
00332
00333
00341 vector <SeeingRow*> *getByContext();
00342
00343
00344
00345
00346
00356 SeeingRow* getRowByKey(ArrayTimeInterval timeInterval);
00357
00358
00359
00360
00361
00381 SeeingRow* lookup(ArrayTimeInterval timeInterval, int numBaseLength, vector<Length > baseLength, vector<Angle > phaseRms, float seeing, float exponent);
00382
00383
00384 private:
00385
00394 SeeingTable (ASDM & container);
00395
00396 ASDM & container;
00397
00398 bool archiveAsBin;
00399 bool fileAsBin ;
00400
00401 Entity entity;
00402
00403
00404
00408 static string tableName;
00409
00413 static const vector<string> attributesNames;
00414
00418 static vector<string> initAttributesNames();
00419
00420
00424 static vector<string> key;
00425
00426
00434 SeeingRow* checkAndAdd(SeeingRow* x) ;
00435
00436
00437
00438
00446 SeeingRow * insertByStartTime(SeeingRow* x, vector<SeeingRow* >& row);
00447
00448
00449
00450
00451
00452
00453 vector<SeeingRow * > privateRows;
00454
00455
00456
00457
00458
00459
00460
00461
00462 vector <SeeingRow *> row;
00463
00464
00465
00466
00467
00468
00469 void error() ;
00470
00471
00478 void fromXML(string xmlDoc) ;
00479
00484 void setFromMIMEFile(const string& directory);
00485 void setFromXMLFile(const string& directory);
00486
00494 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00495
00496
00503 void setFromMIME(const string & mimeMsg);
00504
00508 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00509
00519 void toFile(string directory);
00520
00529 void setFromFile(const string& directory);
00530
00531 };
00532
00533 }
00534
00535 #endif