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 FreqOffsetTable_CLASS
00035
#define FreqOffsetTable_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
00075
00076
00077
00078
00079
00080
00081
00082
#ifndef WITHOUT_ACS
00083
#include <asdmIDLC.h>
00084
using asdmIDL::FreqOffsetTableIDL;
00085
#endif
00086
00087
using asdm::Angle;
00088
using asdm::AngularRate;
00089
using asdm::ArrayTime;
00090
using asdm::Complex;
00091
using asdm::Entity;
00092
using asdm::EntityId;
00093
using asdm::EntityRef;
00094
using asdm::Flux;
00095
using asdm::Frequency;
00096
using asdm::Humidity;
00097
using asdm::Interval;
00098
using asdm::Length;
00099
using asdm::PartId;
00100
using asdm::Pressure;
00101
using asdm::Speed;
00102
using asdm::Tag;
00103
using asdm::Temperature;
00104
00105
using asdm::DuplicateKey;
00106
using asdm::ConversionException;
00107
using asdm::NoSuchRow;
00108
using asdm::DuplicateKey;
00109
00110
#include <Representable.h>
00111
00112
namespace asdm {
00113
00114
00115
00116
00117
class ASDM;
00118
class FreqOffsetRow;
00176 class FreqOffsetTable :
public Representable {
00177
friend class asdm::ASDM;
00178
00179
public:
00180
00181
00187
static vector<string>
getKeyName();
00188
00189
00190
virtual ~
FreqOffsetTable();
00191
00197
ASDM &
getContainer()
const;
00198
00204
unsigned int size() ;
00205
00211 string
getName()
const;
00212
00216
Entity getEntity()
const;
00217
00222
void setEntity(
Entity e);
00223
00224
00225
00226
00227
00232
FreqOffsetRow *
newRow();
00233
00238
FreqOffsetRow*
newRowEmpty();
00239
00240
00256
FreqOffsetRow *
newRow(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
Frequency offset);
00257
00262
FreqOffsetRow *
newRowFull(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
Frequency offset);
00263
00264
00277
FreqOffsetRow *
newRow(
FreqOffsetRow *row);
00278
00283
FreqOffsetRow *
newRowCopy(
FreqOffsetRow *row);
00284
00285
00286
00287
00288
00289
00306
FreqOffsetRow*
add(
FreqOffsetRow* x) ;
00307
00308
00309
00310
00311
00312
00313
00314
00315
00321 vector<FreqOffsetRow *>
get() ;
00322
00323
00331 vector <FreqOffsetRow*> *
getByContext(
Tag antennaId,
int feedId,
Tag spectralWindowId);
00332
00333
00334
00335
00336
00352
FreqOffsetRow*
getRowByKey(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval);
00353
00354
00355
00356
00357
00375
FreqOffsetRow*
lookup(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
Frequency offset);
00376
00377
00378
#ifndef WITHOUT_ACS
00379
00385 FreqOffsetTableIDL *
toIDL() ;
00386
#endif
00387
00388
#ifndef WITHOUT_ACS
00389
00395
void fromIDL(FreqOffsetTableIDL x)
throw(
DuplicateKey,
ConversionException);
00396
#endif
00397
00401
char *
toFITS()
const throw(
ConversionException);
00402
00406
void fromFITS(
char *fits)
throw(
ConversionException);
00407
00411 string
toVOTable()
const throw(
ConversionException);
00412
00416
void fromVOTable(string vo)
throw(
ConversionException);
00417
00424 string
toXML()
throw(
ConversionException);
00425
00431
void fromXML(string xmlDoc)
throw(
ConversionException);
00432
00438 string
toMIME();
00439
00446
void setFromMIME(
const string & mimeMsg);
00447
00457
void toFile(string directory);
00458
00467
void setFromFile(
const string& directory);
00468
00469
private:
00470
00479
FreqOffsetTable (
ASDM & container);
00480
00481
ASDM & container;
00482
00483
bool archiveAsBin;
00484
bool fileAsBin ;
00485
00486
Entity entity;
00487
00488
00489
00493
static string tableName;
00494
00495
00499
static vector<string> key;
00500
00501
00507
FreqOffsetRow* checkAndAdd(
FreqOffsetRow* x)
throw (
DuplicateKey);
00508
00509
00510
00511
00519
FreqOffsetRow * insertByStartTime(
FreqOffsetRow* x, vector<FreqOffsetRow* >& row);
00520
00521
00522
00523
00524
00525
00526 vector<FreqOffsetRow * > privateRows;
00527
00528
00529
00530
00531
00532
00533
00534
00535
typedef vector <FreqOffsetRow* > TIME_ROWS;
00536 map<string, TIME_ROWS > context;
00537
00542 string Key(
Tag antennaId,
int feedId,
Tag spectralWindowId) ;
00543
00544
00545
00546
00552
void getByKeyNoAutoIncNoTime(vector <FreqOffsetRow*>& vin, vector <FreqOffsetRow*>& vout,
Tag antennaId,
int feedId,
Tag spectralWindowId);
00553
00554
00555
00556
void error()
throw(
ConversionException);
00557
00558 };
00559
00560 }
00561
00562
#endif