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.64", 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         
00749          void toIDL(asdmIDL::MainRowIDL& x) const;
00750 #endif
00751         
00752 #ifndef WITHOUT_ACS
00753 
00758         void setFromIDL (asdmIDL::MainRowIDL x) ;
00759 #endif
00760         
00765         std::string toXML() const;
00766 
00773         void setFromXML (std::string rowDoc) ;
00774 
00777         // binary-deserialization material from an EndianIStream  //
00779 
00780         std::map<std::string, MainAttributeFromBin> fromBinMethods;
00781 void timeFromBin( EndianIStream& eis);
00782 void configDescriptionIdFromBin( EndianIStream& eis);
00783 void fieldIdFromBin( EndianIStream& eis);
00784 void numAntennaFromBin( EndianIStream& eis);
00785 void timeSamplingFromBin( EndianIStream& eis);
00786 void intervalFromBin( EndianIStream& eis);
00787 void numIntegrationFromBin( EndianIStream& eis);
00788 void scanNumberFromBin( EndianIStream& eis);
00789 void subscanNumberFromBin( EndianIStream& eis);
00790 void dataSizeFromBin( EndianIStream& eis);
00791 void dataUIDFromBin( EndianIStream& eis);
00792 void stateIdFromBin( EndianIStream& eis);
00793 void execBlockIdFromBin( EndianIStream& eis);
00794 
00795         
00796 
00804          static MainRow* fromBin(EndianIStream& eis, MainTable& table, const std::vector<std::string>& attributesSeq);   
00805  
00812          void fromText(const std::string& attributeName, const std::string&  t);
00814 
00815 private:
00819         MainTable &table;
00823         bool hasBeenAdded;
00824 
00825         // This method is used by the Table class when this row is added to the table.
00826         void isAdded(bool added);
00827 
00828 
00837         MainRow (MainTable &table);
00838 
00856          MainRow (MainTable &table, MainRow &row);
00857                 
00859         // Intrinsic Table Attributes //
00861         
00862         
00863         // ===> Attribute time
00864         
00865         
00866 
00867         ArrayTime time;
00868 
00869         
00870         
00871         
00872 
00873         
00874         // ===> Attribute numAntenna
00875         
00876         
00877 
00878         int numAntenna;
00879 
00880         
00881         
00882         
00883 
00884         
00885         // ===> Attribute timeSampling
00886         
00887         
00888 
00889         TimeSamplingMod::TimeSampling timeSampling;
00890 
00891         
00892         
00893         
00894 
00895         
00896         // ===> Attribute interval
00897         
00898         
00899 
00900         Interval interval;
00901 
00902         
00903         
00904         
00905 
00906         
00907         // ===> Attribute numIntegration
00908         
00909         
00910 
00911         int numIntegration;
00912 
00913         
00914         
00915         
00916 
00917         
00918         // ===> Attribute scanNumber
00919         
00920         
00921 
00922         int scanNumber;
00923 
00924         
00925         
00926         
00927 
00928         
00929         // ===> Attribute subscanNumber
00930         
00931         
00932 
00933         int subscanNumber;
00934 
00935         
00936         
00937         
00938 
00939         
00940         // ===> Attribute dataSize
00941         
00942         
00943 
00944         int64_t dataSize;
00945 
00946         
00947         
00948         
00949 
00950         
00951         // ===> Attribute dataUID
00952         
00953         
00954 
00955         EntityRef dataUID;
00956 
00957         
00958         
00959         
00960 
00962         // Extrinsic Table Attributes //
00964         
00965         
00966         // ===> Attribute configDescriptionId
00967         
00968         
00969 
00970         Tag configDescriptionId;
00971 
00972         
00973         
00974         
00975 
00976         
00977         // ===> Attribute execBlockId
00978         
00979         
00980 
00981         Tag execBlockId;
00982 
00983         
00984         
00985         
00986 
00987         
00988         // ===> Attribute fieldId
00989         
00990         
00991 
00992         Tag fieldId;
00993 
00994         
00995         
00996         
00997 
00998         
00999         // ===> Attribute stateId
01000         
01001         
01002 
01003         vector<Tag>  stateId;
01004 
01005         
01006         
01007         
01008 
01010         // Links //
01012         
01013         
01014                 
01015 
01016          
01017 
01018         
01019 
01020         
01021                 
01022 
01023          
01024 
01025         
01026 
01027         
01028                 
01029 
01030 
01031         
01032 
01033         
01034                 
01035 
01036          
01037 
01038         
01039 
01040         
01041 /*
01043         // binary-deserialization material from an EndianIStream  //
01045         std::map<std::string, MainAttributeFromBin> fromBinMethods;
01046 void timeFromBin( EndianIStream& eis);
01047 void configDescriptionIdFromBin( EndianIStream& eis);
01048 void fieldIdFromBin( EndianIStream& eis);
01049 void numAntennaFromBin( EndianIStream& eis);
01050 void timeSamplingFromBin( EndianIStream& eis);
01051 void intervalFromBin( EndianIStream& eis);
01052 void numIntegrationFromBin( EndianIStream& eis);
01053 void scanNumberFromBin( EndianIStream& eis);
01054 void subscanNumberFromBin( EndianIStream& eis);
01055 void dataSizeFromBin( EndianIStream& eis);
01056 void dataUIDFromBin( EndianIStream& eis);
01057 void stateIdFromBin( EndianIStream& eis);
01058 void execBlockIdFromBin( EndianIStream& eis);
01059 
01060         
01061 */
01062         
01064         // text-deserialization material //
01066         std::map<std::string, MainAttributeFromText> fromTextMethods;
01067         
01068 void timeFromText (const string & s);
01069         
01070         
01071 void configDescriptionIdFromText (const string & s);
01072         
01073         
01074 void fieldIdFromText (const string & s);
01075         
01076         
01077 void numAntennaFromText (const string & s);
01078         
01079         
01080 void timeSamplingFromText (const string & s);
01081         
01082         
01083 void intervalFromText (const string & s);
01084         
01085         
01086 void numIntegrationFromText (const string & s);
01087         
01088         
01089 void scanNumberFromText (const string & s);
01090         
01091         
01092 void subscanNumberFromText (const string & s);
01093         
01094         
01095 void dataSizeFromText (const string & s);
01096         
01097         
01098         
01099 void stateIdFromText (const string & s);
01100         
01101         
01102 void execBlockIdFromText (const string & s);
01103         
01104 
01105                 
01106         
01111          void toBin(EndianOSStream& eoss);
01112                  
01122 };
01123 
01124 } // End namespace asdm
01125 
01126 #endif /* Main_CLASS */