PolarizationRow.h
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 PolarizationRow_CLASS
00035 #define PolarizationRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044
00045
00046
00047
00048
00049
00050
00051 #include <Tag.h>
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 #include "CStokesParameter.h"
00063
00064
00065
00066 #include "CPolarizationType.h"
00067
00068
00069
00070
00071 #include <ConversionException.h>
00072 #include <NoSuchRow.h>
00073 #include <IllegalAccessException.h>
00074
00075 #include <RowTransformer.h>
00076
00077
00078
00079
00080
00081
00082 namespace asdm {
00083
00084
00085
00086
00087
00088 class PolarizationRow;
00089 typedef void (PolarizationRow::*PolarizationAttributeFromBin) (EndianIStream& eis);
00090 typedef void (PolarizationRow::*PolarizationAttributeFromText) (const string& s);
00091
00098 class PolarizationRow {
00099 friend class asdm::PolarizationTable;
00100 friend class asdm::RowTransformer<PolarizationRow>;
00101
00102
00103 public:
00104
00105 virtual ~PolarizationRow();
00106
00110 PolarizationTable &getTable() const;
00111
00116 bool isAdded() const;
00117
00119
00121
00122
00123
00124
00125
00126
00127
00128
00133 Tag getPolarizationId() const;
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00153 int getNumCorr() const;
00154
00155
00156
00157
00165 void setNumCorr (int numCorr);
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00183 vector<StokesParameterMod::StokesParameter > getCorrType() const;
00184
00185
00186
00187
00195 void setCorrType (vector<StokesParameterMod::StokesParameter > corrType);
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00213 vector<vector<PolarizationTypeMod::PolarizationType > > getCorrProduct() const;
00214
00215
00216
00217
00225 void setCorrProduct (vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00226
00227
00228
00229
00230
00231
00233
00235
00237
00239
00240
00241
00242
00254 bool compareNoAutoInc(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00255
00256
00257
00258
00270 bool compareRequiredValue(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00271
00272
00281 bool equalByRequiredValue(PolarizationRow* x) ;
00282
00283 #ifndef WITHOUT_ACS
00284
00288 asdmIDL::PolarizationRowIDL *toIDL() const;
00289
00297 void toIDL(asdmIDL::PolarizationRowIDL& x) const;
00298 #endif
00299
00300 #ifndef WITHOUT_ACS
00301
00306 void setFromIDL (asdmIDL::PolarizationRowIDL x) ;
00307 #endif
00308
00313 std::string toXML() const;
00314
00321 void setFromXML (std::string rowDoc) ;
00322
00325
00327
00328 std::map<std::string, PolarizationAttributeFromBin> fromBinMethods;
00329 void polarizationIdFromBin( EndianIStream& eis);
00330 void numCorrFromBin( EndianIStream& eis);
00331 void corrTypeFromBin( EndianIStream& eis);
00332 void corrProductFromBin( EndianIStream& eis);
00333
00334
00335
00343 static PolarizationRow* fromBin(EndianIStream& eis, PolarizationTable& table, const std::vector<std::string>& attributesSeq);
00344
00351 void fromText(const std::string& attributeName, const std::string& t);
00353
00354 private:
00358 PolarizationTable &table;
00362 bool hasBeenAdded;
00363
00364
00365 void isAdded(bool added);
00366
00367
00376 PolarizationRow (PolarizationTable &table);
00377
00395 PolarizationRow (PolarizationTable &table, PolarizationRow &row);
00396
00398
00400
00401
00402
00403
00404
00405
00406 Tag polarizationId;
00407
00408
00409
00410
00420 void setPolarizationId (Tag polarizationId);
00421
00422
00423
00424
00425
00426
00427
00428
00429 int numCorr;
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440 vector<StokesParameterMod::StokesParameter > corrType;
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451 vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct;
00452
00453
00454
00455
00456
00458
00460
00462
00464
00465
00466
00468
00470
00471
00472
00473
00474
00475
00476
00477
00478
00480
00482 std::map<std::string, PolarizationAttributeFromText> fromTextMethods;
00483
00484 void polarizationIdFromText (const string & s);
00485
00486
00487 void numCorrFromText (const string & s);
00488
00489
00490 void corrTypeFromText (const string & s);
00491
00492
00493 void corrProductFromText (const string & s);
00494
00495
00496
00497
00502 void toBin(EndianOSStream& eoss);
00503
00513 };
00514
00515 }
00516
00517 #endif