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 StateRow_CLASS
00035 #define StateRow_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::StateRowIDL;
00047 #endif
00048
00049
00050
00051
00052
00053
00054 #include <Tag.h>
00055 using asdm::Tag;
00056
00057
00058
00059
00060
00061
00062
00063 #include "CCalibrationDevice.h"
00064 using namespace CalibrationDeviceMod;
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 #include <ConversionException.h>
00078 #include <NoSuchRow.h>
00079 #include <IllegalAccessException.h>
00080
00081
00082
00083
00084
00085
00086 namespace asdm {
00087
00088
00089
00090
00091
00092 class StateRow;
00093 typedef void (StateRow::*StateAttributeFromBin) (EndianISStream& eiss);
00094
00101 class StateRow {
00102 friend class asdm::StateTable;
00103
00104 public:
00105
00106 virtual ~StateRow();
00107
00111 StateTable &getTable() const;
00112
00117 bool isAdded() const;
00118
00120
00122
00123
00124
00125
00126
00127
00128
00129
00134 Tag getStateId() const;
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00154 CalibrationDeviceMod::CalibrationDevice getCalDeviceName() const;
00155
00156
00157
00158
00166 void setCalDeviceName (CalibrationDeviceMod::CalibrationDevice calDeviceName);
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00184 bool getSig() const;
00185
00186
00187
00188
00196 void setSig (bool sig);
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00214 bool getRef() const;
00215
00216
00217
00218
00226 void setRef (bool ref);
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00244 bool getOnSky() const;
00245
00246
00247
00248
00256 void setOnSky (bool onSky);
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00272 bool isWeightExists() const;
00273
00274
00275
00281 float getWeight() const;
00282
00283
00284
00285
00292 void setWeight (float weight);
00293
00294
00295
00296
00300 void clearWeight ();
00301
00302
00303
00305
00307
00309
00311
00312
00313
00314
00328 bool compareNoAutoInc(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky);
00329
00330
00331
00332
00346 bool compareRequiredValue(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky);
00347
00348
00357 bool equalByRequiredValue(StateRow* x) ;
00358
00359 #ifndef WITHOUT_ACS
00360
00364 StateRowIDL *toIDL() const;
00365 #endif
00366
00367 #ifndef WITHOUT_ACS
00368
00373 void setFromIDL (StateRowIDL x) ;
00374 #endif
00375
00380 string toXML() const;
00381
00388 void setFromXML (string rowDoc) ;
00389
00390 private:
00394 StateTable &table;
00398 bool hasBeenAdded;
00399
00400
00401 void isAdded(bool added);
00402
00403
00412 StateRow (StateTable &table);
00413
00431 StateRow (StateTable &table, StateRow &row);
00432
00434
00436
00437
00438
00439
00440
00441
00442 Tag stateId;
00443
00444
00445
00446
00456 void setStateId (Tag stateId);
00457
00458
00459
00460
00461
00462
00463
00464
00465 CalibrationDeviceMod::CalibrationDevice calDeviceName;
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476 bool sig;
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487 bool ref;
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498 bool onSky;
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508 bool weightExists;
00509
00510
00511 float weight;
00512
00513
00514
00515
00516
00518
00520
00522
00524
00525
00527
00529 map<string, StateAttributeFromBin> fromBinMethods;
00530 void stateIdFromBin( EndianISStream& eiss);
00531 void calDeviceNameFromBin( EndianISStream& eiss);
00532 void sigFromBin( EndianISStream& eiss);
00533 void refFromBin( EndianISStream& eiss);
00534 void onSkyFromBin( EndianISStream& eiss);
00535
00536 void weightFromBin( EndianISStream& eiss);
00537
00538
00543 void toBin(EndianOSStream& eoss);
00544
00552 static StateRow* fromBin(EndianISStream& eiss, StateTable& table, const vector<string>& attributesSeq);
00553
00554 };
00555
00556 }
00557
00558 #endif