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 FlagCmdRow.h 00032 */ 00033 00034 #ifndef FlagCmdRow_CLASS 00035 #define FlagCmdRow_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 <ArrayTimeInterval.h> 00052 00053 00054 00055 00056 00057 00058 00059 00060 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 FlagCmd.h 00081 \brief Generated from model's revision "1.64", branch "HEAD" 00082 */ 00083 00084 namespace asdm { 00085 00086 //class asdm::FlagCmdTable; 00087 00088 00089 00090 class FlagCmdRow; 00091 typedef void (FlagCmdRow::*FlagCmdAttributeFromBin) (EndianIStream& eis); 00092 typedef void (FlagCmdRow::*FlagCmdAttributeFromText) (const string& s); 00093 00100 class FlagCmdRow { 00101 friend class asdm::FlagCmdTable; 00102 friend class asdm::RowTransformer<FlagCmdRow>; 00103 //friend class asdm::TableStreamReader<FlagCmdTable, FlagCmdRow>; 00104 00105 public: 00106 00107 virtual ~FlagCmdRow(); 00108 00112 FlagCmdTable &getTable() const; 00113 00118 bool isAdded() const; 00119 00121 // Intrinsic Table Attributes // 00123 00124 00125 // ===> Attribute timeInterval 00126 00127 00128 00129 00130 00135 ArrayTimeInterval getTimeInterval() const; 00136 00137 00138 00139 00149 void setTimeInterval (ArrayTimeInterval timeInterval); 00150 00151 00152 00153 00154 00155 00156 00157 // ===> Attribute type 00158 00159 00160 00161 00162 00167 string getType() const; 00168 00169 00170 00171 00179 void setType (string type); 00180 00181 00182 00183 00184 00185 00186 00187 // ===> Attribute reason 00188 00189 00190 00191 00192 00197 string getReason() const; 00198 00199 00200 00201 00209 void setReason (string reason); 00210 00211 00212 00213 00214 00215 00216 00217 // ===> Attribute level 00218 00219 00220 00221 00222 00227 int getLevel() const; 00228 00229 00230 00231 00239 void setLevel (int level); 00240 00241 00242 00243 00244 00245 00246 00247 // ===> Attribute severity 00248 00249 00250 00251 00252 00257 int getSeverity() const; 00258 00259 00260 00261 00269 void setSeverity (int severity); 00270 00271 00272 00273 00274 00275 00276 00277 // ===> Attribute applied 00278 00279 00280 00281 00282 00287 bool getApplied() const; 00288 00289 00290 00291 00299 void setApplied (bool applied); 00300 00301 00302 00303 00304 00305 00306 00307 // ===> Attribute command 00308 00309 00310 00311 00312 00317 string getCommand() const; 00318 00319 00320 00321 00329 void setCommand (string command); 00330 00331 00332 00333 00334 00335 00337 // Extrinsic Table Attributes // 00339 00341 // Links // 00343 00344 00345 00346 00366 bool compareNoAutoInc(ArrayTimeInterval timeInterval, string type, string reason, int level, int severity, bool applied, string command); 00367 00368 00369 00370 00388 bool compareRequiredValue(string type, string reason, int level, int severity, bool applied, string command); 00389 00390 00399 bool equalByRequiredValue(FlagCmdRow* x) ; 00400 00401 #ifndef WITHOUT_ACS 00402 00406 asdmIDL::FlagCmdRowIDL *toIDL() const; 00407 00415 void toIDL(asdmIDL::FlagCmdRowIDL& x) const; 00416 #endif 00417 00418 #ifndef WITHOUT_ACS 00419 00424 void setFromIDL (asdmIDL::FlagCmdRowIDL x) ; 00425 #endif 00426 00431 std::string toXML() const; 00432 00439 void setFromXML (std::string rowDoc) ; 00440 00443 // binary-deserialization material from an EndianIStream // 00445 00446 std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods; 00447 void timeIntervalFromBin( EndianIStream& eis); 00448 void typeFromBin( EndianIStream& eis); 00449 void reasonFromBin( EndianIStream& eis); 00450 void levelFromBin( EndianIStream& eis); 00451 void severityFromBin( EndianIStream& eis); 00452 void appliedFromBin( EndianIStream& eis); 00453 void commandFromBin( EndianIStream& eis); 00454 00455 00456 00464 static FlagCmdRow* fromBin(EndianIStream& eis, FlagCmdTable& table, const std::vector<std::string>& attributesSeq); 00465 00472 void fromText(const std::string& attributeName, const std::string& t); 00474 00475 private: 00479 FlagCmdTable &table; 00483 bool hasBeenAdded; 00484 00485 // This method is used by the Table class when this row is added to the table. 00486 void isAdded(bool added); 00487 00488 00497 FlagCmdRow (FlagCmdTable &table); 00498 00516 FlagCmdRow (FlagCmdTable &table, FlagCmdRow &row); 00517 00519 // Intrinsic Table Attributes // 00521 00522 00523 // ===> Attribute timeInterval 00524 00525 00526 00527 ArrayTimeInterval timeInterval; 00528 00529 00530 00531 00532 00533 00534 // ===> Attribute type 00535 00536 00537 00538 string type; 00539 00540 00541 00542 00543 00544 00545 // ===> Attribute reason 00546 00547 00548 00549 string reason; 00550 00551 00552 00553 00554 00555 00556 // ===> Attribute level 00557 00558 00559 00560 int level; 00561 00562 00563 00564 00565 00566 00567 // ===> Attribute severity 00568 00569 00570 00571 int severity; 00572 00573 00574 00575 00576 00577 00578 // ===> Attribute applied 00579 00580 00581 00582 bool applied; 00583 00584 00585 00586 00587 00588 00589 // ===> Attribute command 00590 00591 00592 00593 string command; 00594 00595 00596 00597 00598 00600 // Extrinsic Table Attributes // 00602 00604 // Links // 00606 00607 00608 /* 00610 // binary-deserialization material from an EndianIStream // 00612 std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods; 00613 void timeIntervalFromBin( EndianIStream& eis); 00614 void typeFromBin( EndianIStream& eis); 00615 void reasonFromBin( EndianIStream& eis); 00616 void levelFromBin( EndianIStream& eis); 00617 void severityFromBin( EndianIStream& eis); 00618 void appliedFromBin( EndianIStream& eis); 00619 void commandFromBin( EndianIStream& eis); 00620 00621 00622 */ 00623 00625 // text-deserialization material // 00627 std::map<std::string, FlagCmdAttributeFromText> fromTextMethods; 00628 00629 void timeIntervalFromText (const string & s); 00630 00631 00632 void typeFromText (const string & s); 00633 00634 00635 void reasonFromText (const string & s); 00636 00637 00638 void levelFromText (const string & s); 00639 00640 00641 void severityFromText (const string & s); 00642 00643 00644 void appliedFromText (const string & s); 00645 00646 00647 void commandFromText (const string & s); 00648 00649 00650 00651 00656 void toBin(EndianOSStream& eoss); 00657 00667 }; 00668 00669 } // End namespace asdm 00670 00671 #endif /* FlagCmd_CLASS */