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 SquareLawDetectorRow_CLASS
00035 #define SquareLawDetectorRow_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::SquareLawDetectorRowIDL;
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 "CDetectorBandType.h"
00066 using namespace DetectorBandTypeMod;
00067
00068
00069
00070
00071 #include <ConversionException.h>
00072 #include <NoSuchRow.h>
00073 #include <IllegalAccessException.h>
00074
00075
00076
00077
00078
00079
00080 namespace asdm {
00081
00082
00083
00084
00085
00086 class SquareLawDetectorRow;
00087 typedef void (SquareLawDetectorRow::*SquareLawDetectorAttributeFromBin) (EndianISStream& eiss);
00088
00095 class SquareLawDetectorRow {
00096 friend class asdm::SquareLawDetectorTable;
00097
00098 public:
00099
00100 virtual ~SquareLawDetectorRow();
00101
00105 SquareLawDetectorTable &getTable() const;
00106
00111 bool isAdded() const;
00112
00114
00116
00117
00118
00119
00120
00121
00122
00123
00128 Tag getSquareLawDetectorId() const;
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00148 int getNumBand() const;
00149
00150
00151
00152
00160 void setNumBand (int numBand);
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00178 DetectorBandTypeMod::DetectorBandType getBandType() const;
00179
00180
00181
00182
00190 void setBandType (DetectorBandTypeMod::DetectorBandType bandType);
00191
00192
00193
00194
00195
00196
00198
00200
00202
00204
00205
00206
00207
00217 bool compareNoAutoInc(int numBand, DetectorBandTypeMod::DetectorBandType bandType);
00218
00219
00220
00221
00231 bool compareRequiredValue(int numBand, DetectorBandTypeMod::DetectorBandType bandType);
00232
00233
00242 bool equalByRequiredValue(SquareLawDetectorRow* x) ;
00243
00244 #ifndef WITHOUT_ACS
00245
00249 SquareLawDetectorRowIDL *toIDL() const;
00250 #endif
00251
00252 #ifndef WITHOUT_ACS
00253
00258 void setFromIDL (SquareLawDetectorRowIDL x) ;
00259 #endif
00260
00265 string toXML() const;
00266
00273 void setFromXML (string rowDoc) ;
00274
00275 private:
00279 SquareLawDetectorTable &table;
00283 bool hasBeenAdded;
00284
00285
00286 void isAdded(bool added);
00287
00288
00297 SquareLawDetectorRow (SquareLawDetectorTable &table);
00298
00316 SquareLawDetectorRow (SquareLawDetectorTable &table, SquareLawDetectorRow &row);
00317
00319
00321
00322
00323
00324
00325
00326
00327 Tag squareLawDetectorId;
00328
00329
00330
00331
00341 void setSquareLawDetectorId (Tag squareLawDetectorId);
00342
00343
00344
00345
00346
00347
00348
00349
00350 int numBand;
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361 DetectorBandTypeMod::DetectorBandType bandType;
00362
00363
00364
00365
00366
00368
00370
00372
00374
00375
00377
00379 map<string, SquareLawDetectorAttributeFromBin> fromBinMethods;
00380 void squareLawDetectorIdFromBin( EndianISStream& eiss);
00381 void numBandFromBin( EndianISStream& eiss);
00382 void bandTypeFromBin( EndianISStream& eiss);
00383
00384
00385
00390 void toBin(EndianOSStream& eoss);
00391
00399 static SquareLawDetectorRow* fromBin(EndianISStream& eiss, SquareLawDetectorTable& table, const vector<string>& attributesSeq);
00400
00401 };
00402
00403 }
00404
00405 #endif