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 AntennaTable_CLASS
00035 #define AntennaTable_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 <ArrayTime.h>
00048 using asdm::ArrayTime;
00049
00050 #include <Tag.h>
00051 using asdm::Tag;
00052
00053 #include <Length.h>
00054 using asdm::Length;
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #include "CAntennaMake.h"
00065 using namespace AntennaMakeMod;
00066
00067
00068
00069 #include "CAntennaType.h"
00070 using namespace AntennaTypeMod;
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 #include <ConversionException.h>
00084 #include <DuplicateKey.h>
00085 #include <UniquenessViolationException.h>
00086 #include <NoSuchRow.h>
00087 #include <DuplicateKey.h>
00088 using asdm::DuplicateKey;
00089 using asdm::ConversionException;
00090 using asdm::NoSuchRow;
00091 using asdm::DuplicateKey;
00092
00093 #ifndef WITHOUT_ACS
00094 #include <asdmIDLC.h>
00095 using asdmIDL::AntennaTableIDL;
00096 #endif
00097
00098 #include <Representable.h>
00099
00100 namespace asdm {
00101
00102
00103
00104
00105 class ASDM;
00106 class AntennaRow;
00206 class AntennaTable : public Representable {
00207 friend class ASDM;
00208
00209 public:
00210
00211
00217 static vector<string> getKeyName();
00218
00219
00220 virtual ~AntennaTable();
00221
00227 ASDM &getContainer() const;
00228
00234 unsigned int size() ;
00235
00241 string getName() const;
00242
00248 static const vector<string>& getAttributesNames();
00249
00253 Entity getEntity() const;
00254
00259 void setEntity(Entity e);
00260
00268 string toXML() ;
00269
00270 #ifndef WITHOUT_ACS
00271
00277 AntennaTableIDL *toIDL() ;
00278 #endif
00279
00280 #ifndef WITHOUT_ACS
00281
00287 void fromIDL(AntennaTableIDL x) ;
00288 #endif
00289
00290
00291
00292
00293
00298 AntennaRow *newRow();
00299
00300
00322 AntennaRow *newRow(string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, vector<Length > position, vector<Length > offset, ArrayTime time, Tag stationId);
00323
00324
00325
00338 AntennaRow *newRow(AntennaRow *row);
00339
00340
00341
00342
00343
00344
00345
00346
00356 AntennaRow* add(AntennaRow* x) ;
00357
00358
00359
00360
00361
00362
00363
00369 vector<AntennaRow *> get() ;
00370
00371
00372
00373
00374
00384 AntennaRow* getRowByKey(Tag antennaId);
00385
00386
00387
00388
00389
00413 AntennaRow* lookup(string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, vector<Length > position, vector<Length > offset, ArrayTime time, Tag stationId);
00414
00415
00416 private:
00417
00426 AntennaTable (ASDM & container);
00427
00428 ASDM & container;
00429
00430 bool archiveAsBin;
00431 bool fileAsBin ;
00432
00433 Entity entity;
00434
00435
00436
00437 map<string,int> noAutoIncIds;
00438 void autoIncrement(string key, AntennaRow* x);
00439
00440
00444 static string tableName;
00445
00449 static const vector<string> attributesNames;
00450
00454 static vector<string> initAttributesNames();
00455
00456
00460 static vector<string> key;
00461
00462
00472 AntennaRow* checkAndAdd(AntennaRow* x) ;
00473
00474
00475
00476
00477
00478
00479 vector<AntennaRow * > privateRows;
00480
00481
00482
00483 vector<AntennaRow *> row;
00484
00485
00486 void error() ;
00487
00488
00495 void fromXML(string xmlDoc) ;
00496
00501 void setFromMIMEFile(const string& directory);
00502 void setFromXMLFile(const string& directory);
00503
00511 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00512
00513
00520 void setFromMIME(const string & mimeMsg);
00521
00525 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00526
00536 void toFile(string directory);
00537
00546 void setFromFile(const string& directory);
00547
00548 };
00549
00550 }
00551
00552 #endif