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 FocusModelTable_CLASS
00035 #define FocusModelTable_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 #include "CPolarizationType.h"
00057 using namespace PolarizationTypeMod;
00058
00059
00060
00061 #include "CReceiverBand.h"
00062 using namespace ReceiverBandMod;
00063
00064
00065
00066
00067
00068
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::FocusModelTableIDL;
00090 #endif
00091
00092 #include <Representable.h>
00093
00094 namespace asdm {
00095
00096
00097
00098
00099 class ASDM;
00100 class FocusModelRow;
00199 class FocusModelTable : public Representable {
00200 friend class ASDM;
00201
00202 public:
00203
00204
00210 static vector<string> getKeyName();
00211
00212
00213 virtual ~FocusModelTable();
00214
00220 ASDM &getContainer() const;
00221
00227 unsigned int size() ;
00228
00234 string getName() const;
00235
00241 static const vector<string>& getAttributesNames();
00242
00246 Entity getEntity() const;
00247
00252 void setEntity(Entity e);
00253
00261 string toXML() ;
00262
00263 #ifndef WITHOUT_ACS
00264
00270 FocusModelTableIDL *toIDL() ;
00271 #endif
00272
00273 #ifndef WITHOUT_ACS
00274
00280 void fromIDL(FocusModelTableIDL x) ;
00281 #endif
00282
00283
00284
00285
00286
00291 FocusModelRow *newRow();
00292
00293
00317 FocusModelRow *newRow(Tag antennaId, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, int numCoeff, vector<string > coeffName, vector<string > coeffFormula, vector<float > coeffVal, string assocNature, int assocFocusModelId);
00318
00319
00320
00333 FocusModelRow *newRow(FocusModelRow *row);
00334
00335
00336
00337
00338
00339
00340
00341
00351 FocusModelRow* add(FocusModelRow* x) ;
00352
00353
00354
00355
00356
00357
00358
00364 vector<FocusModelRow *> get() ;
00365
00366
00367
00368
00369
00381 FocusModelRow* getRowByKey(Tag antennaId, int focusModelId);
00382
00383
00384
00392 vector <FocusModelRow *> getRowByFocusModelId(int);
00393
00394
00395
00421 FocusModelRow* lookup(Tag antennaId, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, int numCoeff, vector<string > coeffName, vector<string > coeffFormula, vector<float > coeffVal, string assocNature, int assocFocusModelId);
00422
00423
00424 private:
00425
00434 FocusModelTable (ASDM & container);
00435
00436 ASDM & container;
00437
00438 bool archiveAsBin;
00439 bool fileAsBin ;
00440
00441 Entity entity;
00442
00443
00444
00445 map<string,int> noAutoIncIds;
00446 void autoIncrement(string key, FocusModelRow* x);
00447
00448
00452 static string tableName;
00453
00457 static const vector<string> attributesNames;
00458
00462 static vector<string> initAttributesNames();
00463
00464
00468 static vector<string> key;
00469
00470
00480 FocusModelRow* checkAndAdd(FocusModelRow* x) ;
00481
00482
00483
00484
00485
00486
00487 vector<FocusModelRow * > privateRows;
00488
00489
00490
00491 vector<FocusModelRow *> row;
00492
00493
00494 void error() ;
00495
00496
00503 void fromXML(string xmlDoc) ;
00504
00509 void setFromMIMEFile(const string& directory);
00510 void setFromXMLFile(const string& directory);
00511
00519 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00520
00521
00528 void setFromMIME(const string & mimeMsg);
00529
00533 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00534
00544 void toFile(string directory);
00545
00554 void setFromFile(const string& directory);
00555
00556 };
00557
00558 }
00559
00560 #endif