DelayModelVariableParametersTable.h
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 DelayModelVariableParametersTable_CLASS
00035 #define DelayModelVariableParametersTable_CLASS
00036
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040
00041
00042
00043
00044 #include <ArrayTime.h>
00045
00046
00047
00048 #include <Angle.h>
00049
00050
00051
00052 #include <Tag.h>
00053
00054
00055
00056 #include <AngularRate.h>
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 #include "CDifferenceType.h"
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 #include "CDifferenceType.h"
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 #include <ConversionException.h>
00095 #include <DuplicateKey.h>
00096 #include <UniquenessViolationException.h>
00097 #include <NoSuchRow.h>
00098 #include <DuplicateKey.h>
00099
00100
00101 #ifndef WITHOUT_ACS
00102 #include <asdmIDLC.h>
00103 #endif
00104
00105 #include <Representable.h>
00106
00107 #include <pthread.h>
00108
00109 namespace asdm {
00110
00111
00112
00113
00114 class ASDM;
00115 class DelayModelVariableParametersRow;
00243 class DelayModelVariableParametersTable : public Representable {
00244 friend class ASDM;
00245
00246 public:
00247
00248
00254 static const std::vector<std::string>& getKeyName();
00255
00256
00257 virtual ~DelayModelVariableParametersTable();
00258
00264 ASDM &getContainer() const;
00265
00271 unsigned int size() const;
00272
00280 std::string getName() const;
00281
00289 static std::string name() ;
00290
00295 std::string getVersion() const ;
00296
00302 static const std::vector<std::string>& getAttributesNames();
00303
00309 static const std::vector<std::string>& defaultAttributesNamesInBin();
00310
00314 Entity getEntity() const;
00315
00320 void setEntity(Entity e);
00321
00329 std::string toXML() ;
00330
00331 #ifndef WITHOUT_ACS
00332
00338 asdmIDL::DelayModelVariableParametersTableIDL *toIDL() ;
00339
00347 void toIDL(asdmIDL::DelayModelVariableParametersTableIDL& x) const;
00348
00349 #endif
00350
00351 #ifndef WITHOUT_ACS
00352
00358 void fromIDL(asdmIDL::DelayModelVariableParametersTableIDL x) ;
00359 #endif
00360
00361
00362
00363
00364
00369 DelayModelVariableParametersRow *newRow();
00370
00371
00395 DelayModelVariableParametersRow *newRow(ArrayTime time, double ut1_utc, double iat_utc, DifferenceTypeMod::DifferenceType timeType, Angle gstAtUt0, AngularRate earthRotationRate, vector<double > polarOffsets, DifferenceTypeMod::DifferenceType polarOffsetsType, Tag delayModelFixedParametersId);
00396
00397
00398
00411 DelayModelVariableParametersRow *newRow(DelayModelVariableParametersRow *row);
00412
00413
00414
00415
00416
00417
00418
00419
00429 DelayModelVariableParametersRow* add(DelayModelVariableParametersRow* x) ;
00430
00431
00432
00433
00434
00435
00436
00442 std::vector<DelayModelVariableParametersRow *> get() ;
00443
00450 const std::vector<DelayModelVariableParametersRow *>& get() const ;
00451
00452
00453
00454
00455
00465 DelayModelVariableParametersRow* getRowByKey(Tag delayModelVariableParametersId);
00466
00467
00468
00469
00470
00496 DelayModelVariableParametersRow* lookup(ArrayTime time, double ut1_utc, double iat_utc, DifferenceTypeMod::DifferenceType timeType, Angle gstAtUt0, AngularRate earthRotationRate, vector<double > polarOffsets, DifferenceTypeMod::DifferenceType polarOffsetsType, Tag delayModelFixedParametersId);
00497
00498
00499 void setUnknownAttributeBinaryReader(const std::string& attributeName, BinaryAttributeReaderFunctor* barFctr);
00500 BinaryAttributeReaderFunctor* getUnknownAttributeBinaryReader(const std::string& attributeName) const;
00501
00502 private:
00503
00512 DelayModelVariableParametersTable (ASDM & container);
00513
00514 ASDM & container;
00515
00516 bool archiveAsBin;
00517 bool fileAsBin ;
00518
00519 std::string version ;
00520
00521 Entity entity;
00522
00523
00524
00525
00526
00527
00528 std::map<std::string,int> noAutoIncIds;
00529 void autoIncrement(std::string key, DelayModelVariableParametersRow* x);
00530
00531
00541 DelayModelVariableParametersRow* checkAndAdd(DelayModelVariableParametersRow* x, bool skipCheckUniqueness=false) ;
00542
00548 void append(DelayModelVariableParametersRow* x) ;
00549
00555 void addWithoutCheckingUnique(DelayModelVariableParametersRow* x) ;
00556
00557
00558
00559
00560
00561
00562
00563
00564 std::vector<DelayModelVariableParametersRow * > privateRows;
00565
00566
00567
00568 std::vector<DelayModelVariableParametersRow *> row;
00569
00570
00571 void error() ;
00572
00573
00580 void fromXML(std::string& xmlDoc) ;
00581
00582 std::map<std::string, BinaryAttributeReaderFunctor *> unknownAttributes2Functors;
00583
00588 void setFromMIMEFile(const std::string& directory);
00589
00590
00591
00592 void setFromXMLFile(const std::string& directory);
00593
00601 std::string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00602
00603
00610 void setFromMIME(const std::string & mimeMsg);
00611
00615 std::string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00616
00626 void toFile(std::string directory);
00627
00631 bool loadInProgress;
00632 void checkPresenceInMemory() {
00633 if (!presentInMemory && !loadInProgress) {
00634 loadInProgress = true;
00635 setFromFile(getContainer().getDirectory());
00636 presentInMemory = true;
00637 loadInProgress = false;
00638 }
00639 }
00648 void setFromFile(const std::string& directory);
00649
00650 };
00651
00652 }
00653
00654 #endif