casa
$Rev:20696$
|
00001 00002 /* 00003 * ALMA - Atacama Large Millimeter Array 00004 * (c) European Southern Observatory, 2002 00005 * (c) Associated Universities Inc., 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration), 00007 * Copyright by AUI (in the framework of the ALMA collaboration), 00008 * All rights reserved. 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY, without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00023 * MA 02111-1307 USA 00024 * 00025 * Warning! 00026 * -------------------------------------------------------------------- 00027 * | This is generated code! Do not modify this file. | 00028 * | If you do, all changes will be lost when the file is re-generated. | 00029 * -------------------------------------------------------------------- 00030 * 00031 * File DataDescriptionRow.h 00032 */ 00033 00034 #ifndef DataDescriptionRow_CLASS 00035 #define DataDescriptionRow_CLASS 00036 00037 #include <vector> 00038 #include <string> 00039 #include <set> 00040 00041 #ifndef WITHOUT_ACS 00042 #include <asdmIDLC.h> 00043 #endif 00044 00045 00046 00047 00048 00049 00050 00051 #include <Tag.h> 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 #include <ConversionException.h> 00062 #include <NoSuchRow.h> 00063 #include <IllegalAccessException.h> 00064 00065 #include <RowTransformer.h> 00066 //#include <TableStreamReader.h> 00067 00068 /*\file DataDescription.h 00069 \brief Generated from model's revision "1.62", branch "HEAD" 00070 */ 00071 00072 namespace asdm { 00073 00074 //class asdm::DataDescriptionTable; 00075 00076 00077 // class asdm::PolarizationRow; 00078 class PolarizationRow; 00079 00080 // class asdm::HolographyRow; 00081 class HolographyRow; 00082 00083 // class asdm::SpectralWindowRow; 00084 class SpectralWindowRow; 00085 00086 00087 class DataDescriptionRow; 00088 typedef void (DataDescriptionRow::*DataDescriptionAttributeFromBin) (EndianIStream& eis); 00089 typedef void (DataDescriptionRow::*DataDescriptionAttributeFromText) (const string& s); 00090 00097 class DataDescriptionRow { 00098 friend class asdm::DataDescriptionTable; 00099 friend class asdm::RowTransformer<DataDescriptionRow>; 00100 //friend class asdm::TableStreamReader<DataDescriptionTable, DataDescriptionRow>; 00101 00102 public: 00103 00104 virtual ~DataDescriptionRow(); 00105 00109 DataDescriptionTable &getTable() const; 00110 00115 bool isAdded() const; 00116 00118 // Intrinsic Table Attributes // 00120 00121 00122 // ===> Attribute dataDescriptionId 00123 00124 00125 00126 00127 00132 Tag getDataDescriptionId() const; 00133 00134 00135 00136 00137 00138 00139 00140 00142 // Extrinsic Table Attributes // 00144 00145 00146 // ===> Attribute polOrHoloId 00147 00148 00149 00150 00151 00156 Tag getPolOrHoloId() const; 00157 00158 00159 00160 00168 void setPolOrHoloId (Tag polOrHoloId); 00169 00170 00171 00172 00173 00174 00175 00176 // ===> Attribute spectralWindowId 00177 00178 00179 00180 00181 00186 Tag getSpectralWindowId() const; 00187 00188 00189 00190 00198 void setSpectralWindowId (Tag spectralWindowId); 00199 00200 00201 00202 00203 00204 00206 // Links // 00208 00209 00210 00216 PolarizationRow* getPolarizationUsingPolOrHoloId(); 00217 00223 HolographyRow* getHolographyUsingPolOrHoloId(); 00224 00225 00231 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId(); 00232 00233 00234 00235 00236 00237 00238 00248 bool compareNoAutoInc(Tag polOrHoloId, Tag spectralWindowId); 00249 00250 00251 00252 00262 bool compareRequiredValue(Tag polOrHoloId, Tag spectralWindowId); 00263 00264 00273 bool equalByRequiredValue(DataDescriptionRow* x) ; 00274 00275 #ifndef WITHOUT_ACS 00276 00280 asdmIDL::DataDescriptionRowIDL *toIDL() const; 00281 00289 void toIDL(asdmIDL::DataDescriptionRowIDL& x) const; 00290 #endif 00291 00292 #ifndef WITHOUT_ACS 00293 00298 void setFromIDL (asdmIDL::DataDescriptionRowIDL x) ; 00299 #endif 00300 00305 std::string toXML() const; 00306 00313 void setFromXML (std::string rowDoc) ; 00314 00317 // binary-deserialization material from an EndianIStream // 00319 00320 std::map<std::string, DataDescriptionAttributeFromBin> fromBinMethods; 00321 void dataDescriptionIdFromBin( EndianIStream& eis); 00322 void polOrHoloIdFromBin( EndianIStream& eis); 00323 void spectralWindowIdFromBin( EndianIStream& eis); 00324 00325 00326 00334 static DataDescriptionRow* fromBin(EndianIStream& eis, DataDescriptionTable& table, const std::vector<std::string>& attributesSeq); 00335 00342 void fromText(const std::string& attributeName, const std::string& t); 00344 00345 private: 00349 DataDescriptionTable &table; 00353 bool hasBeenAdded; 00354 00355 // This method is used by the Table class when this row is added to the table. 00356 void isAdded(bool added); 00357 00358 00367 DataDescriptionRow (DataDescriptionTable &table); 00368 00386 DataDescriptionRow (DataDescriptionTable &table, DataDescriptionRow &row); 00387 00389 // Intrinsic Table Attributes // 00391 00392 00393 // ===> Attribute dataDescriptionId 00394 00395 00396 00397 Tag dataDescriptionId; 00398 00399 00400 00401 00411 void setDataDescriptionId (Tag dataDescriptionId); 00412 00413 00414 00416 // Extrinsic Table Attributes // 00418 00419 00420 // ===> Attribute polOrHoloId 00421 00422 00423 00424 Tag polOrHoloId; 00425 00426 00427 00428 00429 00430 00431 // ===> Attribute spectralWindowId 00432 00433 00434 00435 Tag spectralWindowId; 00436 00437 00438 00439 00440 00442 // Links // 00444 00445 00446 00447 00448 00449 00450 00451 00452 00453 00454 00455 00456 00457 00458 00459 00460 /* 00462 // binary-deserialization material from an EndianIStream // 00464 std::map<std::string, DataDescriptionAttributeFromBin> fromBinMethods; 00465 void dataDescriptionIdFromBin( EndianIStream& eis); 00466 void polOrHoloIdFromBin( EndianIStream& eis); 00467 void spectralWindowIdFromBin( EndianIStream& eis); 00468 00469 00470 */ 00471 00473 // text-deserialization material // 00475 std::map<std::string, DataDescriptionAttributeFromText> fromTextMethods; 00476 00477 void dataDescriptionIdFromText (const string & s); 00478 00479 00480 void polOrHoloIdFromText (const string & s); 00481 00482 00483 void spectralWindowIdFromText (const string & s); 00484 00485 00486 00487 00492 void toBin(EndianOSStream& eoss); 00493 00503 }; 00504 00505 } // End namespace asdm 00506 00507 #endif /* DataDescription_CLASS */