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 ConfigDescriptionTable_CLASS
00035 #define ConfigDescriptionTable_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
00059
00060 #include "CCorrelationMode.h"
00061 using namespace CorrelationModeMod;
00062
00063
00064
00065
00066
00067
00068
00069 #include "CAtmPhaseCorrection.h"
00070 using namespace AtmPhaseCorrectionMod;
00071
00072
00073
00074 #include "CProcessorType.h"
00075 using namespace ProcessorTypeMod;
00076
00077
00078
00079
00080
00081 #include "CSpectralResolutionType.h"
00082 using namespace SpectralResolutionTypeMod;
00083
00084
00085
00086
00087
00088 #include "CSpectralResolutionType.h"
00089 using namespace SpectralResolutionTypeMod;
00090
00091
00092
00093
00094 #include <ConversionException.h>
00095 #include <DuplicateKey.h>
00096 #include <UniquenessViolationException.h>
00097 #include <NoSuchRow.h>
00098 #include <DuplicateKey.h>
00099 using asdm::DuplicateKey;
00100 using asdm::ConversionException;
00101 using asdm::NoSuchRow;
00102 using asdm::DuplicateKey;
00103
00104 #ifndef WITHOUT_ACS
00105 #include <asdmIDLC.h>
00106 using asdmIDL::ConfigDescriptionTableIDL;
00107 #endif
00108
00109 #include <Representable.h>
00110
00111 namespace asdm {
00112
00113
00114
00115
00116 class ASDM;
00117 class ConfigDescriptionRow;
00273 class ConfigDescriptionTable : public Representable {
00274 friend class ASDM;
00275
00276 public:
00277
00278
00284 static vector<string> getKeyName();
00285
00286
00287 virtual ~ConfigDescriptionTable();
00288
00294 ASDM &getContainer() const;
00295
00301 unsigned int size() ;
00302
00308 string getName() const;
00309
00315 static const vector<string>& getAttributesNames();
00316
00320 Entity getEntity() const;
00321
00326 void setEntity(Entity e);
00327
00335 string toXML() ;
00336
00337 #ifndef WITHOUT_ACS
00338
00344 ConfigDescriptionTableIDL *toIDL() ;
00345 #endif
00346
00347 #ifndef WITHOUT_ACS
00348
00354 void fromIDL(ConfigDescriptionTableIDL x) ;
00355 #endif
00356
00357
00358
00359
00360
00365 ConfigDescriptionRow *newRow();
00366
00367
00399 ConfigDescriptionRow *newRow(int numAntenna, int numDataDescription, int numFeed, CorrelationModeMod::CorrelationMode correlationMode, int numAtmPhaseCorrection, vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCorrection, ProcessorTypeMod::ProcessorType processorType, SpectralResolutionTypeMod::SpectralResolutionType spectralType, vector<Tag> antennaId, vector<int> feedId, vector<Tag> switchCycleId, vector<Tag> dataDescriptionId, Tag processorId);
00400
00401
00402
00415 ConfigDescriptionRow *newRow(ConfigDescriptionRow *row);
00416
00417
00418
00419
00420
00421
00422
00423
00433 ConfigDescriptionRow* add(ConfigDescriptionRow* x) ;
00434
00435
00436
00437
00438
00439
00440
00446 vector<ConfigDescriptionRow *> get() ;
00447
00448
00449
00450
00451
00461 ConfigDescriptionRow* getRowByKey(Tag configDescriptionId);
00462
00463
00464
00465
00466
00500 ConfigDescriptionRow* lookup(int numAntenna, int numDataDescription, int numFeed, CorrelationModeMod::CorrelationMode correlationMode, int numAtmPhaseCorrection, vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCorrection, ProcessorTypeMod::ProcessorType processorType, SpectralResolutionTypeMod::SpectralResolutionType spectralType, vector<Tag> antennaId, vector<int> feedId, vector<Tag> switchCycleId, vector<Tag> dataDescriptionId, Tag processorId);
00501
00502
00503 private:
00504
00513 ConfigDescriptionTable (ASDM & container);
00514
00515 ASDM & container;
00516
00517 bool archiveAsBin;
00518 bool fileAsBin ;
00519
00520 Entity entity;
00521
00522
00523
00524 map<string,int> noAutoIncIds;
00525 void autoIncrement(string key, ConfigDescriptionRow* x);
00526
00527
00531 static string tableName;
00532
00536 static const vector<string> attributesNames;
00537
00541 static vector<string> initAttributesNames();
00542
00543
00547 static vector<string> key;
00548
00549
00559 ConfigDescriptionRow* checkAndAdd(ConfigDescriptionRow* x) ;
00560
00561
00562
00563
00564
00565
00566 vector<ConfigDescriptionRow * > privateRows;
00567
00568
00569
00570 vector<ConfigDescriptionRow *> row;
00571
00572
00573 void error() ;
00574
00575
00582 void fromXML(string xmlDoc) ;
00583
00588 void setFromMIMEFile(const string& directory);
00589 void setFromXMLFile(const string& directory);
00590
00598 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00599
00600
00607 void setFromMIME(const string & mimeMsg);
00608
00612 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00613
00623 void toFile(string directory);
00624
00633 void setFromFile(const string& directory);
00634
00635 };
00636
00637 }
00638
00639 #endif