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 PointingModelTable_CLASS
00035 #define PointingModelTable_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
00061
00062 #include "CPolarizationType.h"
00063 using namespace PolarizationTypeMod;
00064
00065
00066
00067 #include "CReceiverBand.h"
00068 using namespace ReceiverBandMod;
00069
00070
00071
00072
00073
00074
00075
00076
00077 #include <ConversionException.h>
00078 #include <DuplicateKey.h>
00079 #include <UniquenessViolationException.h>
00080 #include <NoSuchRow.h>
00081 #include <DuplicateKey.h>
00082 using asdm::DuplicateKey;
00083 using asdm::ConversionException;
00084 using asdm::NoSuchRow;
00085 using asdm::DuplicateKey;
00086
00087 #ifndef WITHOUT_ACS
00088 #include <asdmIDLC.h>
00089 using asdmIDL::PointingModelTableIDL;
00090 #endif
00091
00092 #include <Representable.h>
00093
00094 namespace asdm {
00095
00096
00097
00098
00099 class ASDM;
00100 class PointingModelRow;
00202 class PointingModelTable : public Representable {
00203 friend class ASDM;
00204
00205 public:
00206
00207
00213 static vector<string> getKeyName();
00214
00215
00216 virtual ~PointingModelTable();
00217
00223 ASDM &getContainer() const;
00224
00230 unsigned int size() ;
00231
00237 string getName() const;
00238
00244 static const vector<string>& getAttributesNames();
00245
00249 Entity getEntity() const;
00250
00255 void setEntity(Entity e);
00256
00264 string toXML() ;
00265
00266 #ifndef WITHOUT_ACS
00267
00273 PointingModelTableIDL *toIDL() ;
00274 #endif
00275
00276 #ifndef WITHOUT_ACS
00277
00283 void fromIDL(PointingModelTableIDL x) ;
00284 #endif
00285
00286
00287
00288
00289
00294 PointingModelRow *newRow();
00295
00296
00318 PointingModelRow *newRow(Tag antennaId, int numCoeff, vector<string > coeffName, vector<float > coeffVal, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, string assocNature, int assocPointingModelId);
00319
00320
00321
00334 PointingModelRow *newRow(PointingModelRow *row);
00335
00336
00337
00338
00339
00340
00341
00342
00352 PointingModelRow* add(PointingModelRow* x) ;
00353
00354
00355
00356
00357
00358
00359
00365 vector<PointingModelRow *> get() ;
00366
00367
00368
00369
00370
00382 PointingModelRow* getRowByKey(Tag antennaId, int pointingModelId);
00383
00384
00385
00393 vector <PointingModelRow *> getRowByPointingModelId(int);
00394
00395
00396
00420 PointingModelRow* lookup(Tag antennaId, int numCoeff, vector<string > coeffName, vector<float > coeffVal, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, string assocNature, int assocPointingModelId);
00421
00422
00423 private:
00424
00433 PointingModelTable (ASDM & container);
00434
00435 ASDM & container;
00436
00437 bool archiveAsBin;
00438 bool fileAsBin ;
00439
00440 Entity entity;
00441
00442
00443
00444 map<string,int> noAutoIncIds;
00445 void autoIncrement(string key, PointingModelRow* x);
00446
00447
00451 static string tableName;
00452
00456 static const vector<string> attributesNames;
00457
00461 static vector<string> initAttributesNames();
00462
00463
00467 static vector<string> key;
00468
00469
00479 PointingModelRow* checkAndAdd(PointingModelRow* x) ;
00480
00481
00482
00483
00484
00485
00486 vector<PointingModelRow * > privateRows;
00487
00488
00489
00490 vector<PointingModelRow *> row;
00491
00492
00493 void error() ;
00494
00495
00502 void fromXML(string xmlDoc) ;
00503
00508 void setFromMIMEFile(const string& directory);
00509 void setFromXMLFile(const string& directory);
00510
00518 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00519
00520
00527 void setFromMIME(const string & mimeMsg);
00528
00532 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00533
00543 void toFile(string directory);
00544
00553 void setFromFile(const string& directory);
00554
00555 };
00556
00557 }
00558
00559 #endif