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 SpectralWindowTable_CLASS
00035 #define SpectralWindowTable_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 #include <Frequency.h>
00051 using asdm::Frequency;
00052
00053
00054
00055
00056
00057
00058
00059 #include "CBasebandName.h"
00060 using namespace BasebandNameMod;
00061
00062
00063
00064 #include "CNetSideband.h"
00065 using namespace NetSidebandMod;
00066
00067
00068
00069
00070
00071
00072
00073 #include "CSidebandProcessingMode.h"
00074 using namespace SidebandProcessingModeMod;
00075
00076
00077
00078
00079
00080 #include "CWindowFunction.h"
00081 using namespace WindowFunctionMod;
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 #include "CCorrelationBit.h"
00096 using namespace CorrelationBitMod;
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 #include "CFrequencyReferenceCode.h"
00111 using namespace FrequencyReferenceCodeMod;
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 #include "CSpectralResolutionType.h"
00130 using namespace SpectralResolutionTypeMod;
00131
00132
00133
00134
00135 #include <ConversionException.h>
00136 #include <DuplicateKey.h>
00137 #include <UniquenessViolationException.h>
00138 #include <NoSuchRow.h>
00139 #include <DuplicateKey.h>
00140 using asdm::DuplicateKey;
00141 using asdm::ConversionException;
00142 using asdm::NoSuchRow;
00143 using asdm::DuplicateKey;
00144
00145 #ifndef WITHOUT_ACS
00146 #include <asdmIDLC.h>
00147 using asdmIDL::SpectralWindowTableIDL;
00148 #endif
00149
00150 #include <Representable.h>
00151
00152 namespace asdm {
00153
00154
00155
00156
00157 class ASDM;
00158 class SpectralWindowRow;
00405 class SpectralWindowTable : public Representable {
00406 friend class ASDM;
00407
00408 public:
00409
00410
00416 static vector<string> getKeyName();
00417
00418
00419 virtual ~SpectralWindowTable();
00420
00426 ASDM &getContainer() const;
00427
00433 unsigned int size() ;
00434
00440 string getName() const;
00441
00447 static const vector<string>& getAttributesNames();
00448
00452 Entity getEntity() const;
00453
00458 void setEntity(Entity e);
00459
00467 string toXML() ;
00468
00469 #ifndef WITHOUT_ACS
00470
00476 SpectralWindowTableIDL *toIDL() ;
00477 #endif
00478
00479 #ifndef WITHOUT_ACS
00480
00486 void fromIDL(SpectralWindowTableIDL x) ;
00487 #endif
00488
00489
00490
00491
00492
00497 SpectralWindowRow *newRow();
00498
00499
00519 SpectralWindowRow *newRow(BasebandNameMod::BasebandName basebandName, NetSidebandMod::NetSideband netSideband, int numChan, Frequency refFreq, SidebandProcessingModeMod::SidebandProcessingMode sidebandProcessingMode, Frequency totBandwidth, WindowFunctionMod::WindowFunction windowFunction);
00520
00521
00522
00535 SpectralWindowRow *newRow(SpectralWindowRow *row);
00536
00537
00538
00539
00540
00541
00542
00543
00553 SpectralWindowRow* add(SpectralWindowRow* x) ;
00554
00555
00556
00557
00558
00559
00560
00566 vector<SpectralWindowRow *> get() ;
00567
00568
00569
00570
00571
00581 SpectralWindowRow* getRowByKey(Tag spectralWindowId);
00582
00583
00584
00585
00586
00608 SpectralWindowRow* lookup(BasebandNameMod::BasebandName basebandName, NetSidebandMod::NetSideband netSideband, int numChan, Frequency refFreq, SidebandProcessingModeMod::SidebandProcessingMode sidebandProcessingMode, Frequency totBandwidth, WindowFunctionMod::WindowFunction windowFunction);
00609
00610
00611 private:
00612
00621 SpectralWindowTable (ASDM & container);
00622
00623 ASDM & container;
00624
00625 bool archiveAsBin;
00626 bool fileAsBin ;
00627
00628 Entity entity;
00629
00630
00631
00632 map<string,int> noAutoIncIds;
00633 void autoIncrement(string key, SpectralWindowRow* x);
00634
00635
00639 static string tableName;
00640
00644 static const vector<string> attributesNames;
00645
00649 static vector<string> initAttributesNames();
00650
00651
00655 static vector<string> key;
00656
00657
00667 SpectralWindowRow* checkAndAdd(SpectralWindowRow* x) ;
00668
00669
00670
00671
00672
00673
00674 vector<SpectralWindowRow * > privateRows;
00675
00676
00677
00678 vector<SpectralWindowRow *> row;
00679
00680
00681 void error() ;
00682
00683
00690 void fromXML(string xmlDoc) ;
00691
00696 void setFromMIMEFile(const string& directory);
00697 void setFromXMLFile(const string& directory);
00698
00706 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00707
00708
00715 void setFromMIME(const string & mimeMsg);
00716
00720 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00721
00731 void toFile(string directory);
00732
00741 void setFromFile(const string& directory);
00742
00743 };
00744
00745 }
00746
00747 #endif