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 using std::vector;
00041 using std::string;
00042 using std::set;
00043
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::PolarizationRowIDL;
00047 #endif
00048
00049
00050
00051
00052
00053
00054 #include <Tag.h>
00055 using asdm::Tag;
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #include "CStokesParameter.h"
00066 using namespace StokesParameterMod;
00067
00068
00069
00070 #include "CPolarizationType.h"
00071 using namespace PolarizationTypeMod;
00072
00073
00074
00075
00076
00077
00078 #include <ConversionException.h>
00079 #include <NoSuchRow.h>
00080 #include <IllegalAccessException.h>
00081
00082
00083
00084
00085
00086
00087 namespace asdm {
00088
00089
00090
00091
00092
00093 class PolarizationRow;
00094 typedef void (PolarizationRow::*PolarizationAttributeFromBin) (EndianISStream& eiss);
00095
00102 class PolarizationRow {
00103 friend class asdm::PolarizationTable;
00104
00105 public:
00106
00107 virtual ~PolarizationRow();
00108
00112 PolarizationTable &getTable() const;
00113
00118 bool isAdded() const;
00119
00121
00123
00124
00125
00126
00127
00128
00129
00130
00135 Tag getPolarizationId() const;
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00155 int getNumCorr() const;
00156
00157
00158
00159
00167 void setNumCorr (int numCorr);
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00185 vector<StokesParameterMod::StokesParameter > getCorrType() const;
00186
00187
00188
00189
00197 void setCorrType (vector<StokesParameterMod::StokesParameter > corrType);
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00215 vector<vector<PolarizationTypeMod::PolarizationType > > getCorrProduct() const;
00216
00217
00218
00219
00227 void setCorrProduct (vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00243 bool isFlagRowExists() const;
00244
00245
00246
00252 bool getFlagRow() const;
00253
00254
00255
00256
00263 void setFlagRow (bool flagRow);
00264
00265
00266
00267
00271 void clearFlagRow ();
00272
00273
00274
00276
00278
00280
00282
00283
00284
00285
00297 bool compareNoAutoInc(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00298
00299
00300
00301
00313 bool compareRequiredValue(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00314
00315
00324 bool equalByRequiredValue(PolarizationRow* x) ;
00325
00326 #ifndef WITHOUT_ACS
00327
00331 PolarizationRowIDL *toIDL() const;
00332 #endif
00333
00334 #ifndef WITHOUT_ACS
00335
00340 void setFromIDL (PolarizationRowIDL x) ;
00341 #endif
00342
00347 string toXML() const;
00348
00355 void setFromXML (string rowDoc) ;
00356
00357 private:
00361 PolarizationTable &table;
00365 bool hasBeenAdded;
00366
00367
00368 void isAdded(bool added);
00369
00370
00379 PolarizationRow (PolarizationTable &table);
00380
00398 PolarizationRow (PolarizationTable &table, PolarizationRow &row);
00399
00401
00403
00404
00405
00406
00407
00408
00409 Tag polarizationId;
00410
00411
00412
00413
00423 void setPolarizationId (Tag polarizationId);
00424
00425
00426
00427
00428
00429
00430
00431
00432 int numCorr;
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443 vector<StokesParameterMod::StokesParameter > corrType;
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454 vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct;
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464 bool flagRowExists;
00465
00466
00467 bool flagRow;
00468
00469
00470
00471
00472
00474
00476
00478
00480
00481
00483
00485 map<string, PolarizationAttributeFromBin> fromBinMethods;
00486 void polarizationIdFromBin( EndianISStream& eiss);
00487 void numCorrFromBin( EndianISStream& eiss);
00488 void corrTypeFromBin( EndianISStream& eiss);
00489 void corrProductFromBin( EndianISStream& eiss);
00490
00491 void flagRowFromBin( EndianISStream& eiss);
00492
00493
00498 void toBin(EndianOSStream& eoss);
00499
00507 static PolarizationRow* fromBin(EndianISStream& eiss, PolarizationTable& table, const vector<string>& attributesSeq);
00508
00509 };
00510
00511 }
00512
00513 #endif