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 StationRow.h 00032 */ 00033 00034 #ifndef StationRow_CLASS 00035 #define StationRow_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 <ArrayTime.h> 00052 00053 00054 00055 #include <Tag.h> 00056 00057 00058 00059 #include <Length.h> 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 #include "CStationType.h" 00073 00074 00075 00076 00077 00078 00079 #include <ConversionException.h> 00080 #include <NoSuchRow.h> 00081 #include <IllegalAccessException.h> 00082 00083 #include <RowTransformer.h> 00084 //#include <TableStreamReader.h> 00085 00086 /*\file Station.h 00087 \brief Generated from model's revision "1.61", branch "HEAD" 00088 */ 00089 00090 namespace asdm { 00091 00092 //class asdm::StationTable; 00093 00094 00095 00096 class StationRow; 00097 typedef void (StationRow::*StationAttributeFromBin) (EndianIStream& eis); 00098 typedef void (StationRow::*StationAttributeFromText) (const string& s); 00099 00106 class StationRow { 00107 friend class asdm::StationTable; 00108 friend class asdm::RowTransformer<StationRow>; 00109 //friend class asdm::TableStreamReader<StationTable, StationRow>; 00110 00111 public: 00112 00113 virtual ~StationRow(); 00114 00118 StationTable &getTable() const; 00119 00124 bool isAdded() const; 00125 00127 // Intrinsic Table Attributes // 00129 00130 00131 // ===> Attribute stationId 00132 00133 00134 00135 00136 00141 Tag getStationId() const; 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 // ===> Attribute name 00152 00153 00154 00155 00156 00161 string getName() const; 00162 00163 00164 00165 00173 void setName (string name); 00174 00175 00176 00177 00178 00179 00180 00181 // ===> Attribute position 00182 00183 00184 00185 00186 00191 vector<Length > getPosition() const; 00192 00193 00194 00195 00203 void setPosition (vector<Length > position); 00204 00205 00206 00207 00208 00209 00210 00211 // ===> Attribute type 00212 00213 00214 00215 00216 00221 StationTypeMod::StationType getType() const; 00222 00223 00224 00225 00233 void setType (StationTypeMod::StationType type); 00234 00235 00236 00237 00238 00239 00240 00241 // ===> Attribute time, which is optional 00242 00243 00244 00249 bool isTimeExists() const; 00250 00251 00252 00258 ArrayTime getTime() const; 00259 00260 00261 00262 00269 void setTime (ArrayTime time); 00270 00271 00272 00273 00277 void clearTime (); 00278 00279 00280 00282 // Extrinsic Table Attributes // 00284 00286 // Links // 00288 00289 00290 00291 00303 bool compareNoAutoInc(string name, vector<Length > position, StationTypeMod::StationType type); 00304 00305 00306 00307 00319 bool compareRequiredValue(string name, vector<Length > position, StationTypeMod::StationType type); 00320 00321 00330 bool equalByRequiredValue(StationRow* x) ; 00331 00332 #ifndef WITHOUT_ACS 00333 00337 asdmIDL::StationRowIDL *toIDL() const; 00338 #endif 00339 00340 #ifndef WITHOUT_ACS 00341 00346 void setFromIDL (asdmIDL::StationRowIDL x) ; 00347 #endif 00348 00353 std::string toXML() const; 00354 00361 void setFromXML (std::string rowDoc) ; 00362 00365 // binary-deserialization material from an EndianIStream // 00367 00368 std::map<std::string, StationAttributeFromBin> fromBinMethods; 00369 void stationIdFromBin( EndianIStream& eis); 00370 void nameFromBin( EndianIStream& eis); 00371 void positionFromBin( EndianIStream& eis); 00372 void typeFromBin( EndianIStream& eis); 00373 00374 void timeFromBin( EndianIStream& eis); 00375 00376 00384 static StationRow* fromBin(EndianIStream& eis, StationTable& table, const std::vector<std::string>& attributesSeq); 00386 00387 private: 00391 StationTable &table; 00395 bool hasBeenAdded; 00396 00397 // This method is used by the Table class when this row is added to the table. 00398 void isAdded(bool added); 00399 00400 00409 StationRow (StationTable &table); 00410 00428 StationRow (StationTable &table, StationRow &row); 00429 00431 // Intrinsic Table Attributes // 00433 00434 00435 // ===> Attribute stationId 00436 00437 00438 00439 Tag stationId; 00440 00441 00442 00443 00453 void setStationId (Tag stationId); 00454 00455 00456 00457 00458 // ===> Attribute name 00459 00460 00461 00462 string name; 00463 00464 00465 00466 00467 00468 00469 // ===> Attribute position 00470 00471 00472 00473 vector<Length > position; 00474 00475 00476 00477 00478 00479 00480 // ===> Attribute type 00481 00482 00483 00484 StationTypeMod::StationType type; 00485 00486 00487 00488 00489 00490 00491 // ===> Attribute time, which is optional 00492 00493 00494 bool timeExists; 00495 00496 00497 ArrayTime time; 00498 00499 00500 00501 00502 00504 // Extrinsic Table Attributes // 00506 00508 // Links // 00510 00511 00512 /* 00514 // binary-deserialization material from an EndianIStream // 00516 std::map<std::string, StationAttributeFromBin> fromBinMethods; 00517 void stationIdFromBin( EndianIStream& eis); 00518 void nameFromBin( EndianIStream& eis); 00519 void positionFromBin( EndianIStream& eis); 00520 void typeFromBin( EndianIStream& eis); 00521 00522 void timeFromBin( EndianIStream& eis); 00523 00524 */ 00525 00527 // text-deserialization material // 00529 std::map<std::string, StationAttributeFromText> fromTextMethods; 00530 00531 void stationIdFromText (const string & s); 00532 00533 00534 void nameFromText (const string & s); 00535 00536 00537 void positionFromText (const string & s); 00538 00539 00540 void typeFromText (const string & s); 00541 00542 00543 00544 void timeFromText (const string & s); 00545 00546 00547 00548 void fromText(const std::string& attributeName, const std::string& t); 00549 00554 void toBin(EndianOSStream& eoss); 00555 00565 }; 00566 00567 } // End namespace asdm 00568 00569 #endif /* Station_CLASS */