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 HolographyTable_CLASS
00035 #define HolographyTable_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
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #include "CHolographyChannelType.h"
00066 using namespace HolographyChannelTypeMod;
00067
00068
00069
00070
00071 #include <ConversionException.h>
00072 #include <DuplicateKey.h>
00073 #include <UniquenessViolationException.h>
00074 #include <NoSuchRow.h>
00075 #include <DuplicateKey.h>
00076 using asdm::DuplicateKey;
00077 using asdm::ConversionException;
00078 using asdm::NoSuchRow;
00079 using asdm::DuplicateKey;
00080
00081 #ifndef WITHOUT_ACS
00082 #include <asdmIDLC.h>
00083 using asdmIDL::HolographyTableIDL;
00084 #endif
00085
00086 #include <Representable.h>
00087
00088 namespace asdm {
00089
00090
00091
00092
00093 class ASDM;
00094 class HolographyRow;
00156 class HolographyTable : public Representable {
00157 friend class ASDM;
00158
00159 public:
00160
00161
00167 static vector<string> getKeyName();
00168
00169
00170 virtual ~HolographyTable();
00171
00177 ASDM &getContainer() const;
00178
00184 unsigned int size() ;
00185
00191 string getName() const;
00192
00198 static const vector<string>& getAttributesNames();
00199
00203 Entity getEntity() const;
00204
00209 void setEntity(Entity e);
00210
00218 string toXML() ;
00219
00220 #ifndef WITHOUT_ACS
00221
00227 HolographyTableIDL *toIDL() ;
00228 #endif
00229
00230 #ifndef WITHOUT_ACS
00231
00237 void fromIDL(HolographyTableIDL x) ;
00238 #endif
00239
00240
00241
00242
00243
00248 HolographyRow *newRow();
00249
00250
00264 HolographyRow *newRow(Length distance, Length focus, int numCorr, vector<HolographyChannelTypeMod::HolographyChannelType > type);
00265
00266
00267
00280 HolographyRow *newRow(HolographyRow *row);
00281
00282
00283
00284
00285
00286
00287
00288
00298 HolographyRow* add(HolographyRow* x) ;
00299
00300
00301
00302
00303
00304
00305
00311 vector<HolographyRow *> get() ;
00312
00313
00314
00315
00316
00326 HolographyRow* getRowByKey(Tag holographyId);
00327
00328
00329
00330
00331
00347 HolographyRow* lookup(Length distance, Length focus, int numCorr, vector<HolographyChannelTypeMod::HolographyChannelType > type);
00348
00349
00350 private:
00351
00360 HolographyTable (ASDM & container);
00361
00362 ASDM & container;
00363
00364 bool archiveAsBin;
00365 bool fileAsBin ;
00366
00367 Entity entity;
00368
00369
00370
00371 map<string,int> noAutoIncIds;
00372 void autoIncrement(string key, HolographyRow* x);
00373
00374
00378 static string tableName;
00379
00383 static const vector<string> attributesNames;
00384
00388 static vector<string> initAttributesNames();
00389
00390
00394 static vector<string> key;
00395
00396
00406 HolographyRow* checkAndAdd(HolographyRow* x) ;
00407
00408
00409
00410
00411
00412
00413 vector<HolographyRow * > privateRows;
00414
00415
00416
00417 vector<HolographyRow *> row;
00418
00419
00420 void error() ;
00421
00422
00429 void fromXML(string xmlDoc) ;
00430
00435 void setFromMIMEFile(const string& directory);
00436 void setFromXMLFile(const string& directory);
00437
00445 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00446
00447
00454 void setFromMIME(const string & mimeMsg);
00455
00459 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00460
00470 void toFile(string directory);
00471
00480 void setFromFile(const string& directory);
00481
00482 };
00483
00484 }
00485
00486 #endif