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 ObservationRow.h 00032 */ 00033 00034 #ifndef ObservationRow_CLASS 00035 #define ObservationRow_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 Observation.h 00069 \brief Generated from model's revision "1.62", branch "HEAD" 00070 */ 00071 00072 namespace asdm { 00073 00074 //class asdm::ObservationTable; 00075 00076 00077 00078 class ObservationRow; 00079 typedef void (ObservationRow::*ObservationAttributeFromBin) (EndianIStream& eis); 00080 typedef void (ObservationRow::*ObservationAttributeFromText) (const string& s); 00081 00088 class ObservationRow { 00089 friend class asdm::ObservationTable; 00090 friend class asdm::RowTransformer<ObservationRow>; 00091 //friend class asdm::TableStreamReader<ObservationTable, ObservationRow>; 00092 00093 public: 00094 00095 virtual ~ObservationRow(); 00096 00100 ObservationTable &getTable() const; 00101 00106 bool isAdded() const; 00107 00109 // Intrinsic Table Attributes // 00111 00112 00113 // ===> Attribute observationId 00114 00115 00116 00117 00118 00123 Tag getObservationId() const; 00124 00125 00126 00127 00128 00129 00130 00131 00133 // Extrinsic Table Attributes // 00135 00137 // Links // 00139 00140 00141 00142 00143 00144 00145 00154 bool equalByRequiredValue(ObservationRow* x) ; 00155 00156 #ifndef WITHOUT_ACS 00157 00161 asdmIDL::ObservationRowIDL *toIDL() const; 00162 #endif 00163 00164 #ifndef WITHOUT_ACS 00165 00170 void setFromIDL (asdmIDL::ObservationRowIDL x) ; 00171 #endif 00172 00177 std::string toXML() const; 00178 00185 void setFromXML (std::string rowDoc) ; 00186 00189 // binary-deserialization material from an EndianIStream // 00191 00192 std::map<std::string, ObservationAttributeFromBin> fromBinMethods; 00193 void observationIdFromBin( EndianIStream& eis); 00194 00195 00196 00204 static ObservationRow* fromBin(EndianIStream& eis, ObservationTable& table, const std::vector<std::string>& attributesSeq); 00205 00212 void fromText(const std::string& attributeName, const std::string& t); 00214 00215 private: 00219 ObservationTable &table; 00223 bool hasBeenAdded; 00224 00225 // This method is used by the Table class when this row is added to the table. 00226 void isAdded(bool added); 00227 00228 00237 ObservationRow (ObservationTable &table); 00238 00256 ObservationRow (ObservationTable &table, ObservationRow &row); 00257 00259 // Intrinsic Table Attributes // 00261 00262 00263 // ===> Attribute observationId 00264 00265 00266 00267 Tag observationId; 00268 00269 00270 00271 00281 void setObservationId (Tag observationId); 00282 00283 00284 00286 // Extrinsic Table Attributes // 00288 00290 // Links // 00292 00293 00294 /* 00296 // binary-deserialization material from an EndianIStream // 00298 std::map<std::string, ObservationAttributeFromBin> fromBinMethods; 00299 void observationIdFromBin( EndianIStream& eis); 00300 00301 00302 */ 00303 00305 // text-deserialization material // 00307 std::map<std::string, ObservationAttributeFromText> fromTextMethods; 00308 00309 void observationIdFromText (const string & s); 00310 00311 00312 00313 00318 void toBin(EndianOSStream& eoss); 00319 00329 }; 00330 00331 } // End namespace asdm 00332 00333 #endif /* Observation_CLASS */