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 using std::vector;
00041 using std::string;
00042 using std::set;
00043 
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::MainRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <ArrayTime.h>
00055 using  asdm::ArrayTime;
00056 
00057 #include <Interval.h>
00058 using  asdm::Interval;
00059 
00060 #include <Tag.h>
00061 using  asdm::Tag;
00062 
00063 #include <EntityRef.h>
00064 using  asdm::EntityRef;
00065 
00066 
00067 
00068 
00069         
00070 
00071         
00072 
00073         
00074 #include "CTimeSampling.h"
00075 using namespace TimeSamplingMod;
00076         
00077 
00078         
00079 
00080         
00081 
00082         
00083 
00084         
00085 
00086         
00087 
00088         
00089 
00090         
00091 
00092 
00093 
00094 #include <ConversionException.h>
00095 #include <NoSuchRow.h>
00096 #include <IllegalAccessException.h>
00097 
00098 
00099 /*\file Main.h
00100     \brief Generated from model's revision "1.55", branch "HEAD"
00101 */
00102 
00103 namespace asdm {
00104 
00105 //class asdm::MainTable;
00106 
00107 
00108 // class asdm::ConfigDescriptionRow;
00109 class ConfigDescriptionRow;
00110 
00111 // class asdm::FieldRow;
00112 class FieldRow;
00113 
00114 // class asdm::StateRow;
00115 class StateRow;
00116 
00117 // class asdm::ExecBlockRow;
00118 class ExecBlockRow;
00119         
00120 
00121 class MainRow;
00122 typedef void (MainRow::*MainAttributeFromBin) (EndianISStream& eiss);
00123 
00130 class MainRow {
00131 friend class asdm::MainTable;
00132 
00133 public:
00134 
00135         virtual ~MainRow();
00136 
00140         MainTable &getTable() const;
00141         
00146         bool isAdded() const;
00147                 
00149         // Intrinsic Table Attributes //
00151         
00152         
00153         // ===> Attribute time
00154         
00155         
00156         
00157 
00158         
00163         ArrayTime getTime() const;
00164         
00165  
00166         
00167         
00177         void setTime (ArrayTime time);
00178                 
00179         
00180         
00181         
00182 
00183 
00184         
00185         // ===> Attribute numAntenna
00186         
00187         
00188         
00189 
00190         
00195         int getNumAntenna() const;
00196         
00197  
00198         
00199         
00207         void setNumAntenna (int numAntenna);
00208                 
00209         
00210         
00211         
00212 
00213 
00214         
00215         // ===> Attribute timeSampling
00216         
00217         
00218         
00219 
00220         
00225         TimeSamplingMod::TimeSampling getTimeSampling() const;
00226         
00227  
00228         
00229         
00237         void setTimeSampling (TimeSamplingMod::TimeSampling timeSampling);
00238                 
00239         
00240         
00241         
00242 
00243 
00244         
00245         // ===> Attribute interval
00246         
00247         
00248         
00249 
00250         
00255         Interval getInterval() const;
00256         
00257  
00258         
00259         
00267         void setInterval (Interval interval);
00268                 
00269         
00270         
00271         
00272 
00273 
00274         
00275         // ===> Attribute numIntegration
00276         
00277         
00278         
00279 
00280         
00285         int getNumIntegration() const;
00286         
00287  
00288         
00289         
00297         void setNumIntegration (int numIntegration);
00298                 
00299         
00300         
00301         
00302 
00303 
00304         
00305         // ===> Attribute scanNumber
00306         
00307         
00308         
00309 
00310         
00315         int getScanNumber() const;
00316         
00317  
00318         
00319         
00327         void setScanNumber (int scanNumber);
00328                 
00329         
00330         
00331         
00332 
00333 
00334         
00335         // ===> Attribute subscanNumber
00336         
00337         
00338         
00339 
00340         
00345         int getSubscanNumber() const;
00346         
00347  
00348         
00349         
00357         void setSubscanNumber (int subscanNumber);
00358                 
00359         
00360         
00361         
00362 
00363 
00364         
00365         // ===> Attribute dataSize
00366         
00367         
00368         
00369 
00370         
00375         int getDataSize() const;
00376         
00377  
00378         
00379         
00387         void setDataSize (int dataSize);
00388                 
00389         
00390         
00391         
00392 
00393 
00394         
00395         // ===> Attribute dataOid
00396         
00397         
00398         
00399 
00400         
00405         EntityRef getDataOid() const;
00406         
00407  
00408         
00409         
00417         void setDataOid (EntityRef dataOid);
00418                 
00419         
00420         
00421         
00422 
00423 
00424         
00425         // ===> Attribute flagRow, which is optional
00426         
00427         
00428         
00433         bool isFlagRowExists() const;
00434         
00435 
00436         
00442         bool getFlagRow() const;
00443         
00444  
00445         
00446         
00453         void setFlagRow (bool flagRow);
00454                 
00455         
00456         
00457         
00461         void clearFlagRow ();
00462         
00463 
00464 
00466         // Extrinsic Table Attributes //
00468         
00469         
00470         // ===> Attribute configDescriptionId
00471         
00472         
00473         
00474 
00475         
00480         Tag getConfigDescriptionId() const;
00481         
00482  
00483         
00484         
00494         void setConfigDescriptionId (Tag configDescriptionId);
00495                 
00496         
00497         
00498         
00499 
00500 
00501         
00502         // ===> Attribute execBlockId
00503         
00504         
00505         
00506 
00507         
00512         Tag getExecBlockId() const;
00513         
00514  
00515         
00516         
00524         void setExecBlockId (Tag execBlockId);
00525                 
00526         
00527         
00528         
00529 
00530 
00531         
00532         // ===> Attribute fieldId
00533         
00534         
00535         
00536 
00537         
00542         Tag getFieldId() const;
00543         
00544  
00545         
00546         
00556         void setFieldId (Tag fieldId);
00557                 
00558         
00559         
00560         
00561 
00562 
00563         
00564         // ===> Attribute stateId
00565         
00566         
00567         
00568 
00569         
00574         vector<Tag>  getStateId() const;
00575         
00576  
00577         
00578         
00586         void setStateId (vector<Tag>  stateId);
00587                 
00588         
00589         
00590         
00591 
00592 
00594         // Links //
00596         
00597         
00598 
00599         
00600                 
00607          ConfigDescriptionRow* getConfigDescriptionUsingConfigDescriptionId();
00608          
00609 
00610         
00611 
00612         
00613 
00614         
00615                 
00622          FieldRow* getFieldUsingFieldId();
00623          
00624 
00625         
00626 
00627         
00628                 
00636         void setStateId (int i, Tag stateId); 
00637                         
00638         
00639 
00640         
00641                  
00646  void addStateId(Tag id); 
00647 
00652  void addStateId(const vector<Tag> & id); 
00653  
00654 
00660  const Tag getStateId(int i);
00661  
00669  StateRow* getStateUsingStateId(int i); 
00670  
00675  vector<StateRow *> getStatesUsingStateId(); 
00676   
00677 
00678         
00679 
00680         
00681 
00682         
00683                 
00690          ExecBlockRow* getExecBlockUsingExecBlockId();
00691          
00692 
00693         
00694 
00695         
00696         
00697         
00729         bool compareNoAutoInc(ArrayTime time, Tag configDescriptionId, Tag fieldId, int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int dataSize, EntityRef dataOid, vector<Tag>  stateId, Tag execBlockId);
00730         
00731         
00732 
00733         
00759         bool compareRequiredValue(int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int dataSize, EntityRef dataOid, vector<Tag>  stateId, Tag execBlockId); 
00760                  
00761         
00770         bool equalByRequiredValue(MainRow* x) ;
00771         
00772 #ifndef WITHOUT_ACS
00773 
00777         MainRowIDL *toIDL() const;
00778 #endif
00779         
00780 #ifndef WITHOUT_ACS
00781 
00786         void setFromIDL (MainRowIDL x) ;
00787 #endif
00788         
00793         string toXML() const;
00794 
00801         void setFromXML (string rowDoc) ;       
00802 
00803 private:
00807         MainTable &table;
00811         bool hasBeenAdded;
00812 
00813         // This method is used by the Table class when this row is added to the table.
00814         void isAdded(bool added);
00815 
00816 
00825         MainRow (MainTable &table);
00826 
00844          MainRow (MainTable &table, MainRow &row);
00845                 
00847         // Intrinsic Table Attributes //
00849         
00850         
00851         // ===> Attribute time
00852         
00853         
00854 
00855         ArrayTime time;
00856 
00857         
00858         
00859         
00860 
00861         
00862         // ===> Attribute numAntenna
00863         
00864         
00865 
00866         int numAntenna;
00867 
00868         
00869         
00870         
00871 
00872         
00873         // ===> Attribute timeSampling
00874         
00875         
00876 
00877         TimeSamplingMod::TimeSampling timeSampling;
00878 
00879         
00880         
00881         
00882 
00883         
00884         // ===> Attribute interval
00885         
00886         
00887 
00888         Interval interval;
00889 
00890         
00891         
00892         
00893 
00894         
00895         // ===> Attribute numIntegration
00896         
00897         
00898 
00899         int numIntegration;
00900 
00901         
00902         
00903         
00904 
00905         
00906         // ===> Attribute scanNumber
00907         
00908         
00909 
00910         int scanNumber;
00911 
00912         
00913         
00914         
00915 
00916         
00917         // ===> Attribute subscanNumber
00918         
00919         
00920 
00921         int subscanNumber;
00922 
00923         
00924         
00925         
00926 
00927         
00928         // ===> Attribute dataSize
00929         
00930         
00931 
00932         int dataSize;
00933 
00934         
00935         
00936         
00937 
00938         
00939         // ===> Attribute dataOid
00940         
00941         
00942 
00943         EntityRef dataOid;
00944 
00945         
00946         
00947         
00948 
00949         
00950         // ===> Attribute flagRow, which is optional
00951         
00952         
00953         bool flagRowExists;
00954         
00955 
00956         bool flagRow;
00957 
00958         
00959         
00960         
00961 
00963         // Extrinsic Table Attributes //
00965         
00966         
00967         // ===> Attribute configDescriptionId
00968         
00969         
00970 
00971         Tag configDescriptionId;
00972 
00973         
00974         
00975         
00976 
00977         
00978         // ===> Attribute execBlockId
00979         
00980         
00981 
00982         Tag execBlockId;
00983 
00984         
00985         
00986         
00987 
00988         
00989         // ===> Attribute fieldId
00990         
00991         
00992 
00993         Tag fieldId;
00994 
00995         
00996         
00997         
00998 
00999         
01000         // ===> Attribute stateId
01001         
01002         
01003 
01004         vector<Tag>  stateId;
01005 
01006         
01007         
01008         
01009 
01011         // Links //
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//
01045         map<string, MainAttributeFromBin> fromBinMethods;
01046 void timeFromBin( EndianISStream& eiss);
01047 void configDescriptionIdFromBin( EndianISStream& eiss);
01048 void fieldIdFromBin( EndianISStream& eiss);
01049 void numAntennaFromBin( EndianISStream& eiss);
01050 void timeSamplingFromBin( EndianISStream& eiss);
01051 void intervalFromBin( EndianISStream& eiss);
01052 void numIntegrationFromBin( EndianISStream& eiss);
01053 void scanNumberFromBin( EndianISStream& eiss);
01054 void subscanNumberFromBin( EndianISStream& eiss);
01055 void dataSizeFromBin( EndianISStream& eiss);
01056 void dataOidFromBin( EndianISStream& eiss);
01057 void stateIdFromBin( EndianISStream& eiss);
01058 void execBlockIdFromBin( EndianISStream& eiss);
01059 
01060 void flagRowFromBin( EndianISStream& eiss);
01061         
01062         
01067          void toBin(EndianOSStream& eoss);
01068                  
01076          static MainRow* fromBin(EndianISStream& eiss, MainTable& table, const vector<string>& attributesSeq);   
01077 
01078 };
01079 
01080 } // End namespace asdm
01081 
01082 #endif /* Main_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines