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 DopplerRow.h 00032 */ 00033 00034 #ifndef DopplerRow_CLASS 00035 #define DopplerRow_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 00052 00053 00054 00055 00056 00057 00058 #include "CDopplerReferenceCode.h" 00059 00060 00061 00062 00063 #include <ConversionException.h> 00064 #include <NoSuchRow.h> 00065 #include <IllegalAccessException.h> 00066 00067 #include <RowTransformer.h> 00068 //#include <TableStreamReader.h> 00069 00070 /*\file Doppler.h 00071 \brief Generated from model's revision "1.61", branch "HEAD" 00072 */ 00073 00074 namespace asdm { 00075 00076 //class asdm::DopplerTable; 00077 00078 00079 // class asdm::SourceRow; 00080 class SourceRow; 00081 00082 00083 class DopplerRow; 00084 typedef void (DopplerRow::*DopplerAttributeFromBin) (EndianIStream& eis); 00085 typedef void (DopplerRow::*DopplerAttributeFromText) (const string& s); 00086 00093 class DopplerRow { 00094 friend class asdm::DopplerTable; 00095 friend class asdm::RowTransformer<DopplerRow>; 00096 //friend class asdm::TableStreamReader<DopplerTable, DopplerRow>; 00097 00098 public: 00099 00100 virtual ~DopplerRow(); 00101 00105 DopplerTable &getTable() const; 00106 00111 bool isAdded() const; 00112 00114 // Intrinsic Table Attributes // 00116 00117 00118 // ===> Attribute dopplerId 00119 00120 00121 00122 00123 00128 int getDopplerId() const; 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 // ===> Attribute transitionIndex 00139 00140 00141 00142 00143 00148 int getTransitionIndex() const; 00149 00150 00151 00152 00160 void setTransitionIndex (int transitionIndex); 00161 00162 00163 00164 00165 00166 00167 00168 // ===> Attribute velDef 00169 00170 00171 00172 00173 00178 DopplerReferenceCodeMod::DopplerReferenceCode getVelDef() const; 00179 00180 00181 00182 00190 void setVelDef (DopplerReferenceCodeMod::DopplerReferenceCode velDef); 00191 00192 00193 00194 00195 00196 00198 // Extrinsic Table Attributes // 00200 00201 00202 // ===> Attribute sourceId 00203 00204 00205 00206 00207 00212 int getSourceId() const; 00213 00214 00215 00216 00226 void setSourceId (int sourceId); 00227 00228 00229 00230 00231 00232 00234 // Links // 00236 00237 00238 00239 00240 00241 // ===> Slice link from a row of Doppler table to a collection of row of Source table. 00242 00248 vector <SourceRow *> getSources(); 00249 00250 00251 00252 00253 00254 00255 00256 00268 bool compareNoAutoInc(int sourceId, int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef); 00269 00270 00271 00272 00282 bool compareRequiredValue(int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef); 00283 00284 00293 bool equalByRequiredValue(DopplerRow* x) ; 00294 00295 #ifndef WITHOUT_ACS 00296 00300 asdmIDL::DopplerRowIDL *toIDL() const; 00301 #endif 00302 00303 #ifndef WITHOUT_ACS 00304 00309 void setFromIDL (asdmIDL::DopplerRowIDL x) ; 00310 #endif 00311 00316 std::string toXML() const; 00317 00324 void setFromXML (std::string rowDoc) ; 00325 00328 // binary-deserialization material from an EndianIStream // 00330 00331 std::map<std::string, DopplerAttributeFromBin> fromBinMethods; 00332 void dopplerIdFromBin( EndianIStream& eis); 00333 void sourceIdFromBin( EndianIStream& eis); 00334 void transitionIndexFromBin( EndianIStream& eis); 00335 void velDefFromBin( EndianIStream& eis); 00336 00337 00338 00346 static DopplerRow* fromBin(EndianIStream& eis, DopplerTable& table, const std::vector<std::string>& attributesSeq); 00348 00349 private: 00353 DopplerTable &table; 00357 bool hasBeenAdded; 00358 00359 // This method is used by the Table class when this row is added to the table. 00360 void isAdded(bool added); 00361 00362 00371 DopplerRow (DopplerTable &table); 00372 00390 DopplerRow (DopplerTable &table, DopplerRow &row); 00391 00393 // Intrinsic Table Attributes // 00395 00396 00397 // ===> Attribute dopplerId 00398 00399 00400 00401 int dopplerId; 00402 00403 00404 00405 00415 void setDopplerId (int dopplerId); 00416 00417 00418 00419 00420 // ===> Attribute transitionIndex 00421 00422 00423 00424 int transitionIndex; 00425 00426 00427 00428 00429 00430 00431 // ===> Attribute velDef 00432 00433 00434 00435 DopplerReferenceCodeMod::DopplerReferenceCode velDef; 00436 00437 00438 00439 00440 00442 // Extrinsic Table Attributes // 00444 00445 00446 // ===> Attribute sourceId 00447 00448 00449 00450 int sourceId; 00451 00452 00453 00454 00455 00457 // Links // 00459 00460 00461 00462 00463 00464 00465 00466 00467 /* 00469 // binary-deserialization material from an EndianIStream // 00471 std::map<std::string, DopplerAttributeFromBin> fromBinMethods; 00472 void dopplerIdFromBin( EndianIStream& eis); 00473 void sourceIdFromBin( EndianIStream& eis); 00474 void transitionIndexFromBin( EndianIStream& eis); 00475 void velDefFromBin( EndianIStream& eis); 00476 00477 00478 */ 00479 00481 // text-deserialization material // 00483 std::map<std::string, DopplerAttributeFromText> fromTextMethods; 00484 00485 void dopplerIdFromText (const string & s); 00486 00487 00488 void sourceIdFromText (const string & s); 00489 00490 00491 void transitionIndexFromText (const string & s); 00492 00493 00494 void velDefFromText (const string & s); 00495 00496 00497 00498 00499 void fromText(const std::string& attributeName, const std::string& t); 00500 00505 void toBin(EndianOSStream& eoss); 00506 00516 }; 00517 00518 } // End namespace asdm 00519 00520 #endif /* Doppler_CLASS */