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 FlagCmdTable_CLASS
00035 #define FlagCmdTable_CLASS
00036
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <set>
00041 using std::string;
00042 using std::vector;
00043 using std::map;
00044
00045
00046
00047 #include <ArrayTimeInterval.h>
00048 using asdm::ArrayTimeInterval;
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 #include <ConversionException.h>
00070 #include <DuplicateKey.h>
00071 #include <UniquenessViolationException.h>
00072 #include <NoSuchRow.h>
00073 #include <DuplicateKey.h>
00074 using asdm::DuplicateKey;
00075 using asdm::ConversionException;
00076 using asdm::NoSuchRow;
00077 using asdm::DuplicateKey;
00078
00079 #ifndef WITHOUT_ACS
00080 #include <asdmIDLC.h>
00081 using asdmIDL::FlagCmdTableIDL;
00082 #endif
00083
00084 #include <Representable.h>
00085
00086 namespace asdm {
00087
00088
00089
00090
00091 class ASDM;
00092 class FlagCmdRow;
00168 class FlagCmdTable : public Representable {
00169 friend class ASDM;
00170
00171 public:
00172
00173
00179 static vector<string> getKeyName();
00180
00181
00182 virtual ~FlagCmdTable();
00183
00189 ASDM &getContainer() const;
00190
00196 unsigned int size() ;
00197
00203 string getName() const;
00204
00210 static const vector<string>& getAttributesNames();
00211
00215 Entity getEntity() const;
00216
00221 void setEntity(Entity e);
00222
00230 string toXML() ;
00231
00232 #ifndef WITHOUT_ACS
00233
00239 FlagCmdTableIDL *toIDL() ;
00240 #endif
00241
00242 #ifndef WITHOUT_ACS
00243
00249 void fromIDL(FlagCmdTableIDL x) ;
00250 #endif
00251
00252
00253
00254
00255
00260 FlagCmdRow *newRow();
00261
00262
00282 FlagCmdRow *newRow(ArrayTimeInterval timeInterval, string type, string reason, int level, int severity, bool applied, string command);
00283
00284
00285
00298 FlagCmdRow *newRow(FlagCmdRow *row);
00299
00300
00301
00302
00303
00304
00321 FlagCmdRow* add(FlagCmdRow* x) ;
00322
00323
00324
00325
00326
00327
00328
00329
00330
00336 vector<FlagCmdRow *> get() ;
00337
00338
00346 vector <FlagCmdRow*> *getByContext();
00347
00348
00349
00350
00351
00361 FlagCmdRow* getRowByKey(ArrayTimeInterval timeInterval);
00362
00363
00364
00365
00366
00388 FlagCmdRow* lookup(ArrayTimeInterval timeInterval, string type, string reason, int level, int severity, bool applied, string command);
00389
00390
00391 private:
00392
00401 FlagCmdTable (ASDM & container);
00402
00403 ASDM & container;
00404
00405 bool archiveAsBin;
00406 bool fileAsBin ;
00407
00408 Entity entity;
00409
00410
00411
00415 static string tableName;
00416
00420 static const vector<string> attributesNames;
00421
00425 static vector<string> initAttributesNames();
00426
00427
00431 static vector<string> key;
00432
00433
00441 FlagCmdRow* checkAndAdd(FlagCmdRow* x) ;
00442
00443
00444
00445
00453 FlagCmdRow * insertByStartTime(FlagCmdRow* x, vector<FlagCmdRow* >& row);
00454
00455
00456
00457
00458
00459
00460 vector<FlagCmdRow * > privateRows;
00461
00462
00463
00464
00465
00466
00467
00468
00469 vector <FlagCmdRow *> row;
00470
00471
00472
00473
00474
00475
00476 void error() ;
00477
00478
00485 void fromXML(string xmlDoc) ;
00486
00491 void setFromMIMEFile(const string& directory);
00492 void setFromXMLFile(const string& directory);
00493
00501 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00502
00503
00510 void setFromMIME(const string & mimeMsg);
00511
00515 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00516
00526 void toFile(string directory);
00527
00536 void setFromFile(const string& directory);
00537
00538 };
00539
00540 }
00541
00542 #endif