FlagCmdRow.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 FlagCmdRow_CLASS
00035 #define FlagCmdRow_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 <ArrayTimeInterval.h>
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #include <ConversionException.h>
00074 #include <NoSuchRow.h>
00075 #include <IllegalAccessException.h>
00076
00077 #include <RowTransformer.h>
00078
00079
00080
00081
00082
00083
00084 namespace asdm {
00085
00086
00087
00088
00089
00090 class FlagCmdRow;
00091 typedef void (FlagCmdRow::*FlagCmdAttributeFromBin) (EndianIStream& eis);
00092 typedef void (FlagCmdRow::*FlagCmdAttributeFromText) (const string& s);
00093
00100 class FlagCmdRow {
00101 friend class asdm::FlagCmdTable;
00102 friend class asdm::RowTransformer<FlagCmdRow>;
00103
00104
00105 public:
00106
00107 virtual ~FlagCmdRow();
00108
00112 FlagCmdTable &getTable() const;
00113
00118 bool isAdded() const;
00119
00121
00123
00124
00125
00126
00127
00128
00129
00130
00135 ArrayTimeInterval getTimeInterval() const;
00136
00137
00138
00139
00149 void setTimeInterval (ArrayTimeInterval timeInterval);
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00167 string getType() const;
00168
00169
00170
00171
00179 void setType (string type);
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00197 string getReason() const;
00198
00199
00200
00201
00209 void setReason (string reason);
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00227 int getLevel() const;
00228
00229
00230
00231
00239 void setLevel (int level);
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00257 int getSeverity() const;
00258
00259
00260
00261
00269 void setSeverity (int severity);
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00287 bool getApplied() const;
00288
00289
00290
00291
00299 void setApplied (bool applied);
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00317 string getCommand() const;
00318
00319
00320
00321
00329 void setCommand (string command);
00330
00331
00332
00333
00334
00335
00337
00339
00341
00343
00344
00345
00346
00366 bool compareNoAutoInc(ArrayTimeInterval timeInterval, string type, string reason, int level, int severity, bool applied, string command);
00367
00368
00369
00370
00388 bool compareRequiredValue(string type, string reason, int level, int severity, bool applied, string command);
00389
00390
00399 bool equalByRequiredValue(FlagCmdRow* x) ;
00400
00401 #ifndef WITHOUT_ACS
00402
00406 asdmIDL::FlagCmdRowIDL *toIDL() const;
00407
00415 void toIDL(asdmIDL::FlagCmdRowIDL& x) const;
00416 #endif
00417
00418 #ifndef WITHOUT_ACS
00419
00424 void setFromIDL (asdmIDL::FlagCmdRowIDL x) ;
00425 #endif
00426
00431 std::string toXML() const;
00432
00439 void setFromXML (std::string rowDoc) ;
00440
00443
00445
00446 std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods;
00447 void timeIntervalFromBin( EndianIStream& eis);
00448 void typeFromBin( EndianIStream& eis);
00449 void reasonFromBin( EndianIStream& eis);
00450 void levelFromBin( EndianIStream& eis);
00451 void severityFromBin( EndianIStream& eis);
00452 void appliedFromBin( EndianIStream& eis);
00453 void commandFromBin( EndianIStream& eis);
00454
00455
00456
00464 static FlagCmdRow* fromBin(EndianIStream& eis, FlagCmdTable& table, const std::vector<std::string>& attributesSeq);
00465
00472 void fromText(const std::string& attributeName, const std::string& t);
00474
00475 private:
00479 FlagCmdTable &table;
00483 bool hasBeenAdded;
00484
00485
00486 void isAdded(bool added);
00487
00488
00497 FlagCmdRow (FlagCmdTable &table);
00498
00516 FlagCmdRow (FlagCmdTable &table, FlagCmdRow &row);
00517
00519
00521
00522
00523
00524
00525
00526
00527 ArrayTimeInterval timeInterval;
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538 string type;
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549 string reason;
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560 int level;
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571 int severity;
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582 bool applied;
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593 string command;
00594
00595
00596
00597
00598
00600
00602
00604
00606
00607
00608
00610
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00625
00627 std::map<std::string, FlagCmdAttributeFromText> fromTextMethods;
00628
00629 void timeIntervalFromText (const string & s);
00630
00631
00632 void typeFromText (const string & s);
00633
00634
00635 void reasonFromText (const string & s);
00636
00637
00638 void levelFromText (const string & s);
00639
00640
00641 void severityFromText (const string & s);
00642
00643
00644 void appliedFromText (const string & s);
00645
00646
00647 void commandFromText (const string & s);
00648
00649
00650
00651
00656 void toBin(EndianOSStream& eoss);
00657
00667 };
00668
00669 }
00670
00671 #endif