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 DopplerTable_CLASS
00035 #define DopplerTable_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
00048
00049
00050
00051
00052
00053
00054
00055 #include "CDopplerReferenceCode.h"
00056 using namespace DopplerReferenceCodeMod;
00057
00058
00059
00060
00061 #include <ConversionException.h>
00062 #include <DuplicateKey.h>
00063 #include <UniquenessViolationException.h>
00064 #include <NoSuchRow.h>
00065 #include <DuplicateKey.h>
00066 using asdm::DuplicateKey;
00067 using asdm::ConversionException;
00068 using asdm::NoSuchRow;
00069 using asdm::DuplicateKey;
00070
00071 #ifndef WITHOUT_ACS
00072 #include <asdmIDLC.h>
00073 using asdmIDL::DopplerTableIDL;
00074 #endif
00075
00076 #include <Representable.h>
00077
00078 namespace asdm {
00079
00080
00081
00082
00083 class ASDM;
00084 class DopplerRow;
00141 class DopplerTable : public Representable {
00142 friend class ASDM;
00143
00144 public:
00145
00146
00152 static vector<string> getKeyName();
00153
00154
00155 virtual ~DopplerTable();
00156
00162 ASDM &getContainer() const;
00163
00169 unsigned int size() ;
00170
00176 string getName() const;
00177
00183 static const vector<string>& getAttributesNames();
00184
00188 Entity getEntity() const;
00189
00194 void setEntity(Entity e);
00195
00203 string toXML() ;
00204
00205 #ifndef WITHOUT_ACS
00206
00212 DopplerTableIDL *toIDL() ;
00213 #endif
00214
00215 #ifndef WITHOUT_ACS
00216
00222 void fromIDL(DopplerTableIDL x) ;
00223 #endif
00224
00225
00226
00227
00228
00233 DopplerRow *newRow();
00234
00235
00247 DopplerRow *newRow(int sourceId, int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef);
00248
00249
00250
00263 DopplerRow *newRow(DopplerRow *row);
00264
00265
00266
00267
00268
00269
00270
00271
00281 DopplerRow* add(DopplerRow* x) ;
00282
00283
00284
00285
00286
00287
00288
00294 vector<DopplerRow *> get() ;
00295
00296
00297
00298
00299
00311 DopplerRow* getRowByKey(int dopplerId, int sourceId);
00312
00313
00314
00322 vector <DopplerRow *> getRowByDopplerId(int);
00323
00324
00325
00339 DopplerRow* lookup(int sourceId, int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef);
00340
00341
00342 private:
00343
00352 DopplerTable (ASDM & container);
00353
00354 ASDM & container;
00355
00356 bool archiveAsBin;
00357 bool fileAsBin ;
00358
00359 Entity entity;
00360
00361
00362
00363 map<string,int> noAutoIncIds;
00364 void autoIncrement(string key, DopplerRow* x);
00365
00366
00370 static string tableName;
00371
00375 static const vector<string> attributesNames;
00376
00380 static vector<string> initAttributesNames();
00381
00382
00386 static vector<string> key;
00387
00388
00398 DopplerRow* checkAndAdd(DopplerRow* x) ;
00399
00400
00401
00402
00403
00404
00405 vector<DopplerRow * > privateRows;
00406
00407
00408
00409 vector<DopplerRow *> row;
00410
00411
00412 void error() ;
00413
00414
00421 void fromXML(string xmlDoc) ;
00422
00427 void setFromMIMEFile(const string& directory);
00428 void setFromXMLFile(const string& directory);
00429
00437 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00438
00439
00446 void setFromMIME(const string & mimeMsg);
00447
00451 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00452
00462 void toFile(string directory);
00463
00472 void setFromFile(const string& directory);
00473
00474 };
00475
00476 }
00477
00478 #endif