casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
HistoryRow.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 HistoryRow.h
00032  */
00033  
00034 #ifndef HistoryRow_CLASS
00035 #define HistoryRow_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 <ArrayTime.h>
00052         
00053 
00054          
00055 #include <Tag.h>
00056         
00057 
00058 
00059 
00060 
00061         
00062 
00063         
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077 
00078 
00079 #include <ConversionException.h>
00080 #include <NoSuchRow.h>
00081 #include <IllegalAccessException.h>
00082 
00083 #include <RowTransformer.h>
00084 //#include <TableStreamReader.h>
00085 
00086 /*\file History.h
00087     \brief Generated from model's revision "1.64", branch "HEAD"
00088 */
00089 
00090 namespace asdm {
00091 
00092 //class asdm::HistoryTable;
00093 
00094 
00095 // class asdm::ExecBlockRow;
00096 class ExecBlockRow;
00097         
00098 
00099 class HistoryRow;
00100 typedef void (HistoryRow::*HistoryAttributeFromBin) (EndianIStream& eis);
00101 typedef void (HistoryRow::*HistoryAttributeFromText) (const string& s);
00102 
00109 class HistoryRow {
00110 friend class asdm::HistoryTable;
00111 friend class asdm::RowTransformer<HistoryRow>;
00112 //friend class asdm::TableStreamReader<HistoryTable, HistoryRow>;
00113 
00114 public:
00115 
00116         virtual ~HistoryRow();
00117 
00121         HistoryTable &getTable() const;
00122         
00127         bool isAdded() const;
00128                 
00130         // Intrinsic Table Attributes //
00132         
00133         
00134         // ===> Attribute time
00135         
00136         
00137         
00138 
00139         
00144         ArrayTime getTime() const;
00145         
00146  
00147         
00148         
00158         void setTime (ArrayTime time);
00159                 
00160         
00161         
00162         
00163 
00164 
00165         
00166         // ===> Attribute message
00167         
00168         
00169         
00170 
00171         
00176         string getMessage() const;
00177         
00178  
00179         
00180         
00188         void setMessage (string message);
00189                 
00190         
00191         
00192         
00193 
00194 
00195         
00196         // ===> Attribute priority
00197         
00198         
00199         
00200 
00201         
00206         string getPriority() const;
00207         
00208  
00209         
00210         
00218         void setPriority (string priority);
00219                 
00220         
00221         
00222         
00223 
00224 
00225         
00226         // ===> Attribute origin
00227         
00228         
00229         
00230 
00231         
00236         string getOrigin() const;
00237         
00238  
00239         
00240         
00248         void setOrigin (string origin);
00249                 
00250         
00251         
00252         
00253 
00254 
00255         
00256         // ===> Attribute objectId
00257         
00258         
00259         
00260 
00261         
00266         string getObjectId() const;
00267         
00268  
00269         
00270         
00278         void setObjectId (string objectId);
00279                 
00280         
00281         
00282         
00283 
00284 
00285         
00286         // ===> Attribute application
00287         
00288         
00289         
00290 
00291         
00296         string getApplication() const;
00297         
00298  
00299         
00300         
00308         void setApplication (string application);
00309                 
00310         
00311         
00312         
00313 
00314 
00315         
00316         // ===> Attribute cliCommand
00317         
00318         
00319         
00320 
00321         
00326         string getCliCommand() const;
00327         
00328  
00329         
00330         
00338         void setCliCommand (string cliCommand);
00339                 
00340         
00341         
00342         
00343 
00344 
00345         
00346         // ===> Attribute appParms
00347         
00348         
00349         
00350 
00351         
00356         string getAppParms() const;
00357         
00358  
00359         
00360         
00368         void setAppParms (string appParms);
00369                 
00370         
00371         
00372         
00373 
00374 
00376         // Extrinsic Table Attributes //
00378         
00379         
00380         // ===> Attribute execBlockId
00381         
00382         
00383         
00384 
00385         
00390         Tag getExecBlockId() const;
00391         
00392  
00393         
00394         
00404         void setExecBlockId (Tag execBlockId);
00405                 
00406         
00407         
00408         
00409 
00410 
00412         // Links //
00414         
00415         
00416 
00417         
00418                 
00425          ExecBlockRow* getExecBlockUsingExecBlockId();
00426          
00427 
00428         
00429 
00430         
00431         
00432         
00456         bool compareNoAutoInc(Tag execBlockId, ArrayTime time, string message, string priority, string origin, string objectId, string application, string cliCommand, string appParms);
00457         
00458         
00459 
00460         
00480         bool compareRequiredValue(string message, string priority, string origin, string objectId, string application, string cliCommand, string appParms); 
00481                  
00482         
00491         bool equalByRequiredValue(HistoryRow* x) ;
00492         
00493 #ifndef WITHOUT_ACS
00494 
00498         asdmIDL::HistoryRowIDL *toIDL() const;
00499         
00507          void toIDL(asdmIDL::HistoryRowIDL& x) const;
00508 #endif
00509         
00510 #ifndef WITHOUT_ACS
00511 
00516         void setFromIDL (asdmIDL::HistoryRowIDL x) ;
00517 #endif
00518         
00523         std::string toXML() const;
00524 
00531         void setFromXML (std::string rowDoc) ;
00532 
00535         // binary-deserialization material from an EndianIStream  //
00537 
00538         std::map<std::string, HistoryAttributeFromBin> fromBinMethods;
00539 void execBlockIdFromBin( EndianIStream& eis);
00540 void timeFromBin( EndianIStream& eis);
00541 void messageFromBin( EndianIStream& eis);
00542 void priorityFromBin( EndianIStream& eis);
00543 void originFromBin( EndianIStream& eis);
00544 void objectIdFromBin( EndianIStream& eis);
00545 void applicationFromBin( EndianIStream& eis);
00546 void cliCommandFromBin( EndianIStream& eis);
00547 void appParmsFromBin( EndianIStream& eis);
00548 
00549         
00550 
00558          static HistoryRow* fromBin(EndianIStream& eis, HistoryTable& table, const std::vector<std::string>& attributesSeq);     
00559  
00566          void fromText(const std::string& attributeName, const std::string&  t);
00568 
00569 private:
00573         HistoryTable &table;
00577         bool hasBeenAdded;
00578 
00579         // This method is used by the Table class when this row is added to the table.
00580         void isAdded(bool added);
00581 
00582 
00591         HistoryRow (HistoryTable &table);
00592 
00610          HistoryRow (HistoryTable &table, HistoryRow &row);
00611                 
00613         // Intrinsic Table Attributes //
00615         
00616         
00617         // ===> Attribute time
00618         
00619         
00620 
00621         ArrayTime time;
00622 
00623         
00624         
00625         
00626 
00627         
00628         // ===> Attribute message
00629         
00630         
00631 
00632         string message;
00633 
00634         
00635         
00636         
00637 
00638         
00639         // ===> Attribute priority
00640         
00641         
00642 
00643         string priority;
00644 
00645         
00646         
00647         
00648 
00649         
00650         // ===> Attribute origin
00651         
00652         
00653 
00654         string origin;
00655 
00656         
00657         
00658         
00659 
00660         
00661         // ===> Attribute objectId
00662         
00663         
00664 
00665         string objectId;
00666 
00667         
00668         
00669         
00670 
00671         
00672         // ===> Attribute application
00673         
00674         
00675 
00676         string application;
00677 
00678         
00679         
00680         
00681 
00682         
00683         // ===> Attribute cliCommand
00684         
00685         
00686 
00687         string cliCommand;
00688 
00689         
00690         
00691         
00692 
00693         
00694         // ===> Attribute appParms
00695         
00696         
00697 
00698         string appParms;
00699 
00700         
00701         
00702         
00703 
00705         // Extrinsic Table Attributes //
00707         
00708         
00709         // ===> Attribute execBlockId
00710         
00711         
00712 
00713         Tag execBlockId;
00714 
00715         
00716         
00717         
00718 
00720         // Links //
00722         
00723         
00724                 
00725 
00726          
00727 
00728         
00729 
00730         
00731 /*
00733         // binary-deserialization material from an EndianIStream  //
00735         std::map<std::string, HistoryAttributeFromBin> fromBinMethods;
00736 void execBlockIdFromBin( EndianIStream& eis);
00737 void timeFromBin( EndianIStream& eis);
00738 void messageFromBin( EndianIStream& eis);
00739 void priorityFromBin( EndianIStream& eis);
00740 void originFromBin( EndianIStream& eis);
00741 void objectIdFromBin( EndianIStream& eis);
00742 void applicationFromBin( EndianIStream& eis);
00743 void cliCommandFromBin( EndianIStream& eis);
00744 void appParmsFromBin( EndianIStream& eis);
00745 
00746         
00747 */
00748         
00750         // text-deserialization material //
00752         std::map<std::string, HistoryAttributeFromText> fromTextMethods;
00753         
00754 void execBlockIdFromText (const string & s);
00755         
00756         
00757 void timeFromText (const string & s);
00758         
00759         
00760 void messageFromText (const string & s);
00761         
00762         
00763 void priorityFromText (const string & s);
00764         
00765         
00766 void originFromText (const string & s);
00767         
00768         
00769 void objectIdFromText (const string & s);
00770         
00771         
00772 void applicationFromText (const string & s);
00773         
00774         
00775 void cliCommandFromText (const string & s);
00776         
00777         
00778 void appParmsFromText (const string & s);
00779         
00780 
00781                 
00782         
00787          void toBin(EndianOSStream& eoss);
00788                  
00798 };
00799 
00800 } // End namespace asdm
00801 
00802 #endif /* History_CLASS */