HolographyRow.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 HolographyRow_CLASS
00035 #define HolographyRow_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 #include <Length.h>
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 #include "CHolographyChannelType.h"
00071
00072
00073
00074
00075 #include <ConversionException.h>
00076 #include <NoSuchRow.h>
00077 #include <IllegalAccessException.h>
00078
00079 #include <RowTransformer.h>
00080
00081
00082
00083
00084
00085
00086 namespace asdm {
00087
00088
00089
00090
00091
00092 class HolographyRow;
00093 typedef void (HolographyRow::*HolographyAttributeFromBin) (EndianIStream& eis);
00094 typedef void (HolographyRow::*HolographyAttributeFromText) (const string& s);
00095
00102 class HolographyRow {
00103 friend class asdm::HolographyTable;
00104 friend class asdm::RowTransformer<HolographyRow>;
00105
00106
00107 public:
00108
00109 virtual ~HolographyRow();
00110
00114 HolographyTable &getTable() const;
00115
00120 bool isAdded() const;
00121
00123
00125
00126
00127
00128
00129
00130
00131
00132
00137 Tag getHolographyId() const;
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00157 Length getDistance() const;
00158
00159
00160
00161
00169 void setDistance (Length distance);
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00187 Length getFocus() const;
00188
00189
00190
00191
00199 void setFocus (Length focus);
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00217 int getNumCorr() const;
00218
00219
00220
00221
00229 void setNumCorr (int numCorr);
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00247 vector<HolographyChannelTypeMod::HolographyChannelType > getType() const;
00248
00249
00250
00251
00259 void setType (vector<HolographyChannelTypeMod::HolographyChannelType > type);
00260
00261
00262
00263
00264
00265
00267
00269
00271
00273
00274
00275
00276
00290 bool compareNoAutoInc(Length distance, Length focus, int numCorr, vector<HolographyChannelTypeMod::HolographyChannelType > type);
00291
00292
00293
00294
00308 bool compareRequiredValue(Length distance, Length focus, int numCorr, vector<HolographyChannelTypeMod::HolographyChannelType > type);
00309
00310
00319 bool equalByRequiredValue(HolographyRow* x) ;
00320
00321 #ifndef WITHOUT_ACS
00322
00326 asdmIDL::HolographyRowIDL *toIDL() const;
00327
00335 void toIDL(asdmIDL::HolographyRowIDL& x) const;
00336 #endif
00337
00338 #ifndef WITHOUT_ACS
00339
00344 void setFromIDL (asdmIDL::HolographyRowIDL x) ;
00345 #endif
00346
00351 std::string toXML() const;
00352
00359 void setFromXML (std::string rowDoc) ;
00360
00363
00365
00366 std::map<std::string, HolographyAttributeFromBin> fromBinMethods;
00367 void holographyIdFromBin( EndianIStream& eis);
00368 void distanceFromBin( EndianIStream& eis);
00369 void focusFromBin( EndianIStream& eis);
00370 void numCorrFromBin( EndianIStream& eis);
00371 void typeFromBin( EndianIStream& eis);
00372
00373
00374
00382 static HolographyRow* fromBin(EndianIStream& eis, HolographyTable& table, const std::vector<std::string>& attributesSeq);
00383
00390 void fromText(const std::string& attributeName, const std::string& t);
00392
00393 private:
00397 HolographyTable &table;
00401 bool hasBeenAdded;
00402
00403
00404 void isAdded(bool added);
00405
00406
00415 HolographyRow (HolographyTable &table);
00416
00434 HolographyRow (HolographyTable &table, HolographyRow &row);
00435
00437
00439
00440
00441
00442
00443
00444
00445 Tag holographyId;
00446
00447
00448
00449
00459 void setHolographyId (Tag holographyId);
00460
00461
00462
00463
00464
00465
00466
00467
00468 Length distance;
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479 Length focus;
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490 int numCorr;
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501 vector<HolographyChannelTypeMod::HolographyChannelType > type;
00502
00503
00504
00505
00506
00508
00510
00512
00514
00515
00516
00518
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00531
00533 std::map<std::string, HolographyAttributeFromText> fromTextMethods;
00534
00535 void holographyIdFromText (const string & s);
00536
00537
00538 void distanceFromText (const string & s);
00539
00540
00541 void focusFromText (const string & s);
00542
00543
00544 void numCorrFromText (const string & s);
00545
00546
00547 void typeFromText (const string & s);
00548
00549
00550
00551
00556 void toBin(EndianOSStream& eoss);
00557
00567 };
00568
00569 }
00570
00571 #endif