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 SubscanTable_CLASS
00035 #define SubscanTable_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 "CSubscanIntent.h"
00068 using namespace SubscanIntentMod;
00069
00070
00071
00072 #include "CSwitchingMode.h"
00073 using namespace SwitchingModeMod;
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 #include "CCorrelatorCalibration.h"
00084 using namespace CorrelatorCalibrationMod;
00085
00086
00087
00088
00089 #include <ConversionException.h>
00090 #include <DuplicateKey.h>
00091 #include <UniquenessViolationException.h>
00092 #include <NoSuchRow.h>
00093 #include <DuplicateKey.h>
00094 using asdm::DuplicateKey;
00095 using asdm::ConversionException;
00096 using asdm::NoSuchRow;
00097 using asdm::DuplicateKey;
00098
00099 #ifndef WITHOUT_ACS
00100 #include <asdmIDLC.h>
00101 using asdmIDL::SubscanTableIDL;
00102 #endif
00103
00104 #include <Representable.h>
00105
00106 namespace asdm {
00107
00108
00109
00110
00111 class ASDM;
00112 class SubscanRow;
00230 class SubscanTable : public Representable {
00231 friend class ASDM;
00232
00233 public:
00234
00235
00241 static vector<string> getKeyName();
00242
00243
00244 virtual ~SubscanTable();
00245
00251 ASDM &getContainer() const;
00252
00258 unsigned int size() ;
00259
00265 string getName() const;
00266
00272 static const vector<string>& getAttributesNames();
00273
00277 Entity getEntity() const;
00278
00283 void setEntity(Entity e);
00284
00292 string toXML() ;
00293
00294 #ifndef WITHOUT_ACS
00295
00301 SubscanTableIDL *toIDL() ;
00302 #endif
00303
00304 #ifndef WITHOUT_ACS
00305
00311 void fromIDL(SubscanTableIDL x) ;
00312 #endif
00313
00314
00315
00316
00317
00322 SubscanRow *newRow();
00323
00324
00350 SubscanRow *newRow(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numberIntegration, vector<int > numberSubintegration, bool flagRow);
00351
00352
00353
00366 SubscanRow *newRow(SubscanRow *row);
00367
00368
00369
00370
00371
00372
00385 SubscanRow* add(SubscanRow* x) ;
00386
00387
00388
00389
00390
00391
00392
00393
00394
00400 vector<SubscanRow *> get() ;
00401
00402
00403
00404
00405
00419 SubscanRow* getRowByKey(Tag execBlockId, int scanNumber, int subscanNumber);
00420
00421
00422
00423
00424
00452 SubscanRow* lookup(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numberIntegration, vector<int > numberSubintegration, bool flagRow);
00453
00454
00455 private:
00456
00465 SubscanTable (ASDM & container);
00466
00467 ASDM & container;
00468
00469 bool archiveAsBin;
00470 bool fileAsBin ;
00471
00472 Entity entity;
00473
00474
00475
00479 static string tableName;
00480
00484 static const vector<string> attributesNames;
00485
00489 static vector<string> initAttributesNames();
00490
00491
00495 static vector<string> key;
00496
00497
00505 SubscanRow* checkAndAdd(SubscanRow* x) ;
00506
00507
00508
00509
00510
00511
00512 vector<SubscanRow * > privateRows;
00513
00514
00515
00516 vector<SubscanRow *> row;
00517
00518
00519 void error() ;
00520
00521
00528 void fromXML(string xmlDoc) ;
00529
00534 void setFromMIMEFile(const string& directory);
00535 void setFromXMLFile(const string& directory);
00536
00544 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00545
00546
00553 void setFromMIME(const string & mimeMsg);
00554
00558 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00559
00569 void toFile(string directory);
00570
00579 void setFromFile(const string& directory);
00580
00581 };
00582
00583 }
00584
00585 #endif