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 AlmaCorrelatorModeTable_CLASS
00035 #define AlmaCorrelatorModeTable_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 #include <Angle.h>
00046 #include <AngularRate.h>
00047 #include <ArrayTime.h>
00048 #include <ArrayTimeInterval.h>
00049 #include <Complex.h>
00050 #include <Entity.h>
00051 #include <EntityId.h>
00052 #include <EntityRef.h>
00053 #include <Flux.h>
00054 #include <Frequency.h>
00055 #include <Humidity.h>
00056 #include <Interval.h>
00057 #include <Length.h>
00058 #include <PartId.h>
00059 #include <Pressure.h>
00060 #include <Speed.h>
00061 #include <Tag.h>
00062 #include <Temperature.h>
00063 #include <ConversionException.h>
00064 #include <DuplicateKey.h>
00065 #include <UniquenessViolationException.h>
00066 #include <NoSuchRow.h>
00067 #include <DuplicateKey.h>
00068
00069
00070
00071
00072
00073
00074 #ifndef WITHOUT_ACS
00075 #include <asdmIDLC.h>
00076 using asdmIDL::AlmaCorrelatorModeTableIDL;
00077 #endif
00078
00079 using asdm::Angle;
00080 using asdm::AngularRate;
00081 using asdm::ArrayTime;
00082 using asdm::Complex;
00083 using asdm::Entity;
00084 using asdm::EntityId;
00085 using asdm::EntityRef;
00086 using asdm::Flux;
00087 using asdm::Frequency;
00088 using asdm::Humidity;
00089 using asdm::Interval;
00090 using asdm::Length;
00091 using asdm::PartId;
00092 using asdm::Pressure;
00093 using asdm::Speed;
00094 using asdm::Tag;
00095 using asdm::Temperature;
00096
00097 using asdm::DuplicateKey;
00098 using asdm::ConversionException;
00099 using asdm::NoSuchRow;
00100 using asdm::DuplicateKey;
00101
00102 #include <Representable.h>
00103
00104 namespace asdm {
00105
00106
00107
00108
00109 class ASDM;
00110 class AlmaCorrelatorModeRow;
00186 class AlmaCorrelatorModeTable : public Representable {
00187 friend class asdm::ASDM;
00188
00189 public:
00190
00191
00197 static vector<string> getKeyName();
00198
00199
00200 virtual ~AlmaCorrelatorModeTable();
00201
00207 ASDM &getContainer() const;
00208
00214 unsigned int size() ;
00215
00221 string getName() const;
00222
00226 Entity getEntity() const;
00227
00232 void setEntity(Entity e);
00233
00234
00235
00236
00237
00242 AlmaCorrelatorModeRow *newRow();
00243
00248 AlmaCorrelatorModeRow* newRowEmpty();
00249
00250
00272 AlmaCorrelatorModeRow *newRow(int numBaseband, vector<int > basebandIndex, Interval accumMode, vector<int > basebandConfig, int binMode, bool quantization, string windowFunction, vector<int > axesOrderArray);
00273
00278 AlmaCorrelatorModeRow *newRowFull(int numBaseband, vector<int > basebandIndex, Interval accumMode, vector<int > basebandConfig, int binMode, bool quantization, string windowFunction, vector<int > axesOrderArray);
00279
00280
00293 AlmaCorrelatorModeRow *newRow(AlmaCorrelatorModeRow *row);
00294
00299 AlmaCorrelatorModeRow *newRowCopy(AlmaCorrelatorModeRow *row);
00300
00301
00302
00303
00304
00305
00306
00307
00317 AlmaCorrelatorModeRow* add(AlmaCorrelatorModeRow* x) ;
00318
00319
00320
00321
00322
00323
00324
00330 vector<AlmaCorrelatorModeRow *> get() ;
00331
00332
00333
00334
00335
00345 AlmaCorrelatorModeRow* AlmaCorrelatorModeTable::getRowByKey(Tag almaCorrelatorModeId);
00346
00347
00348
00349
00350
00374 AlmaCorrelatorModeRow* lookup(int numBaseband, vector<int > basebandIndex, Interval accumMode, vector<int > basebandConfig, int binMode, bool quantization, string windowFunction, vector<int > axesOrderArray);
00375
00376
00377 #ifndef WITHOUT_ACS
00378
00384 AlmaCorrelatorModeTableIDL *toIDL() ;
00385 #endif
00386
00387 #ifndef WITHOUT_ACS
00388
00394 void fromIDL(AlmaCorrelatorModeTableIDL x) throw(DuplicateKey,ConversionException);
00395 #endif
00396
00400 char *toFITS() const throw(ConversionException);
00401
00405 void fromFITS(char *fits) throw(ConversionException);
00406
00410 string toVOTable() const throw(ConversionException);
00411
00415 void fromVOTable(string vo) throw(ConversionException);
00416
00423 string toXML() throw(ConversionException);
00424
00430 void fromXML(string xmlDoc) throw(ConversionException);
00431
00437 string toMIME();
00438
00445 void setFromMIME(const string & mimeMsg);
00446
00456 void toFile(string directory);
00457
00466 void setFromFile(const string& directory);
00467
00468 private:
00469
00478 AlmaCorrelatorModeTable (ASDM & container);
00479
00480 ASDM & container;
00481
00482 bool archiveAsBin;
00483 bool fileAsBin ;
00484
00485 Entity entity;
00486
00487
00488
00489 map<string,int> noAutoIncIds;
00490 void autoIncrement(string key, AlmaCorrelatorModeRow* x);
00491
00492
00496 static string tableName;
00497
00498
00502 static vector<string> key;
00503
00504
00510 AlmaCorrelatorModeRow* checkAndAdd(AlmaCorrelatorModeRow* x) throw (DuplicateKey, UniquenessViolationException);
00511
00512
00513
00514
00515
00516
00517 vector<AlmaCorrelatorModeRow * > privateRows;
00518
00519
00520
00521 vector<AlmaCorrelatorModeRow *> row;
00522
00523
00524 void error() throw(ConversionException);
00525
00526 };
00527
00528 }
00529
00530 #endif