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 CorrelatorModeTable_CLASS
00035 #define CorrelatorModeTable_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 <Tag.h>
00048 using asdm::Tag;
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 #include "CBasebandName.h"
00059 using namespace BasebandNameMod;
00060
00061
00062
00063
00064
00065 #include "CAccumMode.h"
00066 using namespace AccumModeMod;
00067
00068
00069
00070
00071
00072
00073
00074 #include "CAxisName.h"
00075 using namespace AxisNameMod;
00076
00077
00078
00079 #include "CFilterMode.h"
00080 using namespace FilterModeMod;
00081
00082
00083
00084 #include "CCorrelatorName.h"
00085 using namespace CorrelatorNameMod;
00086
00087
00088
00089
00090 #include <ConversionException.h>
00091 #include <DuplicateKey.h>
00092 #include <UniquenessViolationException.h>
00093 #include <NoSuchRow.h>
00094 #include <DuplicateKey.h>
00095 using asdm::DuplicateKey;
00096 using asdm::ConversionException;
00097 using asdm::NoSuchRow;
00098 using asdm::DuplicateKey;
00099
00100 #ifndef WITHOUT_ACS
00101 #include <asdmIDLC.h>
00102 using asdmIDL::CorrelatorModeTableIDL;
00103 #endif
00104
00105 #include <Representable.h>
00106
00107 namespace asdm {
00108
00109
00110
00111
00112 class ASDM;
00113 class CorrelatorModeRow;
00210 class CorrelatorModeTable : public Representable {
00211 friend class ASDM;
00212
00213 public:
00214
00215
00221 static vector<string> getKeyName();
00222
00223
00224 virtual ~CorrelatorModeTable();
00225
00231 ASDM &getContainer() const;
00232
00238 unsigned int size() ;
00239
00245 string getName() const;
00246
00252 static const vector<string>& getAttributesNames();
00253
00257 Entity getEntity() const;
00258
00263 void setEntity(Entity e);
00264
00272 string toXML() ;
00273
00274 #ifndef WITHOUT_ACS
00275
00281 CorrelatorModeTableIDL *toIDL() ;
00282 #endif
00283
00284 #ifndef WITHOUT_ACS
00285
00291 void fromIDL(CorrelatorModeTableIDL x) ;
00292 #endif
00293
00294
00295
00296
00297
00302 CorrelatorModeRow *newRow();
00303
00304
00328 CorrelatorModeRow *newRow(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, int numAxes, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00329
00330
00331
00344 CorrelatorModeRow *newRow(CorrelatorModeRow *row);
00345
00346
00347
00348
00349
00350
00351
00352
00362 CorrelatorModeRow* add(CorrelatorModeRow* x) ;
00363
00364
00365
00366
00367
00368
00369
00375 vector<CorrelatorModeRow *> get() ;
00376
00377
00378
00379
00380
00390 CorrelatorModeRow* getRowByKey(Tag correlatorModeId);
00391
00392
00393
00394
00395
00421 CorrelatorModeRow* lookup(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, int numAxes, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00422
00423
00424 private:
00425
00434 CorrelatorModeTable (ASDM & container);
00435
00436 ASDM & container;
00437
00438 bool archiveAsBin;
00439 bool fileAsBin ;
00440
00441 Entity entity;
00442
00443
00444
00445 map<string,int> noAutoIncIds;
00446 void autoIncrement(string key, CorrelatorModeRow* x);
00447
00448
00452 static string tableName;
00453
00457 static const vector<string> attributesNames;
00458
00462 static vector<string> initAttributesNames();
00463
00464
00468 static vector<string> key;
00469
00470
00480 CorrelatorModeRow* checkAndAdd(CorrelatorModeRow* x) ;
00481
00482
00483
00484
00485
00486
00487 vector<CorrelatorModeRow * > privateRows;
00488
00489
00490
00491 vector<CorrelatorModeRow *> row;
00492
00493
00494 void error() ;
00495
00496
00503 void fromXML(string xmlDoc) ;
00504
00509 void setFromMIMEFile(const string& directory);
00510 void setFromXMLFile(const string& directory);
00511
00519 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00520
00521
00528 void setFromMIME(const string & mimeMsg);
00529
00533 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00534
00544 void toFile(string directory);
00545
00554 void setFromFile(const string& directory);
00555
00556 };
00557
00558 }
00559
00560 #endif