casa  $Rev:20696$
FlagCmdRow.h
Go to the documentation of this file.
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.62", 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 #endif
00408         
00409 #ifndef WITHOUT_ACS
00410 
00415         void setFromIDL (asdmIDL::FlagCmdRowIDL x) ;
00416 #endif
00417         
00422         std::string toXML() const;
00423 
00430         void setFromXML (std::string rowDoc) ;
00431 
00434         // binary-deserialization material from an EndianIStream  //
00436 
00437         std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods;
00438 void timeIntervalFromBin( EndianIStream& eis);
00439 void typeFromBin( EndianIStream& eis);
00440 void reasonFromBin( EndianIStream& eis);
00441 void levelFromBin( EndianIStream& eis);
00442 void severityFromBin( EndianIStream& eis);
00443 void appliedFromBin( EndianIStream& eis);
00444 void commandFromBin( EndianIStream& eis);
00445 
00446         
00447 
00455          static FlagCmdRow* fromBin(EndianIStream& eis, FlagCmdTable& table, const std::vector<std::string>& attributesSeq);     
00456  
00463          void fromText(const std::string& attributeName, const std::string&  t);
00465 
00466 private:
00470         FlagCmdTable &table;
00474         bool hasBeenAdded;
00475 
00476         // This method is used by the Table class when this row is added to the table.
00477         void isAdded(bool added);
00478 
00479 
00488         FlagCmdRow (FlagCmdTable &table);
00489 
00507          FlagCmdRow (FlagCmdTable &table, FlagCmdRow &row);
00508                 
00510         // Intrinsic Table Attributes //
00512         
00513         
00514         // ===> Attribute timeInterval
00515         
00516         
00517 
00518         ArrayTimeInterval timeInterval;
00519 
00520         
00521         
00522         
00523 
00524         
00525         // ===> Attribute type
00526         
00527         
00528 
00529         string type;
00530 
00531         
00532         
00533         
00534 
00535         
00536         // ===> Attribute reason
00537         
00538         
00539 
00540         string reason;
00541 
00542         
00543         
00544         
00545 
00546         
00547         // ===> Attribute level
00548         
00549         
00550 
00551         int level;
00552 
00553         
00554         
00555         
00556 
00557         
00558         // ===> Attribute severity
00559         
00560         
00561 
00562         int severity;
00563 
00564         
00565         
00566         
00567 
00568         
00569         // ===> Attribute applied
00570         
00571         
00572 
00573         bool applied;
00574 
00575         
00576         
00577         
00578 
00579         
00580         // ===> Attribute command
00581         
00582         
00583 
00584         string command;
00585 
00586         
00587         
00588         
00589 
00591         // Extrinsic Table Attributes //
00593         
00595         // Links //
00597         
00598         
00599 /*
00601         // binary-deserialization material from an EndianIStream  //
00603         std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods;
00604 void timeIntervalFromBin( EndianIStream& eis);
00605 void typeFromBin( EndianIStream& eis);
00606 void reasonFromBin( EndianIStream& eis);
00607 void levelFromBin( EndianIStream& eis);
00608 void severityFromBin( EndianIStream& eis);
00609 void appliedFromBin( EndianIStream& eis);
00610 void commandFromBin( EndianIStream& eis);
00611 
00612         
00613 */
00614         
00616         // text-deserialization material //
00618         std::map<std::string, FlagCmdAttributeFromText> fromTextMethods;
00619         
00620 void timeIntervalFromText (const string & s);
00621         
00622         
00623 void typeFromText (const string & s);
00624         
00625         
00626 void reasonFromText (const string & s);
00627         
00628         
00629 void levelFromText (const string & s);
00630         
00631         
00632 void severityFromText (const string & s);
00633         
00634         
00635 void appliedFromText (const string & s);
00636         
00637         
00638 void commandFromText (const string & s);
00639         
00640 
00641                 
00642         
00647          void toBin(EndianOSStream& eoss);
00648                  
00658 };
00659 
00660 } // End namespace asdm
00661 
00662 #endif /* FlagCmd_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines