casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TotalPowerRow.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 TotalPowerRow.h
00032  */
00033  
00034 #ifndef TotalPowerRow_CLASS
00035 #define TotalPowerRow_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 <Interval.h>
00056         
00057 
00058          
00059 #include <Tag.h>
00060         
00061 
00062          
00063 #include <Length.h>
00064         
00065 
00066 
00067 
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093 
00094 
00095 #include <ConversionException.h>
00096 #include <NoSuchRow.h>
00097 #include <IllegalAccessException.h>
00098 
00099 #include <RowTransformer.h>
00100 //#include <TableStreamReader.h>
00101 
00102 /*\file TotalPower.h
00103     \brief Generated from model's revision "1.64", branch "HEAD"
00104 */
00105 
00106 namespace asdm {
00107 
00108 //class asdm::TotalPowerTable;
00109 
00110 
00111 // class asdm::StateRow;
00112 class StateRow;
00113 
00114 // class asdm::FieldRow;
00115 class FieldRow;
00116 
00117 // class asdm::ConfigDescriptionRow;
00118 class ConfigDescriptionRow;
00119 
00120 // class asdm::ExecBlockRow;
00121 class ExecBlockRow;
00122         
00123 
00124 class TotalPowerRow;
00125 typedef void (TotalPowerRow::*TotalPowerAttributeFromBin) (EndianIStream& eis);
00126 typedef void (TotalPowerRow::*TotalPowerAttributeFromText) (const string& s);
00127 
00134 class TotalPowerRow {
00135 friend class asdm::TotalPowerTable;
00136 friend class asdm::RowTransformer<TotalPowerRow>;
00137 //friend class asdm::TableStreamReader<TotalPowerTable, TotalPowerRow>;
00138 
00139 public:
00140 
00141         virtual ~TotalPowerRow();
00142 
00146         TotalPowerTable &getTable() const;
00147         
00152         bool isAdded() const;
00153                 
00155         // Intrinsic Table Attributes //
00157         
00158         
00159         // ===> Attribute time
00160         
00161         
00162         
00163 
00164         
00169         ArrayTime getTime() const;
00170         
00171  
00172         
00173         
00183         void setTime (ArrayTime time);
00184                 
00185         
00186         
00187         
00188 
00189 
00190         
00191         // ===> Attribute scanNumber
00192         
00193         
00194         
00195 
00196         
00201         int getScanNumber() const;
00202         
00203  
00204         
00205         
00213         void setScanNumber (int scanNumber);
00214                 
00215         
00216         
00217         
00218 
00219 
00220         
00221         // ===> Attribute subscanNumber
00222         
00223         
00224         
00225 
00226         
00231         int getSubscanNumber() const;
00232         
00233  
00234         
00235         
00243         void setSubscanNumber (int subscanNumber);
00244                 
00245         
00246         
00247         
00248 
00249 
00250         
00251         // ===> Attribute integrationNumber
00252         
00253         
00254         
00255 
00256         
00261         int getIntegrationNumber() const;
00262         
00263  
00264         
00265         
00273         void setIntegrationNumber (int integrationNumber);
00274                 
00275         
00276         
00277         
00278 
00279 
00280         
00281         // ===> Attribute uvw
00282         
00283         
00284         
00285 
00286         
00291         vector<vector<Length > > getUvw() const;
00292         
00293  
00294         
00295         
00303         void setUvw (vector<vector<Length > > uvw);
00304                 
00305         
00306         
00307         
00308 
00309 
00310         
00311         // ===> Attribute exposure
00312         
00313         
00314         
00315 
00316         
00321         vector<vector<Interval > > getExposure() const;
00322         
00323  
00324         
00325         
00333         void setExposure (vector<vector<Interval > > exposure);
00334                 
00335         
00336         
00337         
00338 
00339 
00340         
00341         // ===> Attribute timeCentroid
00342         
00343         
00344         
00345 
00346         
00351         vector<vector<ArrayTime > > getTimeCentroid() const;
00352         
00353  
00354         
00355         
00363         void setTimeCentroid (vector<vector<ArrayTime > > timeCentroid);
00364                 
00365         
00366         
00367         
00368 
00369 
00370         
00371         // ===> Attribute floatData
00372         
00373         
00374         
00375 
00376         
00381         vector<vector<vector<float > > > getFloatData() const;
00382         
00383  
00384         
00385         
00393         void setFloatData (vector<vector<vector<float > > > floatData);
00394                 
00395         
00396         
00397         
00398 
00399 
00400         
00401         // ===> Attribute flagAnt
00402         
00403         
00404         
00405 
00406         
00411         vector<int > getFlagAnt() const;
00412         
00413  
00414         
00415         
00423         void setFlagAnt (vector<int > flagAnt);
00424                 
00425         
00426         
00427         
00428 
00429 
00430         
00431         // ===> Attribute flagPol
00432         
00433         
00434         
00435 
00436         
00441         vector<vector<int > > getFlagPol() const;
00442         
00443  
00444         
00445         
00453         void setFlagPol (vector<vector<int > > flagPol);
00454                 
00455         
00456         
00457         
00458 
00459 
00460         
00461         // ===> Attribute interval
00462         
00463         
00464         
00465 
00466         
00471         Interval getInterval() const;
00472         
00473  
00474         
00475         
00483         void setInterval (Interval interval);
00484                 
00485         
00486         
00487         
00488 
00489 
00490         
00491         // ===> Attribute subintegrationNumber, which is optional
00492         
00493         
00494         
00499         bool isSubintegrationNumberExists() const;
00500         
00501 
00502         
00508         int getSubintegrationNumber() const;
00509         
00510  
00511         
00512         
00519         void setSubintegrationNumber (int subintegrationNumber);
00520                 
00521         
00522         
00523         
00527         void clearSubintegrationNumber ();
00528         
00529 
00530 
00532         // Extrinsic Table Attributes //
00534         
00535         
00536         // ===> Attribute configDescriptionId
00537         
00538         
00539         
00540 
00541         
00546         Tag getConfigDescriptionId() const;
00547         
00548  
00549         
00550         
00560         void setConfigDescriptionId (Tag configDescriptionId);
00561                 
00562         
00563         
00564         
00565 
00566 
00567         
00568         // ===> Attribute execBlockId
00569         
00570         
00571         
00572 
00573         
00578         Tag getExecBlockId() const;
00579         
00580  
00581         
00582         
00590         void setExecBlockId (Tag execBlockId);
00591                 
00592         
00593         
00594         
00595 
00596 
00597         
00598         // ===> Attribute fieldId
00599         
00600         
00601         
00602 
00603         
00608         Tag getFieldId() const;
00609         
00610  
00611         
00612         
00622         void setFieldId (Tag fieldId);
00623                 
00624         
00625         
00626         
00627 
00628 
00629         
00630         // ===> Attribute stateId
00631         
00632         
00633         
00634 
00635         
00640         vector<Tag>  getStateId() const;
00641         
00642  
00643         
00644         
00652         void setStateId (vector<Tag>  stateId);
00653                 
00654         
00655         
00656         
00657 
00658 
00660         // Links //
00662         
00663         
00664                 
00672         void setStateId (int i, Tag stateId); 
00673                         
00674         
00675 
00676         
00677                  
00682  void addStateId(Tag id); 
00683 
00688  void addStateId(const vector<Tag> & id); 
00689  
00690 
00696  const Tag getStateId(int i);
00697  
00705  StateRow* getStateUsingStateId(int i); 
00706  
00711  vector<StateRow *> getStatesUsingStateId(); 
00712   
00713 
00714         
00715 
00716         
00717 
00718         
00719                 
00726          FieldRow* getFieldUsingFieldId();
00727          
00728 
00729         
00730 
00731         
00732 
00733         
00734                 
00741          ConfigDescriptionRow* getConfigDescriptionUsingConfigDescriptionId();
00742          
00743 
00744         
00745 
00746         
00747 
00748         
00749                 
00756          ExecBlockRow* getExecBlockUsingExecBlockId();
00757          
00758 
00759         
00760 
00761         
00762         
00763         
00799         bool compareNoAutoInc(ArrayTime time, Tag configDescriptionId, Tag fieldId, int scanNumber, int subscanNumber, int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol, Interval interval, vector<Tag>  stateId, Tag execBlockId);
00800         
00801         
00802 
00803         
00833         bool compareRequiredValue(int scanNumber, int subscanNumber, int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol, Interval interval, vector<Tag>  stateId, Tag execBlockId); 
00834                  
00835         
00844         bool equalByRequiredValue(TotalPowerRow* x) ;
00845         
00846 #ifndef WITHOUT_ACS
00847 
00851         asdmIDL::TotalPowerRowIDL *toIDL() const;
00852         
00860          void toIDL(asdmIDL::TotalPowerRowIDL& x) const;
00861 #endif
00862         
00863 #ifndef WITHOUT_ACS
00864 
00869         void setFromIDL (asdmIDL::TotalPowerRowIDL x) ;
00870 #endif
00871         
00876         std::string toXML() const;
00877 
00884         void setFromXML (std::string rowDoc) ;
00885 
00888         // binary-deserialization material from an EndianIStream  //
00890 
00891         std::map<std::string, TotalPowerAttributeFromBin> fromBinMethods;
00892 void timeFromBin( EndianIStream& eis);
00893 void configDescriptionIdFromBin( EndianIStream& eis);
00894 void fieldIdFromBin( EndianIStream& eis);
00895 void scanNumberFromBin( EndianIStream& eis);
00896 void subscanNumberFromBin( EndianIStream& eis);
00897 void integrationNumberFromBin( EndianIStream& eis);
00898 void uvwFromBin( EndianIStream& eis);
00899 void exposureFromBin( EndianIStream& eis);
00900 void timeCentroidFromBin( EndianIStream& eis);
00901 void floatDataFromBin( EndianIStream& eis);
00902 void flagAntFromBin( EndianIStream& eis);
00903 void flagPolFromBin( EndianIStream& eis);
00904 void intervalFromBin( EndianIStream& eis);
00905 void stateIdFromBin( EndianIStream& eis);
00906 void execBlockIdFromBin( EndianIStream& eis);
00907 
00908 void subintegrationNumberFromBin( EndianIStream& eis);
00909 
00910 
00918          static TotalPowerRow* fromBin(EndianIStream& eis, TotalPowerTable& table, const std::vector<std::string>& attributesSeq);       
00919  
00926          void fromText(const std::string& attributeName, const std::string&  t);
00928 
00929 private:
00933         TotalPowerTable &table;
00937         bool hasBeenAdded;
00938 
00939         // This method is used by the Table class when this row is added to the table.
00940         void isAdded(bool added);
00941 
00942 
00951         TotalPowerRow (TotalPowerTable &table);
00952 
00970          TotalPowerRow (TotalPowerTable &table, TotalPowerRow &row);
00971                 
00973         // Intrinsic Table Attributes //
00975         
00976         
00977         // ===> Attribute time
00978         
00979         
00980 
00981         ArrayTime time;
00982 
00983         
00984         
00985         
00986 
00987         
00988         // ===> Attribute scanNumber
00989         
00990         
00991 
00992         int scanNumber;
00993 
00994         
00995         
00996         
00997 
00998         
00999         // ===> Attribute subscanNumber
01000         
01001         
01002 
01003         int subscanNumber;
01004 
01005         
01006         
01007         
01008 
01009         
01010         // ===> Attribute integrationNumber
01011         
01012         
01013 
01014         int integrationNumber;
01015 
01016         
01017         
01018         
01019 
01020         
01021         // ===> Attribute uvw
01022         
01023         
01024 
01025         vector<vector<Length > > uvw;
01026 
01027         
01028         
01029         
01030 
01031         
01032         // ===> Attribute exposure
01033         
01034         
01035 
01036         vector<vector<Interval > > exposure;
01037 
01038         
01039         
01040         
01041 
01042         
01043         // ===> Attribute timeCentroid
01044         
01045         
01046 
01047         vector<vector<ArrayTime > > timeCentroid;
01048 
01049         
01050         
01051         
01052 
01053         
01054         // ===> Attribute floatData
01055         
01056         
01057 
01058         vector<vector<vector<float > > > floatData;
01059 
01060         
01061         
01062         
01063 
01064         
01065         // ===> Attribute flagAnt
01066         
01067         
01068 
01069         vector<int > flagAnt;
01070 
01071         
01072         
01073         
01074 
01075         
01076         // ===> Attribute flagPol
01077         
01078         
01079 
01080         vector<vector<int > > flagPol;
01081 
01082         
01083         
01084         
01085 
01086         
01087         // ===> Attribute interval
01088         
01089         
01090 
01091         Interval interval;
01092 
01093         
01094         
01095         
01096 
01097         
01098         // ===> Attribute subintegrationNumber, which is optional
01099         
01100         
01101         bool subintegrationNumberExists;
01102         
01103 
01104         int subintegrationNumber;
01105 
01106         
01107         
01108         
01109 
01111         // Extrinsic Table Attributes //
01113         
01114         
01115         // ===> Attribute configDescriptionId
01116         
01117         
01118 
01119         Tag configDescriptionId;
01120 
01121         
01122         
01123         
01124 
01125         
01126         // ===> Attribute execBlockId
01127         
01128         
01129 
01130         Tag execBlockId;
01131 
01132         
01133         
01134         
01135 
01136         
01137         // ===> Attribute fieldId
01138         
01139         
01140 
01141         Tag fieldId;
01142 
01143         
01144         
01145         
01146 
01147         
01148         // ===> Attribute stateId
01149         
01150         
01151 
01152         vector<Tag>  stateId;
01153 
01154         
01155         
01156         
01157 
01159         // Links //
01161         
01162         
01163                 
01164 
01165 
01166         
01167 
01168         
01169                 
01170 
01171          
01172 
01173         
01174 
01175         
01176                 
01177 
01178          
01179 
01180         
01181 
01182         
01183                 
01184 
01185          
01186 
01187         
01188 
01189         
01190 /*
01192         // binary-deserialization material from an EndianIStream  //
01194         std::map<std::string, TotalPowerAttributeFromBin> fromBinMethods;
01195 void timeFromBin( EndianIStream& eis);
01196 void configDescriptionIdFromBin( EndianIStream& eis);
01197 void fieldIdFromBin( EndianIStream& eis);
01198 void scanNumberFromBin( EndianIStream& eis);
01199 void subscanNumberFromBin( EndianIStream& eis);
01200 void integrationNumberFromBin( EndianIStream& eis);
01201 void uvwFromBin( EndianIStream& eis);
01202 void exposureFromBin( EndianIStream& eis);
01203 void timeCentroidFromBin( EndianIStream& eis);
01204 void floatDataFromBin( EndianIStream& eis);
01205 void flagAntFromBin( EndianIStream& eis);
01206 void flagPolFromBin( EndianIStream& eis);
01207 void intervalFromBin( EndianIStream& eis);
01208 void stateIdFromBin( EndianIStream& eis);
01209 void execBlockIdFromBin( EndianIStream& eis);
01210 
01211 void subintegrationNumberFromBin( EndianIStream& eis);
01212 
01213 */
01214         
01216         // text-deserialization material //
01218         std::map<std::string, TotalPowerAttributeFromText> fromTextMethods;
01219         
01220 void timeFromText (const string & s);
01221         
01222         
01223 void configDescriptionIdFromText (const string & s);
01224         
01225         
01226 void fieldIdFromText (const string & s);
01227         
01228         
01229 void scanNumberFromText (const string & s);
01230         
01231         
01232 void subscanNumberFromText (const string & s);
01233         
01234         
01235 void integrationNumberFromText (const string & s);
01236         
01237         
01238 void uvwFromText (const string & s);
01239         
01240         
01241 void exposureFromText (const string & s);
01242         
01243         
01244 void timeCentroidFromText (const string & s);
01245         
01246         
01247 void floatDataFromText (const string & s);
01248         
01249         
01250 void flagAntFromText (const string & s);
01251         
01252         
01253 void flagPolFromText (const string & s);
01254         
01255         
01256 void intervalFromText (const string & s);
01257         
01258         
01259 void stateIdFromText (const string & s);
01260         
01261         
01262 void execBlockIdFromText (const string & s);
01263         
01264 
01265         
01266 void subintegrationNumberFromText (const string & s);
01267         
01268         
01269         
01274          void toBin(EndianOSStream& eoss);
01275                  
01285 };
01286 
01287 } // End namespace asdm
01288 
01289 #endif /* TotalPower_CLASS */