casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MainRow.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 MainRow.h
00032  */
00033  
00034 #ifndef MainRow_CLASS
00035 #define MainRow_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 #include <stdint.h>
00048 
00049 
00050 
00051 
00052          
00053 #include <ArrayTime.h>
00054         
00055 
00056          
00057 #include <Interval.h>
00058         
00059 
00060          
00061 #include <Tag.h>
00062         
00063 
00064          
00065 #include <EntityRef.h>
00066         
00067 
00068 
00069 
00070 
00071         
00072 
00073         
00074 
00075         
00076 #include "CTimeSampling.h"
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091 
00092 
00093 #include <ConversionException.h>
00094 #include <NoSuchRow.h>
00095 #include <IllegalAccessException.h>
00096 
00097 #include <RowTransformer.h>
00098 //#include <TableStreamReader.h>
00099 
00100 /*\file Main.h
00101     \brief Generated from model's revision "1.61", branch "HEAD"
00102 */
00103 
00104 namespace asdm {
00105 
00106 //class asdm::MainTable;
00107 
00108 
00109 // class asdm::ConfigDescriptionRow;
00110 class ConfigDescriptionRow;
00111 
00112 // class asdm::FieldRow;
00113 class FieldRow;
00114 
00115 // class asdm::StateRow;
00116 class StateRow;
00117 
00118 // class asdm::ExecBlockRow;
00119 class ExecBlockRow;
00120         
00121 
00122 class MainRow;
00123 typedef void (MainRow::*MainAttributeFromBin) (EndianIStream& eis);
00124 typedef void (MainRow::*MainAttributeFromText) (const string& s);
00125 
00132 class MainRow {
00133 friend class asdm::MainTable;
00134 friend class asdm::RowTransformer<MainRow>;
00135 //friend class asdm::TableStreamReader<MainTable, MainRow>;
00136 
00137 public:
00138 
00139         virtual ~MainRow();
00140 
00144         MainTable &getTable() const;
00145         
00150         bool isAdded() const;
00151                 
00153         // Intrinsic Table Attributes //
00155         
00156         
00157         // ===> Attribute time
00158         
00159         
00160         
00161 
00162         
00167         ArrayTime getTime() const;
00168         
00169  
00170         
00171         
00181         void setTime (ArrayTime time);
00182                 
00183         
00184         
00185         
00186 
00187 
00188         
00189         // ===> Attribute numAntenna
00190         
00191         
00192         
00193 
00194         
00199         int getNumAntenna() const;
00200         
00201  
00202         
00203         
00211         void setNumAntenna (int numAntenna);
00212                 
00213         
00214         
00215         
00216 
00217 
00218         
00219         // ===> Attribute timeSampling
00220         
00221         
00222         
00223 
00224         
00229         TimeSamplingMod::TimeSampling getTimeSampling() const;
00230         
00231  
00232         
00233         
00241         void setTimeSampling (TimeSamplingMod::TimeSampling timeSampling);
00242                 
00243         
00244         
00245         
00246 
00247 
00248         
00249         // ===> Attribute interval
00250         
00251         
00252         
00253 
00254         
00259         Interval getInterval() const;
00260         
00261  
00262         
00263         
00271         void setInterval (Interval interval);
00272                 
00273         
00274         
00275         
00276 
00277 
00278         
00279         // ===> Attribute numIntegration
00280         
00281         
00282         
00283 
00284         
00289         int getNumIntegration() const;
00290         
00291  
00292         
00293         
00301         void setNumIntegration (int numIntegration);
00302                 
00303         
00304         
00305         
00306 
00307 
00308         
00309         // ===> Attribute scanNumber
00310         
00311         
00312         
00313 
00314         
00319         int getScanNumber() const;
00320         
00321  
00322         
00323         
00331         void setScanNumber (int scanNumber);
00332                 
00333         
00334         
00335         
00336 
00337 
00338         
00339         // ===> Attribute subscanNumber
00340         
00341         
00342         
00343 
00344         
00349         int getSubscanNumber() const;
00350         
00351  
00352         
00353         
00361         void setSubscanNumber (int subscanNumber);
00362                 
00363         
00364         
00365         
00366 
00367 
00368         
00369         // ===> Attribute dataSize
00370         
00371         
00372         
00373 
00374         
00379         int64_t getDataSize() const;
00380         
00381  
00382         
00383         
00391         void setDataSize (int64_t dataSize);
00392                 
00393         
00394         
00395         
00396 
00397 
00398         
00399         // ===> Attribute dataUID
00400         
00401         
00402         
00403 
00404         
00409         EntityRef getDataUID() const;
00410         
00411  
00412         
00413         
00421         void setDataUID (EntityRef dataUID);
00422                 
00423         
00424         
00425         
00426 
00427 
00429         // Extrinsic Table Attributes //
00431         
00432         
00433         // ===> Attribute configDescriptionId
00434         
00435         
00436         
00437 
00438         
00443         Tag getConfigDescriptionId() const;
00444         
00445  
00446         
00447         
00457         void setConfigDescriptionId (Tag configDescriptionId);
00458                 
00459         
00460         
00461         
00462 
00463 
00464         
00465         // ===> Attribute execBlockId
00466         
00467         
00468         
00469 
00470         
00475         Tag getExecBlockId() const;
00476         
00477  
00478         
00479         
00487         void setExecBlockId (Tag execBlockId);
00488                 
00489         
00490         
00491         
00492 
00493 
00494         
00495         // ===> Attribute fieldId
00496         
00497         
00498         
00499 
00500         
00505         Tag getFieldId() const;
00506         
00507  
00508         
00509         
00519         void setFieldId (Tag fieldId);
00520                 
00521         
00522         
00523         
00524 
00525 
00526         
00527         // ===> Attribute stateId
00528         
00529         
00530         
00531 
00532         
00537         vector<Tag>  getStateId() const;
00538         
00539  
00540         
00541         
00549         void setStateId (vector<Tag>  stateId);
00550                 
00551         
00552         
00553         
00554 
00555 
00557         // Links //
00559         
00560         
00561 
00562         
00563                 
00570          ConfigDescriptionRow* getConfigDescriptionUsingConfigDescriptionId();
00571          
00572 
00573         
00574 
00575         
00576 
00577         
00578                 
00585          FieldRow* getFieldUsingFieldId();
00586          
00587 
00588         
00589 
00590         
00591                 
00599         void setStateId (int i, Tag stateId); 
00600                         
00601         
00602 
00603         
00604                  
00609  void addStateId(Tag id); 
00610 
00615  void addStateId(const vector<Tag> & id); 
00616  
00617 
00623  const Tag getStateId(int i);
00624  
00632  StateRow* getStateUsingStateId(int i); 
00633  
00638  vector<StateRow *> getStatesUsingStateId(); 
00639   
00640 
00641         
00642 
00643         
00644 
00645         
00646                 
00653          ExecBlockRow* getExecBlockUsingExecBlockId();
00654          
00655 
00656         
00657 
00658         
00659         
00660         
00692         bool compareNoAutoInc(ArrayTime time, Tag configDescriptionId, Tag fieldId, int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, vector<Tag>  stateId, Tag execBlockId);
00693         
00694         
00695 
00696         
00722         bool compareRequiredValue(int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, vector<Tag>  stateId, Tag execBlockId); 
00723                  
00724         
00733         bool equalByRequiredValue(MainRow* x) ;
00734         
00735 #ifndef WITHOUT_ACS
00736 
00740         asdmIDL::MainRowIDL *toIDL() const;
00741 #endif
00742         
00743 #ifndef WITHOUT_ACS
00744 
00749         void setFromIDL (asdmIDL::MainRowIDL x) ;
00750 #endif
00751         
00756         std::string toXML() const;
00757 
00764         void setFromXML (std::string rowDoc) ;
00765 
00768         // binary-deserialization material from an EndianIStream  //
00770 
00771         std::map<std::string, MainAttributeFromBin> fromBinMethods;
00772 void timeFromBin( EndianIStream& eis);
00773 void configDescriptionIdFromBin( EndianIStream& eis);
00774 void fieldIdFromBin( EndianIStream& eis);
00775 void numAntennaFromBin( EndianIStream& eis);
00776 void timeSamplingFromBin( EndianIStream& eis);
00777 void intervalFromBin( EndianIStream& eis);
00778 void numIntegrationFromBin( EndianIStream& eis);
00779 void scanNumberFromBin( EndianIStream& eis);
00780 void subscanNumberFromBin( EndianIStream& eis);
00781 void dataSizeFromBin( EndianIStream& eis);
00782 void dataUIDFromBin( EndianIStream& eis);
00783 void stateIdFromBin( EndianIStream& eis);
00784 void execBlockIdFromBin( EndianIStream& eis);
00785 
00786         
00787 
00795          static MainRow* fromBin(EndianIStream& eis, MainTable& table, const std::vector<std::string>& attributesSeq);   
00797 
00798 private:
00802         MainTable &table;
00806         bool hasBeenAdded;
00807 
00808         // This method is used by the Table class when this row is added to the table.
00809         void isAdded(bool added);
00810 
00811 
00820         MainRow (MainTable &table);
00821 
00839          MainRow (MainTable &table, MainRow &row);
00840                 
00842         // Intrinsic Table Attributes //
00844         
00845         
00846         // ===> Attribute time
00847         
00848         
00849 
00850         ArrayTime time;
00851 
00852         
00853         
00854         
00855 
00856         
00857         // ===> Attribute numAntenna
00858         
00859         
00860 
00861         int numAntenna;
00862 
00863         
00864         
00865         
00866 
00867         
00868         // ===> Attribute timeSampling
00869         
00870         
00871 
00872         TimeSamplingMod::TimeSampling timeSampling;
00873 
00874         
00875         
00876         
00877 
00878         
00879         // ===> Attribute interval
00880         
00881         
00882 
00883         Interval interval;
00884 
00885         
00886         
00887         
00888 
00889         
00890         // ===> Attribute numIntegration
00891         
00892         
00893 
00894         int numIntegration;
00895 
00896         
00897         
00898         
00899 
00900         
00901         // ===> Attribute scanNumber
00902         
00903         
00904 
00905         int scanNumber;
00906 
00907         
00908         
00909         
00910 
00911         
00912         // ===> Attribute subscanNumber
00913         
00914         
00915 
00916         int subscanNumber;
00917 
00918         
00919         
00920         
00921 
00922         
00923         // ===> Attribute dataSize
00924         
00925         
00926 
00927         int64_t dataSize;
00928 
00929         
00930         
00931         
00932 
00933         
00934         // ===> Attribute dataUID
00935         
00936         
00937 
00938         EntityRef dataUID;
00939 
00940         
00941         
00942         
00943 
00945         // Extrinsic Table Attributes //
00947         
00948         
00949         // ===> Attribute configDescriptionId
00950         
00951         
00952 
00953         Tag configDescriptionId;
00954 
00955         
00956         
00957         
00958 
00959         
00960         // ===> Attribute execBlockId
00961         
00962         
00963 
00964         Tag execBlockId;
00965 
00966         
00967         
00968         
00969 
00970         
00971         // ===> Attribute fieldId
00972         
00973         
00974 
00975         Tag fieldId;
00976 
00977         
00978         
00979         
00980 
00981         
00982         // ===> Attribute stateId
00983         
00984         
00985 
00986         vector<Tag>  stateId;
00987 
00988         
00989         
00990         
00991 
00993         // Links //
00995         
00996         
00997                 
00998 
00999          
01000 
01001         
01002 
01003         
01004                 
01005 
01006          
01007 
01008         
01009 
01010         
01011                 
01012 
01013 
01014         
01015 
01016         
01017                 
01018 
01019          
01020 
01021         
01022 
01023         
01024 /*
01026         // binary-deserialization material from an EndianIStream  //
01028         std::map<std::string, MainAttributeFromBin> fromBinMethods;
01029 void timeFromBin( EndianIStream& eis);
01030 void configDescriptionIdFromBin( EndianIStream& eis);
01031 void fieldIdFromBin( EndianIStream& eis);
01032 void numAntennaFromBin( EndianIStream& eis);
01033 void timeSamplingFromBin( EndianIStream& eis);
01034 void intervalFromBin( EndianIStream& eis);
01035 void numIntegrationFromBin( EndianIStream& eis);
01036 void scanNumberFromBin( EndianIStream& eis);
01037 void subscanNumberFromBin( EndianIStream& eis);
01038 void dataSizeFromBin( EndianIStream& eis);
01039 void dataUIDFromBin( EndianIStream& eis);
01040 void stateIdFromBin( EndianIStream& eis);
01041 void execBlockIdFromBin( EndianIStream& eis);
01042 
01043         
01044 */
01045         
01047         // text-deserialization material //
01049         std::map<std::string, MainAttributeFromText> fromTextMethods;
01050         
01051 void timeFromText (const string & s);
01052         
01053         
01054 void configDescriptionIdFromText (const string & s);
01055         
01056         
01057 void fieldIdFromText (const string & s);
01058         
01059         
01060 void numAntennaFromText (const string & s);
01061         
01062         
01063 void timeSamplingFromText (const string & s);
01064         
01065         
01066 void intervalFromText (const string & s);
01067         
01068         
01069 void numIntegrationFromText (const string & s);
01070         
01071         
01072 void scanNumberFromText (const string & s);
01073         
01074         
01075 void subscanNumberFromText (const string & s);
01076         
01077         
01078 void dataSizeFromText (const string & s);
01079         
01080         
01081         
01082 void stateIdFromText (const string & s);
01083         
01084         
01085 void execBlockIdFromText (const string & s);
01086         
01087 
01088                 
01089         
01090         void fromText(const std::string& attributeName, const std::string&  t);
01091         
01096          void toBin(EndianOSStream& eoss);
01097                  
01107 };
01108 
01109 } // End namespace asdm
01110 
01111 #endif /* Main_CLASS */