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 PolarizationTable_CLASS
00035 #define PolarizationTable_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 <Tag.h>
00048 using asdm::Tag;
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 #include "CStokesParameter.h"
00059 using namespace StokesParameterMod;
00060
00061
00062
00063 #include "CPolarizationType.h"
00064 using namespace PolarizationTypeMod;
00065
00066
00067
00068
00069
00070
00071 #include <ConversionException.h>
00072 #include <DuplicateKey.h>
00073 #include <UniquenessViolationException.h>
00074 #include <NoSuchRow.h>
00075 #include <DuplicateKey.h>
00076 using asdm::DuplicateKey;
00077 using asdm::ConversionException;
00078 using asdm::NoSuchRow;
00079 using asdm::DuplicateKey;
00080
00081 #ifndef WITHOUT_ACS
00082 #include <asdmIDLC.h>
00083 using asdmIDL::PolarizationTableIDL;
00084 #endif
00085
00086 #include <Representable.h>
00087
00088 namespace asdm {
00089
00090
00091
00092
00093 class ASDM;
00094 class PolarizationRow;
00159 class PolarizationTable : public Representable {
00160 friend class ASDM;
00161
00162 public:
00163
00164
00170 static vector<string> getKeyName();
00171
00172
00173 virtual ~PolarizationTable();
00174
00180 ASDM &getContainer() const;
00181
00187 unsigned int size() ;
00188
00194 string getName() const;
00195
00201 static const vector<string>& getAttributesNames();
00202
00206 Entity getEntity() const;
00207
00212 void setEntity(Entity e);
00213
00221 string toXML() ;
00222
00223 #ifndef WITHOUT_ACS
00224
00230 PolarizationTableIDL *toIDL() ;
00231 #endif
00232
00233 #ifndef WITHOUT_ACS
00234
00240 void fromIDL(PolarizationTableIDL x) ;
00241 #endif
00242
00243
00244
00245
00246
00251 PolarizationRow *newRow();
00252
00253
00265 PolarizationRow *newRow(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00266
00267
00268
00281 PolarizationRow *newRow(PolarizationRow *row);
00282
00283
00284
00285
00286
00287
00288
00289
00299 PolarizationRow* add(PolarizationRow* x) ;
00300
00301
00302
00303
00304
00305
00306
00312 vector<PolarizationRow *> get() ;
00313
00314
00315
00316
00317
00327 PolarizationRow* getRowByKey(Tag polarizationId);
00328
00329
00330
00331
00332
00346 PolarizationRow* lookup(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00347
00348
00349 private:
00350
00359 PolarizationTable (ASDM & container);
00360
00361 ASDM & container;
00362
00363 bool archiveAsBin;
00364 bool fileAsBin ;
00365
00366 Entity entity;
00367
00368
00369
00370 map<string,int> noAutoIncIds;
00371 void autoIncrement(string key, PolarizationRow* x);
00372
00373
00377 static string tableName;
00378
00382 static const vector<string> attributesNames;
00383
00387 static vector<string> initAttributesNames();
00388
00389
00393 static vector<string> key;
00394
00395
00405 PolarizationRow* checkAndAdd(PolarizationRow* x) ;
00406
00407
00408
00409
00410
00411
00412 vector<PolarizationRow * > privateRows;
00413
00414
00415
00416 vector<PolarizationRow *> row;
00417
00418
00419 void error() ;
00420
00421
00428 void fromXML(string xmlDoc) ;
00429
00434 void setFromMIMEFile(const string& directory);
00435 void setFromXMLFile(const string& directory);
00436
00444 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00445
00446
00453 void setFromMIME(const string & mimeMsg);
00454
00458 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00459
00469 void toFile(string directory);
00470
00479 void setFromFile(const string& directory);
00480
00481 };
00482
00483 }
00484
00485 #endif