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 FeedTable_CLASS
00035 #define FeedTable_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 <Angle.h>
00048 using asdm::Angle;
00049
00050 #include <Tag.h>
00051 using asdm::Tag;
00052
00053 #include <Length.h>
00054 using asdm::Length;
00055
00056 #include <ArrayTimeInterval.h>
00057 using asdm::ArrayTimeInterval;
00058
00059 #include <Complex.h>
00060 using asdm::Complex;
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #include "CPolarizationType.h"
00077 using namespace PolarizationTypeMod;
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 #include <ConversionException.h>
00093 #include <DuplicateKey.h>
00094 #include <UniquenessViolationException.h>
00095 #include <NoSuchRow.h>
00096 #include <DuplicateKey.h>
00097 using asdm::DuplicateKey;
00098 using asdm::ConversionException;
00099 using asdm::NoSuchRow;
00100 using asdm::DuplicateKey;
00101
00102 #ifndef WITHOUT_ACS
00103 #include <asdmIDLC.h>
00104 using asdmIDL::FeedTableIDL;
00105 #endif
00106
00107 #include <Representable.h>
00108
00109 namespace asdm {
00110
00111
00112
00113
00114 class ASDM;
00115 class FeedRow;
00256 class FeedTable : public Representable {
00257 friend class ASDM;
00258
00259 public:
00260
00261
00267 static vector<string> getKeyName();
00268
00269
00270 virtual ~FeedTable();
00271
00277 ASDM &getContainer() const;
00278
00284 unsigned int size() ;
00285
00291 string getName() const;
00292
00298 static const vector<string>& getAttributesNames();
00299
00303 Entity getEntity() const;
00304
00309 void setEntity(Entity e);
00310
00318 string toXML() ;
00319
00320 #ifndef WITHOUT_ACS
00321
00327 FeedTableIDL *toIDL() ;
00328 #endif
00329
00330 #ifndef WITHOUT_ACS
00331
00337 void fromIDL(FeedTableIDL x) ;
00338 #endif
00339
00340
00341
00342
00343
00348 FeedRow *newRow();
00349
00350
00376 FeedRow *newRow(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle, vector<int> receiverId);
00377
00378
00379
00392 FeedRow *newRow(FeedRow *row);
00393
00394
00395
00396
00397
00398
00399
00400
00401
00411 FeedRow* add(FeedRow* x) ;
00412
00413
00414
00415
00416
00417
00418
00424 vector<FeedRow *> get() ;
00425
00426
00427
00428
00429
00445 FeedRow* getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId);
00446
00447
00448
00456 vector <FeedRow *> getRowByFeedId(int);
00457
00458
00459
00487 FeedRow* lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle, vector<int> receiverId);
00488
00489
00490 private:
00491
00500 FeedTable (ASDM & container);
00501
00502 ASDM & container;
00503
00504 bool archiveAsBin;
00505 bool fileAsBin ;
00506
00507 Entity entity;
00508
00509
00510
00514 static string tableName;
00515
00519 static const vector<string> attributesNames;
00520
00524 static vector<string> initAttributesNames();
00525
00526
00530 static vector<string> key;
00531
00532
00542 FeedRow* checkAndAdd(FeedRow* x) ;
00543
00544
00545
00546
00554 FeedRow * insertByStartTime(FeedRow* x, vector<FeedRow* >& row);
00555
00556
00557
00558
00559
00560
00561 vector<FeedRow * > privateRows;
00562
00563
00564
00565
00566
00567
00568
00569
00570 typedef vector <vector <FeedRow* > > ID_TIME_ROWS;
00571 map<string, ID_TIME_ROWS > context;
00572
00577 string Key(Tag antennaId, Tag spectralWindowId) ;
00578
00579
00580
00581
00587 void getByKeyNoAutoIncNoTime(vector <FeedRow*>& vin, vector <FeedRow*>& vout, Tag antennaId, Tag spectralWindowId);
00588
00589
00590
00591 void error() ;
00592
00593
00600 void fromXML(string xmlDoc) ;
00601
00606 void setFromMIMEFile(const string& directory);
00607 void setFromXMLFile(const string& directory);
00608
00616 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00617
00618
00625 void setFromMIME(const string & mimeMsg);
00626
00630 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00631
00641 void toFile(string directory);
00642
00651 void setFromFile(const string& directory);
00652
00653 };
00654
00655 }
00656
00657 #endif