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 ScanTable_CLASS
00035 #define ScanTable_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 <Tag.h>
00051 using asdm::Tag;
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #include "CScanIntent.h"
00068 using namespace ScanIntentMod;
00069
00070
00071
00072 #include "CCalDataOrigin.h"
00073 using namespace CalDataOriginMod;
00074
00075
00076
00077
00078
00079 #include "CCalibrationFunction.h"
00080 using namespace CalibrationFunctionMod;
00081
00082
00083
00084 #include "CCalibrationSet.h"
00085 using namespace CalibrationSetMod;
00086
00087
00088
00089 #include "CAntennaMotionPattern.h"
00090 using namespace AntennaMotionPatternMod;
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 #include <ConversionException.h>
00104 #include <DuplicateKey.h>
00105 #include <UniquenessViolationException.h>
00106 #include <NoSuchRow.h>
00107 #include <DuplicateKey.h>
00108 using asdm::DuplicateKey;
00109 using asdm::ConversionException;
00110 using asdm::NoSuchRow;
00111 using asdm::DuplicateKey;
00112
00113 #ifndef WITHOUT_ACS
00114 #include <asdmIDLC.h>
00115 using asdmIDL::ScanTableIDL;
00116 #endif
00117
00118 #include <Representable.h>
00119
00120 namespace asdm {
00121
00122
00123
00124
00125 class ASDM;
00126 class ScanRow;
00270 class ScanTable : public Representable {
00271 friend class ASDM;
00272
00273 public:
00274
00275
00281 static vector<string> getKeyName();
00282
00283
00284 virtual ~ScanTable();
00285
00291 ASDM &getContainer() const;
00292
00298 unsigned int size() ;
00299
00305 string getName() const;
00306
00312 static const vector<string>& getAttributesNames();
00313
00317 Entity getEntity() const;
00318
00323 void setEntity(Entity e);
00324
00332 string toXML() ;
00333
00334 #ifndef WITHOUT_ACS
00335
00341 ScanTableIDL *toIDL() ;
00342 #endif
00343
00344 #ifndef WITHOUT_ACS
00345
00351 void fromIDL(ScanTableIDL x) ;
00352 #endif
00353
00354
00355
00356
00357
00362 ScanRow *newRow();
00363
00364
00390 ScanRow *newRow(Tag execBlockId, int scanNumber, ArrayTime startTime, ArrayTime endTime, int numIntent, int numSubScan, vector<ScanIntentMod::ScanIntent > scanIntent, vector<CalDataOriginMod::CalDataOrigin > calDataType, vector<bool > calibrationOnLine, bool flagRow);
00391
00392
00393
00406 ScanRow *newRow(ScanRow *row);
00407
00408
00409
00410
00411
00412
00425 ScanRow* add(ScanRow* x) ;
00426
00427
00428
00429
00430
00431
00432
00433
00434
00440 vector<ScanRow *> get() ;
00441
00442
00443
00444
00445
00457 ScanRow* getRowByKey(Tag execBlockId, int scanNumber);
00458
00459
00460
00461
00462
00490 ScanRow* lookup(Tag execBlockId, int scanNumber, ArrayTime startTime, ArrayTime endTime, int numIntent, int numSubScan, vector<ScanIntentMod::ScanIntent > scanIntent, vector<CalDataOriginMod::CalDataOrigin > calDataType, vector<bool > calibrationOnLine, bool flagRow);
00491
00492
00493 private:
00494
00503 ScanTable (ASDM & container);
00504
00505 ASDM & container;
00506
00507 bool archiveAsBin;
00508 bool fileAsBin ;
00509
00510 Entity entity;
00511
00512
00513
00517 static string tableName;
00518
00522 static const vector<string> attributesNames;
00523
00527 static vector<string> initAttributesNames();
00528
00529
00533 static vector<string> key;
00534
00535
00543 ScanRow* checkAndAdd(ScanRow* x) ;
00544
00545
00546
00547
00548
00549
00550 vector<ScanRow * > privateRows;
00551
00552
00553
00554 vector<ScanRow *> row;
00555
00556
00557 void error() ;
00558
00559
00566 void fromXML(string xmlDoc) ;
00567
00572 void setFromMIMEFile(const string& directory);
00573 void setFromXMLFile(const string& directory);
00574
00582 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00583
00584
00591 void setFromMIME(const string & mimeMsg);
00592
00596 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00597
00607 void toFile(string directory);
00608
00617 void setFromFile(const string& directory);
00618
00619 };
00620
00621 }
00622
00623 #endif