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 FocusTable_CLASS
00035 #define FocusTable_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 #include <Length.h>
00051 using asdm::Length;
00052
00053 #include <ArrayTimeInterval.h>
00054 using asdm::ArrayTimeInterval;
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 #include <ConversionException.h>
00070 #include <DuplicateKey.h>
00071 #include <UniquenessViolationException.h>
00072 #include <NoSuchRow.h>
00073 #include <DuplicateKey.h>
00074 using asdm::DuplicateKey;
00075 using asdm::ConversionException;
00076 using asdm::NoSuchRow;
00077 using asdm::DuplicateKey;
00078
00079 #ifndef WITHOUT_ACS
00080 #include <asdmIDLC.h>
00081 using asdmIDL::FocusTableIDL;
00082 #endif
00083
00084 #include <Representable.h>
00085
00086 namespace asdm {
00087
00088
00089
00090
00091 class ASDM;
00092 class FocusRow;
00166 class FocusTable : public Representable {
00167 friend class ASDM;
00168
00169 public:
00170
00171
00177 static vector<string> getKeyName();
00178
00179
00180 virtual ~FocusTable();
00181
00187 ASDM &getContainer() const;
00188
00194 unsigned int size() ;
00195
00201 string getName() const;
00202
00208 static const vector<string>& getAttributesNames();
00209
00213 Entity getEntity() const;
00214
00219 void setEntity(Entity e);
00220
00228 string toXML() ;
00229
00230 #ifndef WITHOUT_ACS
00231
00237 FocusTableIDL *toIDL() ;
00238 #endif
00239
00240 #ifndef WITHOUT_ACS
00241
00247 void fromIDL(FocusTableIDL x) ;
00248 #endif
00249
00250
00251
00252
00253
00258 FocusRow *newRow();
00259
00260
00276 FocusRow *newRow(Tag antennaId, ArrayTimeInterval timeInterval, bool focusTracking, vector<Length > focusOffset, int focusModelId);
00277
00278
00279
00292 FocusRow *newRow(FocusRow *row);
00293
00294
00295
00296
00297
00298
00315 FocusRow* add(FocusRow* x) ;
00316
00317
00318
00319
00320
00321
00322
00323
00324
00330 vector<FocusRow *> get() ;
00331
00332
00340 vector <FocusRow*> *getByContext(Tag antennaId);
00341
00342
00343
00344
00345
00357 FocusRow* getRowByKey(Tag antennaId, ArrayTimeInterval timeInterval);
00358
00359
00360
00361
00362
00380 FocusRow* lookup(Tag antennaId, ArrayTimeInterval timeInterval, bool focusTracking, vector<Length > focusOffset, int focusModelId);
00381
00382
00383 private:
00384
00393 FocusTable (ASDM & container);
00394
00395 ASDM & container;
00396
00397 bool archiveAsBin;
00398 bool fileAsBin ;
00399
00400 Entity entity;
00401
00402
00403
00407 static string tableName;
00408
00412 static const vector<string> attributesNames;
00413
00417 static vector<string> initAttributesNames();
00418
00419
00423 static vector<string> key;
00424
00425
00433 FocusRow* checkAndAdd(FocusRow* x) ;
00434
00435
00436
00437
00445 FocusRow * insertByStartTime(FocusRow* x, vector<FocusRow* >& row);
00446
00447
00448
00449
00450
00451
00452 vector<FocusRow * > privateRows;
00453
00454
00455
00456
00457
00458
00459
00460
00461 typedef vector <FocusRow* > TIME_ROWS;
00462 map<string, TIME_ROWS > context;
00463
00468 string Key(Tag antennaId) ;
00469
00470
00471
00472
00478 void getByKeyNoAutoIncNoTime(vector <FocusRow*>& vin, vector <FocusRow*>& vout, Tag antennaId);
00479
00480
00481
00482 void error() ;
00483
00484
00491 void fromXML(string xmlDoc) ;
00492
00497 void setFromMIMEFile(const string& directory);
00498 void setFromXMLFile(const string& directory);
00499
00507 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00508
00509
00516 void setFromMIME(const string & mimeMsg);
00517
00521 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00522
00532 void toFile(string directory);
00533
00542 void setFromFile(const string& directory);
00543
00544 };
00545
00546 }
00547
00548 #endif