casa  $Rev:20696$
ConfigDescriptionRow.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 ConfigDescriptionRow.h
00032  */
00033  
00034 #ifndef ConfigDescriptionRow_CLASS
00035 #define ConfigDescriptionRow_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 <Tag.h>
00052         
00053 
00054 
00055 
00056 
00057         
00058 
00059         
00060 
00061         
00062 
00063         
00064 #include "CCorrelationMode.h"
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 #include "CAtmPhaseCorrection.h"
00073         
00074 
00075         
00076 #include "CProcessorType.h"
00077         
00078 
00079         
00080 
00081         
00082 #include "CSpectralResolutionType.h"
00083         
00084 
00085         
00086 
00087         
00088 #include "CSpectralResolutionType.h"
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 ConfigDescription.h
00101     \brief Generated from model's revision "1.62", branch "HEAD"
00102 */
00103 
00104 namespace asdm {
00105 
00106 //class asdm::ConfigDescriptionTable;
00107 
00108 
00109 // class asdm::ConfigDescriptionRow;
00110 class ConfigDescriptionRow;
00111 
00112 // class asdm::AntennaRow;
00113 class AntennaRow;
00114 
00115 // class asdm::FeedRow;
00116 class FeedRow;
00117 
00118 // class asdm::SwitchCycleRow;
00119 class SwitchCycleRow;
00120 
00121 // class asdm::DataDescriptionRow;
00122 class DataDescriptionRow;
00123 
00124 // class asdm::ProcessorRow;
00125 class ProcessorRow;
00126         
00127 
00128 class ConfigDescriptionRow;
00129 typedef void (ConfigDescriptionRow::*ConfigDescriptionAttributeFromBin) (EndianIStream& eis);
00130 typedef void (ConfigDescriptionRow::*ConfigDescriptionAttributeFromText) (const string& s);
00131 
00138 class ConfigDescriptionRow {
00139 friend class asdm::ConfigDescriptionTable;
00140 friend class asdm::RowTransformer<ConfigDescriptionRow>;
00141 //friend class asdm::TableStreamReader<ConfigDescriptionTable, ConfigDescriptionRow>;
00142 
00143 public:
00144 
00145         virtual ~ConfigDescriptionRow();
00146 
00150         ConfigDescriptionTable &getTable() const;
00151         
00156         bool isAdded() const;
00157                 
00159         // Intrinsic Table Attributes //
00161         
00162         
00163         // ===> Attribute numAntenna
00164         
00165         
00166         
00167 
00168         
00173         int getNumAntenna() const;
00174         
00175  
00176         
00177         
00185         void setNumAntenna (int numAntenna);
00186                 
00187         
00188         
00189         
00190 
00191 
00192         
00193         // ===> Attribute numDataDescription
00194         
00195         
00196         
00197 
00198         
00203         int getNumDataDescription() const;
00204         
00205  
00206         
00207         
00215         void setNumDataDescription (int numDataDescription);
00216                 
00217         
00218         
00219         
00220 
00221 
00222         
00223         // ===> Attribute numFeed
00224         
00225         
00226         
00227 
00228         
00233         int getNumFeed() const;
00234         
00235  
00236         
00237         
00245         void setNumFeed (int numFeed);
00246                 
00247         
00248         
00249         
00250 
00251 
00252         
00253         // ===> Attribute correlationMode
00254         
00255         
00256         
00257 
00258         
00263         CorrelationModeMod::CorrelationMode getCorrelationMode() const;
00264         
00265  
00266         
00267         
00275         void setCorrelationMode (CorrelationModeMod::CorrelationMode correlationMode);
00276                 
00277         
00278         
00279         
00280 
00281 
00282         
00283         // ===> Attribute configDescriptionId
00284         
00285         
00286         
00287 
00288         
00293         Tag getConfigDescriptionId() const;
00294         
00295  
00296         
00297         
00298         
00299         
00300 
00301 
00302         
00303         // ===> Attribute numAtmPhaseCorrection
00304         
00305         
00306         
00307 
00308         
00313         int getNumAtmPhaseCorrection() const;
00314         
00315  
00316         
00317         
00325         void setNumAtmPhaseCorrection (int numAtmPhaseCorrection);
00326                 
00327         
00328         
00329         
00330 
00331 
00332         
00333         // ===> Attribute atmPhaseCorrection
00334         
00335         
00336         
00337 
00338         
00343         vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > getAtmPhaseCorrection() const;
00344         
00345  
00346         
00347         
00355         void setAtmPhaseCorrection (vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCorrection);
00356                 
00357         
00358         
00359         
00360 
00361 
00362         
00363         // ===> Attribute processorType
00364         
00365         
00366         
00367 
00368         
00373         ProcessorTypeMod::ProcessorType getProcessorType() const;
00374         
00375  
00376         
00377         
00385         void setProcessorType (ProcessorTypeMod::ProcessorType processorType);
00386                 
00387         
00388         
00389         
00390 
00391 
00392         
00393         // ===> Attribute phasedArrayList, which is optional
00394         
00395         
00396         
00401         bool isPhasedArrayListExists() const;
00402         
00403 
00404         
00410         vector<int > getPhasedArrayList() const;
00411         
00412  
00413         
00414         
00421         void setPhasedArrayList (vector<int > phasedArrayList);
00422                 
00423         
00424         
00425         
00429         void clearPhasedArrayList ();
00430         
00431 
00432 
00433         
00434         // ===> Attribute spectralType
00435         
00436         
00437         
00438 
00439         
00444         SpectralResolutionTypeMod::SpectralResolutionType getSpectralType() const;
00445         
00446  
00447         
00448         
00456         void setSpectralType (SpectralResolutionTypeMod::SpectralResolutionType spectralType);
00457                 
00458         
00459         
00460         
00461 
00462 
00463         
00464         // ===> Attribute numAssocValues, which is optional
00465         
00466         
00467         
00472         bool isNumAssocValuesExists() const;
00473         
00474 
00475         
00481         int getNumAssocValues() const;
00482         
00483  
00484         
00485         
00492         void setNumAssocValues (int numAssocValues);
00493                 
00494         
00495         
00496         
00500         void clearNumAssocValues ();
00501         
00502 
00503 
00504         
00505         // ===> Attribute assocNature, which is optional
00506         
00507         
00508         
00513         bool isAssocNatureExists() const;
00514         
00515 
00516         
00522         vector<SpectralResolutionTypeMod::SpectralResolutionType > getAssocNature() const;
00523         
00524  
00525         
00526         
00533         void setAssocNature (vector<SpectralResolutionTypeMod::SpectralResolutionType > assocNature);
00534                 
00535         
00536         
00537         
00541         void clearAssocNature ();
00542         
00543 
00544 
00546         // Extrinsic Table Attributes //
00548         
00549         
00550         // ===> Attribute antennaId
00551         
00552         
00553         
00554 
00555         
00560         vector<Tag>  getAntennaId() const;
00561         
00562  
00563         
00564         
00572         void setAntennaId (vector<Tag>  antennaId);
00573                 
00574         
00575         
00576         
00577 
00578 
00579         
00580         // ===> Attribute assocConfigDescriptionId, which is optional
00581         
00582         
00583         
00588         bool isAssocConfigDescriptionIdExists() const;
00589         
00590 
00591         
00597         vector<Tag>  getAssocConfigDescriptionId() const;
00598         
00599  
00600         
00601         
00608         void setAssocConfigDescriptionId (vector<Tag>  assocConfigDescriptionId);
00609                 
00610         
00611         
00612         
00616         void clearAssocConfigDescriptionId ();
00617         
00618 
00619 
00620         
00621         // ===> Attribute dataDescriptionId
00622         
00623         
00624         
00625 
00626         
00631         vector<Tag>  getDataDescriptionId() const;
00632         
00633  
00634         
00635         
00643         void setDataDescriptionId (vector<Tag>  dataDescriptionId);
00644                 
00645         
00646         
00647         
00648 
00649 
00650         
00651         // ===> Attribute feedId
00652         
00653         
00654         
00655 
00656         
00661         vector<int>  getFeedId() const;
00662         
00663  
00664         
00665         
00673         void setFeedId (vector<int>  feedId);
00674                 
00675         
00676         
00677         
00678 
00679 
00680         
00681         // ===> Attribute processorId
00682         
00683         
00684         
00685 
00686         
00691         Tag getProcessorId() const;
00692         
00693  
00694         
00695         
00703         void setProcessorId (Tag processorId);
00704                 
00705         
00706         
00707         
00708 
00709 
00710         
00711         // ===> Attribute switchCycleId
00712         
00713         
00714         
00715 
00716         
00721         vector<Tag>  getSwitchCycleId() const;
00722         
00723  
00724         
00725         
00733         void setSwitchCycleId (vector<Tag>  switchCycleId);
00734                 
00735         
00736         
00737         
00738 
00739 
00741         // Links //
00743         
00744         
00745                 
00752         void setAssocConfigDescriptionId (int i, Tag assocConfigDescriptionId)  ;
00753                         
00754         
00755 
00756         
00757                  
00762  void addAssocConfigDescriptionId(Tag id); 
00763 
00768  void addAssocConfigDescriptionId(const vector<Tag> & id); 
00769  
00770 
00776  const Tag getAssocConfigDescriptionId(int i);
00777  
00785  ConfigDescriptionRow* getConfigDescriptionUsingAssocConfigDescriptionId(int i); 
00786  
00791  vector<ConfigDescriptionRow *> getConfigDescriptionsUsingAssocConfigDescriptionId(); 
00792   
00793 
00794         
00795 
00796         
00797                 
00805         void setAntennaId (int i, Tag antennaId); 
00806                         
00807         
00808 
00809         
00810                  
00815  void addAntennaId(Tag id); 
00816 
00821  void addAntennaId(const vector<Tag> & id); 
00822  
00823 
00829  const Tag getAntennaId(int i);
00830  
00838  AntennaRow* getAntennaUsingAntennaId(int i); 
00839  
00844  vector<AntennaRow *> getAntennasUsingAntennaId(); 
00845   
00846 
00847         
00848 
00849         
00850                 
00858         void setFeedId (int i, int feedId); 
00859                         
00860         
00861 
00862         
00863                 
00864 
00865         // ===> Slices link from a row of ConfigDescription table to a collection of row of Feed table. 
00866 
00871         void addFeedId(int id); 
00872         
00877         void addFeedId(vector<int> id); 
00878 
00879 
00884         const vector <FeedRow *> getFeeds(int i);
00885 
00886 
00892         const vector <FeedRow *> getFeeds();
00893         
00894 
00895 
00896         
00897 
00898         
00899                 
00907         void setSwitchCycleId (int i, Tag switchCycleId); 
00908                         
00909         
00910 
00911         
00912                  
00917  void addSwitchCycleId(Tag id); 
00918 
00923  void addSwitchCycleId(const vector<Tag> & id); 
00924  
00925 
00931  const Tag getSwitchCycleId(int i);
00932  
00940  SwitchCycleRow* getSwitchCycleUsingSwitchCycleId(int i); 
00941  
00946  vector<SwitchCycleRow *> getSwitchCyclesUsingSwitchCycleId(); 
00947   
00948 
00949         
00950 
00951         
00952                 
00960         void setDataDescriptionId (int i, Tag dataDescriptionId); 
00961                         
00962         
00963 
00964         
00965                  
00970  void addDataDescriptionId(Tag id); 
00971 
00976  void addDataDescriptionId(const vector<Tag> & id); 
00977  
00978 
00984  const Tag getDataDescriptionId(int i);
00985  
00993  DataDescriptionRow* getDataDescriptionUsingDataDescriptionId(int i); 
00994  
00999  vector<DataDescriptionRow *> getDataDescriptionsUsingDataDescriptionId(); 
01000   
01001 
01002         
01003 
01004         
01005 
01006         
01007                 
01014          ProcessorRow* getProcessorUsingProcessorId();
01015          
01016 
01017         
01018 
01019         
01020         
01021         
01053         bool compareNoAutoInc(int numAntenna, int numDataDescription, int numFeed, CorrelationModeMod::CorrelationMode correlationMode, int numAtmPhaseCorrection, vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCorrection, ProcessorTypeMod::ProcessorType processorType, SpectralResolutionTypeMod::SpectralResolutionType spectralType, vector<Tag>  antennaId, vector<int>  feedId, vector<Tag>  switchCycleId, vector<Tag>  dataDescriptionId, Tag processorId);
01054         
01055         
01056 
01057         
01089         bool compareRequiredValue(int numAntenna, int numDataDescription, int numFeed, CorrelationModeMod::CorrelationMode correlationMode, int numAtmPhaseCorrection, vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCorrection, ProcessorTypeMod::ProcessorType processorType, SpectralResolutionTypeMod::SpectralResolutionType spectralType, vector<Tag>  antennaId, vector<int>  feedId, vector<Tag>  switchCycleId, vector<Tag>  dataDescriptionId, Tag processorId); 
01090                  
01091         
01100         bool equalByRequiredValue(ConfigDescriptionRow* x) ;
01101         
01102 #ifndef WITHOUT_ACS
01103 
01107         asdmIDL::ConfigDescriptionRowIDL *toIDL() const;
01108 #endif
01109         
01110 #ifndef WITHOUT_ACS
01111 
01116         void setFromIDL (asdmIDL::ConfigDescriptionRowIDL x) ;
01117 #endif
01118         
01123         std::string toXML() const;
01124 
01131         void setFromXML (std::string rowDoc) ;
01132 
01135         // binary-deserialization material from an EndianIStream  //
01137 
01138         std::map<std::string, ConfigDescriptionAttributeFromBin> fromBinMethods;
01139 void configDescriptionIdFromBin( EndianIStream& eis);
01140 void numAntennaFromBin( EndianIStream& eis);
01141 void numDataDescriptionFromBin( EndianIStream& eis);
01142 void numFeedFromBin( EndianIStream& eis);
01143 void correlationModeFromBin( EndianIStream& eis);
01144 void numAtmPhaseCorrectionFromBin( EndianIStream& eis);
01145 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01146 void processorTypeFromBin( EndianIStream& eis);
01147 void spectralTypeFromBin( EndianIStream& eis);
01148 void antennaIdFromBin( EndianIStream& eis);
01149 void feedIdFromBin( EndianIStream& eis);
01150 void switchCycleIdFromBin( EndianIStream& eis);
01151 void dataDescriptionIdFromBin( EndianIStream& eis);
01152 void processorIdFromBin( EndianIStream& eis);
01153 
01154 void phasedArrayListFromBin( EndianIStream& eis);
01155 void numAssocValuesFromBin( EndianIStream& eis);
01156 void assocNatureFromBin( EndianIStream& eis);
01157 void assocConfigDescriptionIdFromBin( EndianIStream& eis);
01158 
01159 
01167          static ConfigDescriptionRow* fromBin(EndianIStream& eis, ConfigDescriptionTable& table, const std::vector<std::string>& attributesSeq);         
01168  
01175          void fromText(const std::string& attributeName, const std::string&  t);
01177 
01178 private:
01182         ConfigDescriptionTable &table;
01186         bool hasBeenAdded;
01187 
01188         // This method is used by the Table class when this row is added to the table.
01189         void isAdded(bool added);
01190 
01191 
01200         ConfigDescriptionRow (ConfigDescriptionTable &table);
01201 
01219          ConfigDescriptionRow (ConfigDescriptionTable &table, ConfigDescriptionRow &row);
01220                 
01222         // Intrinsic Table Attributes //
01224         
01225         
01226         // ===> Attribute numAntenna
01227         
01228         
01229 
01230         int numAntenna;
01231 
01232         
01233         
01234         
01235 
01236         
01237         // ===> Attribute numDataDescription
01238         
01239         
01240 
01241         int numDataDescription;
01242 
01243         
01244         
01245         
01246 
01247         
01248         // ===> Attribute numFeed
01249         
01250         
01251 
01252         int numFeed;
01253 
01254         
01255         
01256         
01257 
01258         
01259         // ===> Attribute correlationMode
01260         
01261         
01262 
01263         CorrelationModeMod::CorrelationMode correlationMode;
01264 
01265         
01266         
01267         
01268 
01269         
01270         // ===> Attribute configDescriptionId
01271         
01272         
01273 
01274         Tag configDescriptionId;
01275 
01276         
01277         
01278         
01288         void setConfigDescriptionId (Tag configDescriptionId);
01289                 
01290         
01291 
01292         
01293         // ===> Attribute numAtmPhaseCorrection
01294         
01295         
01296 
01297         int numAtmPhaseCorrection;
01298 
01299         
01300         
01301         
01302 
01303         
01304         // ===> Attribute atmPhaseCorrection
01305         
01306         
01307 
01308         vector<AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCorrection;
01309 
01310         
01311         
01312         
01313 
01314         
01315         // ===> Attribute processorType
01316         
01317         
01318 
01319         ProcessorTypeMod::ProcessorType processorType;
01320 
01321         
01322         
01323         
01324 
01325         
01326         // ===> Attribute phasedArrayList, which is optional
01327         
01328         
01329         bool phasedArrayListExists;
01330         
01331 
01332         vector<int > phasedArrayList;
01333 
01334         
01335         
01336         
01337 
01338         
01339         // ===> Attribute spectralType
01340         
01341         
01342 
01343         SpectralResolutionTypeMod::SpectralResolutionType spectralType;
01344 
01345         
01346         
01347         
01348 
01349         
01350         // ===> Attribute numAssocValues, which is optional
01351         
01352         
01353         bool numAssocValuesExists;
01354         
01355 
01356         int numAssocValues;
01357 
01358         
01359         
01360         
01361 
01362         
01363         // ===> Attribute assocNature, which is optional
01364         
01365         
01366         bool assocNatureExists;
01367         
01368 
01369         vector<SpectralResolutionTypeMod::SpectralResolutionType > assocNature;
01370 
01371         
01372         
01373         
01374 
01376         // Extrinsic Table Attributes //
01378         
01379         
01380         // ===> Attribute antennaId
01381         
01382         
01383 
01384         vector<Tag>  antennaId;
01385 
01386         
01387         
01388         
01389 
01390         
01391         // ===> Attribute assocConfigDescriptionId, which is optional
01392         
01393         
01394         bool assocConfigDescriptionIdExists;
01395         
01396 
01397         vector<Tag>  assocConfigDescriptionId;
01398 
01399         
01400         
01401         
01402 
01403         
01404         // ===> Attribute dataDescriptionId
01405         
01406         
01407 
01408         vector<Tag>  dataDescriptionId;
01409 
01410         
01411         
01412         
01413 
01414         
01415         // ===> Attribute feedId
01416         
01417         
01418 
01419         vector<int>  feedId;
01420 
01421         
01422         
01423         
01424 
01425         
01426         // ===> Attribute processorId
01427         
01428         
01429 
01430         Tag processorId;
01431 
01432         
01433         
01434         
01435 
01436         
01437         // ===> Attribute switchCycleId
01438         
01439         
01440 
01441         vector<Tag>  switchCycleId;
01442 
01443         
01444         
01445         
01446 
01448         // Links //
01450         
01451         
01452                 
01453 
01454 
01455         
01456 
01457         
01458                 
01459 
01460 
01461         
01462 
01463         
01464                 
01465         
01466 
01467         
01468 
01469         
01470                 
01471 
01472 
01473         
01474 
01475         
01476                 
01477 
01478 
01479         
01480 
01481         
01482                 
01483 
01484          
01485 
01486         
01487 
01488         
01489 /*
01491         // binary-deserialization material from an EndianIStream  //
01493         std::map<std::string, ConfigDescriptionAttributeFromBin> fromBinMethods;
01494 void configDescriptionIdFromBin( EndianIStream& eis);
01495 void numAntennaFromBin( EndianIStream& eis);
01496 void numDataDescriptionFromBin( EndianIStream& eis);
01497 void numFeedFromBin( EndianIStream& eis);
01498 void correlationModeFromBin( EndianIStream& eis);
01499 void numAtmPhaseCorrectionFromBin( EndianIStream& eis);
01500 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01501 void processorTypeFromBin( EndianIStream& eis);
01502 void spectralTypeFromBin( EndianIStream& eis);
01503 void antennaIdFromBin( EndianIStream& eis);
01504 void feedIdFromBin( EndianIStream& eis);
01505 void switchCycleIdFromBin( EndianIStream& eis);
01506 void dataDescriptionIdFromBin( EndianIStream& eis);
01507 void processorIdFromBin( EndianIStream& eis);
01508 
01509 void phasedArrayListFromBin( EndianIStream& eis);
01510 void numAssocValuesFromBin( EndianIStream& eis);
01511 void assocNatureFromBin( EndianIStream& eis);
01512 void assocConfigDescriptionIdFromBin( EndianIStream& eis);
01513 
01514 */
01515         
01517         // text-deserialization material //
01519         std::map<std::string, ConfigDescriptionAttributeFromText> fromTextMethods;
01520         
01521 void configDescriptionIdFromText (const string & s);
01522         
01523         
01524 void numAntennaFromText (const string & s);
01525         
01526         
01527 void numDataDescriptionFromText (const string & s);
01528         
01529         
01530 void numFeedFromText (const string & s);
01531         
01532         
01533 void correlationModeFromText (const string & s);
01534         
01535         
01536 void numAtmPhaseCorrectionFromText (const string & s);
01537         
01538         
01539 void atmPhaseCorrectionFromText (const string & s);
01540         
01541         
01542 void processorTypeFromText (const string & s);
01543         
01544         
01545 void spectralTypeFromText (const string & s);
01546         
01547         
01548 void antennaIdFromText (const string & s);
01549         
01550         
01551 void feedIdFromText (const string & s);
01552         
01553         
01554 void switchCycleIdFromText (const string & s);
01555         
01556         
01557 void dataDescriptionIdFromText (const string & s);
01558         
01559         
01560 void processorIdFromText (const string & s);
01561         
01562 
01563         
01564 void phasedArrayListFromText (const string & s);
01565         
01566         
01567 void numAssocValuesFromText (const string & s);
01568         
01569         
01570 void assocNatureFromText (const string & s);
01571         
01572         
01573 void assocConfigDescriptionIdFromText (const string & s);
01574         
01575         
01576         
01581          void toBin(EndianOSStream& eoss);
01582                  
01592 };
01593 
01594 } // End namespace asdm
01595 
01596 #endif /* ConfigDescription_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines