casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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.61", 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);     
00457 
00458 private:
00462         FlagCmdTable &table;
00466         bool hasBeenAdded;
00467 
00468         // This method is used by the Table class when this row is added to the table.
00469         void isAdded(bool added);
00470 
00471 
00480         FlagCmdRow (FlagCmdTable &table);
00481 
00499          FlagCmdRow (FlagCmdTable &table, FlagCmdRow &row);
00500                 
00502         // Intrinsic Table Attributes //
00504         
00505         
00506         // ===> Attribute timeInterval
00507         
00508         
00509 
00510         ArrayTimeInterval timeInterval;
00511 
00512         
00513         
00514         
00515 
00516         
00517         // ===> Attribute type
00518         
00519         
00520 
00521         string type;
00522 
00523         
00524         
00525         
00526 
00527         
00528         // ===> Attribute reason
00529         
00530         
00531 
00532         string reason;
00533 
00534         
00535         
00536         
00537 
00538         
00539         // ===> Attribute level
00540         
00541         
00542 
00543         int level;
00544 
00545         
00546         
00547         
00548 
00549         
00550         // ===> Attribute severity
00551         
00552         
00553 
00554         int severity;
00555 
00556         
00557         
00558         
00559 
00560         
00561         // ===> Attribute applied
00562         
00563         
00564 
00565         bool applied;
00566 
00567         
00568         
00569         
00570 
00571         
00572         // ===> Attribute command
00573         
00574         
00575 
00576         string command;
00577 
00578         
00579         
00580         
00581 
00583         // Extrinsic Table Attributes //
00585         
00587         // Links //
00589         
00590         
00591 /*
00593         // binary-deserialization material from an EndianIStream  //
00595         std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods;
00596 void timeIntervalFromBin( EndianIStream& eis);
00597 void typeFromBin( EndianIStream& eis);
00598 void reasonFromBin( EndianIStream& eis);
00599 void levelFromBin( EndianIStream& eis);
00600 void severityFromBin( EndianIStream& eis);
00601 void appliedFromBin( EndianIStream& eis);
00602 void commandFromBin( EndianIStream& eis);
00603 
00604         
00605 */
00606         
00608         // text-deserialization material //
00610         std::map<std::string, FlagCmdAttributeFromText> fromTextMethods;
00611         
00612 void timeIntervalFromText (const string & s);
00613         
00614         
00615 void typeFromText (const string & s);
00616         
00617         
00618 void reasonFromText (const string & s);
00619         
00620         
00621 void levelFromText (const string & s);
00622         
00623         
00624 void severityFromText (const string & s);
00625         
00626         
00627 void appliedFromText (const string & s);
00628         
00629         
00630 void commandFromText (const string & s);
00631         
00632 
00633                 
00634         
00635         void fromText(const std::string& attributeName, const std::string&  t);
00636         
00641          void toBin(EndianOSStream& eoss);
00642                  
00652 };
00653 
00654 } // End namespace asdm
00655 
00656 #endif /* FlagCmd_CLASS */