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 StateRow.h 00032 */ 00033 00034 #ifndef StateRow_CLASS 00035 #define StateRow_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 #include "CCalibrationDevice.h" 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 #include <ConversionException.h> 00074 #include <NoSuchRow.h> 00075 #include <IllegalAccessException.h> 00076 00077 #include <RowTransformer.h> 00078 //#include <TableStreamReader.h> 00079 00080 /*\file State.h 00081 \brief Generated from model's revision "1.64", branch "HEAD" 00082 */ 00083 00084 namespace asdm { 00085 00086 //class asdm::StateTable; 00087 00088 00089 00090 class StateRow; 00091 typedef void (StateRow::*StateAttributeFromBin) (EndianIStream& eis); 00092 typedef void (StateRow::*StateAttributeFromText) (const string& s); 00093 00100 class StateRow { 00101 friend class asdm::StateTable; 00102 friend class asdm::RowTransformer<StateRow>; 00103 //friend class asdm::TableStreamReader<StateTable, StateRow>; 00104 00105 public: 00106 00107 virtual ~StateRow(); 00108 00112 StateTable &getTable() const; 00113 00118 bool isAdded() const; 00119 00121 // Intrinsic Table Attributes // 00123 00124 00125 // ===> Attribute stateId 00126 00127 00128 00129 00130 00135 Tag getStateId() const; 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 // ===> Attribute calDeviceName 00146 00147 00148 00149 00150 00155 CalibrationDeviceMod::CalibrationDevice getCalDeviceName() const; 00156 00157 00158 00159 00167 void setCalDeviceName (CalibrationDeviceMod::CalibrationDevice calDeviceName); 00168 00169 00170 00171 00172 00173 00174 00175 // ===> Attribute sig 00176 00177 00178 00179 00180 00185 bool getSig() const; 00186 00187 00188 00189 00197 void setSig (bool sig); 00198 00199 00200 00201 00202 00203 00204 00205 // ===> Attribute ref 00206 00207 00208 00209 00210 00215 bool getRef() const; 00216 00217 00218 00219 00227 void setRef (bool ref); 00228 00229 00230 00231 00232 00233 00234 00235 // ===> Attribute onSky 00236 00237 00238 00239 00240 00245 bool getOnSky() const; 00246 00247 00248 00249 00257 void setOnSky (bool onSky); 00258 00259 00260 00261 00262 00263 00264 00265 // ===> Attribute weight, which is optional 00266 00267 00268 00273 bool isWeightExists() const; 00274 00275 00276 00282 float getWeight() const; 00283 00284 00285 00286 00293 void setWeight (float weight); 00294 00295 00296 00297 00301 void clearWeight (); 00302 00303 00304 00306 // Extrinsic Table Attributes // 00308 00310 // Links // 00312 00313 00314 00315 00329 bool compareNoAutoInc(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky); 00330 00331 00332 00333 00347 bool compareRequiredValue(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky); 00348 00349 00358 bool equalByRequiredValue(StateRow* x) ; 00359 00360 #ifndef WITHOUT_ACS 00361 00365 asdmIDL::StateRowIDL *toIDL() const; 00366 00374 void toIDL(asdmIDL::StateRowIDL& x) const; 00375 #endif 00376 00377 #ifndef WITHOUT_ACS 00378 00383 void setFromIDL (asdmIDL::StateRowIDL x) ; 00384 #endif 00385 00390 std::string toXML() const; 00391 00398 void setFromXML (std::string rowDoc) ; 00399 00402 // binary-deserialization material from an EndianIStream // 00404 00405 std::map<std::string, StateAttributeFromBin> fromBinMethods; 00406 void stateIdFromBin( EndianIStream& eis); 00407 void calDeviceNameFromBin( EndianIStream& eis); 00408 void sigFromBin( EndianIStream& eis); 00409 void refFromBin( EndianIStream& eis); 00410 void onSkyFromBin( EndianIStream& eis); 00411 00412 void weightFromBin( EndianIStream& eis); 00413 00414 00422 static StateRow* fromBin(EndianIStream& eis, StateTable& table, const std::vector<std::string>& attributesSeq); 00423 00430 void fromText(const std::string& attributeName, const std::string& t); 00432 00433 private: 00437 StateTable &table; 00441 bool hasBeenAdded; 00442 00443 // This method is used by the Table class when this row is added to the table. 00444 void isAdded(bool added); 00445 00446 00455 StateRow (StateTable &table); 00456 00474 StateRow (StateTable &table, StateRow &row); 00475 00477 // Intrinsic Table Attributes // 00479 00480 00481 // ===> Attribute stateId 00482 00483 00484 00485 Tag stateId; 00486 00487 00488 00489 00499 void setStateId (Tag stateId); 00500 00501 00502 00503 00504 // ===> Attribute calDeviceName 00505 00506 00507 00508 CalibrationDeviceMod::CalibrationDevice calDeviceName; 00509 00510 00511 00512 00513 00514 00515 // ===> Attribute sig 00516 00517 00518 00519 bool sig; 00520 00521 00522 00523 00524 00525 00526 // ===> Attribute ref 00527 00528 00529 00530 bool ref; 00531 00532 00533 00534 00535 00536 00537 // ===> Attribute onSky 00538 00539 00540 00541 bool onSky; 00542 00543 00544 00545 00546 00547 00548 // ===> Attribute weight, which is optional 00549 00550 00551 bool weightExists; 00552 00553 00554 float weight; 00555 00556 00557 00558 00559 00561 // Extrinsic Table Attributes // 00563 00565 // Links // 00567 00568 00569 /* 00571 // binary-deserialization material from an EndianIStream // 00573 std::map<std::string, StateAttributeFromBin> fromBinMethods; 00574 void stateIdFromBin( EndianIStream& eis); 00575 void calDeviceNameFromBin( EndianIStream& eis); 00576 void sigFromBin( EndianIStream& eis); 00577 void refFromBin( EndianIStream& eis); 00578 void onSkyFromBin( EndianIStream& eis); 00579 00580 void weightFromBin( EndianIStream& eis); 00581 00582 */ 00583 00585 // text-deserialization material // 00587 std::map<std::string, StateAttributeFromText> fromTextMethods; 00588 00589 void stateIdFromText (const string & s); 00590 00591 00592 void calDeviceNameFromText (const string & s); 00593 00594 00595 void sigFromText (const string & s); 00596 00597 00598 void refFromText (const string & s); 00599 00600 00601 void onSkyFromText (const string & s); 00602 00603 00604 00605 void weightFromText (const string & s); 00606 00607 00608 00613 void toBin(EndianOSStream& eoss); 00614 00624 }; 00625 00626 } // End namespace asdm 00627 00628 #endif /* State_CLASS */