casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalDataRow.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 CalDataRow.h
00032  */
00033  
00034 #ifndef CalDataRow_CLASS
00035 #define CalDataRow_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 <Tag.h>
00056         
00057 
00058          
00059 #include <EntityRef.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 #include "CCalDataOrigin.h"
00075         
00076 
00077         
00078 #include "CCalType.h"
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 #include "CAssociatedCalNature.h"
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 #include "CScanIntent.h"
00099         
00100 
00101 
00102 
00103 #include <ConversionException.h>
00104 #include <NoSuchRow.h>
00105 #include <IllegalAccessException.h>
00106 
00107 #include <RowTransformer.h>
00108 //#include <TableStreamReader.h>
00109 
00110 /*\file CalData.h
00111     \brief Generated from model's revision "1.61", branch "HEAD"
00112 */
00113 
00114 namespace asdm {
00115 
00116 //class asdm::CalDataTable;
00117 
00118         
00119 
00120 class CalDataRow;
00121 typedef void (CalDataRow::*CalDataAttributeFromBin) (EndianIStream& eis);
00122 typedef void (CalDataRow::*CalDataAttributeFromText) (const string& s);
00123 
00130 class CalDataRow {
00131 friend class asdm::CalDataTable;
00132 friend class asdm::RowTransformer<CalDataRow>;
00133 //friend class asdm::TableStreamReader<CalDataTable, CalDataRow>;
00134 
00135 public:
00136 
00137         virtual ~CalDataRow();
00138 
00142         CalDataTable &getTable() const;
00143         
00148         bool isAdded() const;
00149                 
00151         // Intrinsic Table Attributes //
00153         
00154         
00155         // ===> Attribute calDataId
00156         
00157         
00158         
00159 
00160         
00165         Tag getCalDataId() const;
00166         
00167  
00168         
00169         
00170         
00171         
00172 
00173 
00174         
00175         // ===> Attribute startTimeObserved
00176         
00177         
00178         
00179 
00180         
00185         ArrayTime getStartTimeObserved() const;
00186         
00187  
00188         
00189         
00197         void setStartTimeObserved (ArrayTime startTimeObserved);
00198                 
00199         
00200         
00201         
00202 
00203 
00204         
00205         // ===> Attribute endTimeObserved
00206         
00207         
00208         
00209 
00210         
00215         ArrayTime getEndTimeObserved() const;
00216         
00217  
00218         
00219         
00227         void setEndTimeObserved (ArrayTime endTimeObserved);
00228                 
00229         
00230         
00231         
00232 
00233 
00234         
00235         // ===> Attribute execBlockUID
00236         
00237         
00238         
00239 
00240         
00245         EntityRef getExecBlockUID() const;
00246         
00247  
00248         
00249         
00257         void setExecBlockUID (EntityRef execBlockUID);
00258                 
00259         
00260         
00261         
00262 
00263 
00264         
00265         // ===> Attribute calDataType
00266         
00267         
00268         
00269 
00270         
00275         CalDataOriginMod::CalDataOrigin getCalDataType() const;
00276         
00277  
00278         
00279         
00287         void setCalDataType (CalDataOriginMod::CalDataOrigin calDataType);
00288                 
00289         
00290         
00291         
00292 
00293 
00294         
00295         // ===> Attribute calType
00296         
00297         
00298         
00299 
00300         
00305         CalTypeMod::CalType getCalType() const;
00306         
00307  
00308         
00309         
00317         void setCalType (CalTypeMod::CalType calType);
00318                 
00319         
00320         
00321         
00322 
00323 
00324         
00325         // ===> Attribute numScan
00326         
00327         
00328         
00329 
00330         
00335         int getNumScan() const;
00336         
00337  
00338         
00339         
00347         void setNumScan (int numScan);
00348                 
00349         
00350         
00351         
00352 
00353 
00354         
00355         // ===> Attribute scanSet
00356         
00357         
00358         
00359 
00360         
00365         vector<int > getScanSet() const;
00366         
00367  
00368         
00369         
00377         void setScanSet (vector<int > scanSet);
00378                 
00379         
00380         
00381         
00382 
00383 
00384         
00385         // ===> Attribute assocCalDataId, which is optional
00386         
00387         
00388         
00393         bool isAssocCalDataIdExists() const;
00394         
00395 
00396         
00402         Tag getAssocCalDataId() const;
00403         
00404  
00405         
00406         
00413         void setAssocCalDataId (Tag assocCalDataId);
00414                 
00415         
00416         
00417         
00421         void clearAssocCalDataId ();
00422         
00423 
00424 
00425         
00426         // ===> Attribute assocCalNature, which is optional
00427         
00428         
00429         
00434         bool isAssocCalNatureExists() const;
00435         
00436 
00437         
00443         AssociatedCalNatureMod::AssociatedCalNature getAssocCalNature() const;
00444         
00445  
00446         
00447         
00454         void setAssocCalNature (AssociatedCalNatureMod::AssociatedCalNature assocCalNature);
00455                 
00456         
00457         
00458         
00462         void clearAssocCalNature ();
00463         
00464 
00465 
00466         
00467         // ===> Attribute fieldName, which is optional
00468         
00469         
00470         
00475         bool isFieldNameExists() const;
00476         
00477 
00478         
00484         vector<string > getFieldName() const;
00485         
00486  
00487         
00488         
00495         void setFieldName (vector<string > fieldName);
00496                 
00497         
00498         
00499         
00503         void clearFieldName ();
00504         
00505 
00506 
00507         
00508         // ===> Attribute sourceName, which is optional
00509         
00510         
00511         
00516         bool isSourceNameExists() const;
00517         
00518 
00519         
00525         vector<string > getSourceName() const;
00526         
00527  
00528         
00529         
00536         void setSourceName (vector<string > sourceName);
00537                 
00538         
00539         
00540         
00544         void clearSourceName ();
00545         
00546 
00547 
00548         
00549         // ===> Attribute sourceCode, which is optional
00550         
00551         
00552         
00557         bool isSourceCodeExists() const;
00558         
00559 
00560         
00566         vector<string > getSourceCode() const;
00567         
00568  
00569         
00570         
00577         void setSourceCode (vector<string > sourceCode);
00578                 
00579         
00580         
00581         
00585         void clearSourceCode ();
00586         
00587 
00588 
00589         
00590         // ===> Attribute scanIntent, which is optional
00591         
00592         
00593         
00598         bool isScanIntentExists() const;
00599         
00600 
00601         
00607         vector<ScanIntentMod::ScanIntent > getScanIntent() const;
00608         
00609  
00610         
00611         
00618         void setScanIntent (vector<ScanIntentMod::ScanIntent > scanIntent);
00619                 
00620         
00621         
00622         
00626         void clearScanIntent ();
00627         
00628 
00629 
00631         // Extrinsic Table Attributes //
00633         
00635         // Links //
00637         
00638         
00639         
00640         
00660         bool compareNoAutoInc(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, vector<int > scanSet);
00661         
00662         
00663 
00664         
00684         bool compareRequiredValue(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, vector<int > scanSet); 
00685                  
00686         
00695         bool equalByRequiredValue(CalDataRow* x) ;
00696         
00697 #ifndef WITHOUT_ACS
00698 
00702         asdmIDL::CalDataRowIDL *toIDL() const;
00703 #endif
00704         
00705 #ifndef WITHOUT_ACS
00706 
00711         void setFromIDL (asdmIDL::CalDataRowIDL x) ;
00712 #endif
00713         
00718         std::string toXML() const;
00719 
00726         void setFromXML (std::string rowDoc) ;
00727 
00730         // binary-deserialization material from an EndianIStream  //
00732 
00733         std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
00734 void calDataIdFromBin( EndianIStream& eis);
00735 void startTimeObservedFromBin( EndianIStream& eis);
00736 void endTimeObservedFromBin( EndianIStream& eis);
00737 void execBlockUIDFromBin( EndianIStream& eis);
00738 void calDataTypeFromBin( EndianIStream& eis);
00739 void calTypeFromBin( EndianIStream& eis);
00740 void numScanFromBin( EndianIStream& eis);
00741 void scanSetFromBin( EndianIStream& eis);
00742 
00743 void assocCalDataIdFromBin( EndianIStream& eis);
00744 void assocCalNatureFromBin( EndianIStream& eis);
00745 void fieldNameFromBin( EndianIStream& eis);
00746 void sourceNameFromBin( EndianIStream& eis);
00747 void sourceCodeFromBin( EndianIStream& eis);
00748 void scanIntentFromBin( EndianIStream& eis);
00749 
00750 
00758          static CalDataRow* fromBin(EndianIStream& eis, CalDataTable& table, const std::vector<std::string>& attributesSeq);     
00760 
00761 private:
00765         CalDataTable &table;
00769         bool hasBeenAdded;
00770 
00771         // This method is used by the Table class when this row is added to the table.
00772         void isAdded(bool added);
00773 
00774 
00783         CalDataRow (CalDataTable &table);
00784 
00802          CalDataRow (CalDataTable &table, CalDataRow &row);
00803                 
00805         // Intrinsic Table Attributes //
00807         
00808         
00809         // ===> Attribute calDataId
00810         
00811         
00812 
00813         Tag calDataId;
00814 
00815         
00816         
00817         
00827         void setCalDataId (Tag calDataId);
00828                 
00829         
00830 
00831         
00832         // ===> Attribute startTimeObserved
00833         
00834         
00835 
00836         ArrayTime startTimeObserved;
00837 
00838         
00839         
00840         
00841 
00842         
00843         // ===> Attribute endTimeObserved
00844         
00845         
00846 
00847         ArrayTime endTimeObserved;
00848 
00849         
00850         
00851         
00852 
00853         
00854         // ===> Attribute execBlockUID
00855         
00856         
00857 
00858         EntityRef execBlockUID;
00859 
00860         
00861         
00862         
00863 
00864         
00865         // ===> Attribute calDataType
00866         
00867         
00868 
00869         CalDataOriginMod::CalDataOrigin calDataType;
00870 
00871         
00872         
00873         
00874 
00875         
00876         // ===> Attribute calType
00877         
00878         
00879 
00880         CalTypeMod::CalType calType;
00881 
00882         
00883         
00884         
00885 
00886         
00887         // ===> Attribute numScan
00888         
00889         
00890 
00891         int numScan;
00892 
00893         
00894         
00895         
00896 
00897         
00898         // ===> Attribute scanSet
00899         
00900         
00901 
00902         vector<int > scanSet;
00903 
00904         
00905         
00906         
00907 
00908         
00909         // ===> Attribute assocCalDataId, which is optional
00910         
00911         
00912         bool assocCalDataIdExists;
00913         
00914 
00915         Tag assocCalDataId;
00916 
00917         
00918         
00919         
00920 
00921         
00922         // ===> Attribute assocCalNature, which is optional
00923         
00924         
00925         bool assocCalNatureExists;
00926         
00927 
00928         AssociatedCalNatureMod::AssociatedCalNature assocCalNature;
00929 
00930         
00931         
00932         
00933 
00934         
00935         // ===> Attribute fieldName, which is optional
00936         
00937         
00938         bool fieldNameExists;
00939         
00940 
00941         vector<string > fieldName;
00942 
00943         
00944         
00945         
00946 
00947         
00948         // ===> Attribute sourceName, which is optional
00949         
00950         
00951         bool sourceNameExists;
00952         
00953 
00954         vector<string > sourceName;
00955 
00956         
00957         
00958         
00959 
00960         
00961         // ===> Attribute sourceCode, which is optional
00962         
00963         
00964         bool sourceCodeExists;
00965         
00966 
00967         vector<string > sourceCode;
00968 
00969         
00970         
00971         
00972 
00973         
00974         // ===> Attribute scanIntent, which is optional
00975         
00976         
00977         bool scanIntentExists;
00978         
00979 
00980         vector<ScanIntentMod::ScanIntent > scanIntent;
00981 
00982         
00983         
00984         
00985 
00987         // Extrinsic Table Attributes //
00989         
00991         // Links //
00993         
00994         
00995 /*
00997         // binary-deserialization material from an EndianIStream  //
00999         std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
01000 void calDataIdFromBin( EndianIStream& eis);
01001 void startTimeObservedFromBin( EndianIStream& eis);
01002 void endTimeObservedFromBin( EndianIStream& eis);
01003 void execBlockUIDFromBin( EndianIStream& eis);
01004 void calDataTypeFromBin( EndianIStream& eis);
01005 void calTypeFromBin( EndianIStream& eis);
01006 void numScanFromBin( EndianIStream& eis);
01007 void scanSetFromBin( EndianIStream& eis);
01008 
01009 void assocCalDataIdFromBin( EndianIStream& eis);
01010 void assocCalNatureFromBin( EndianIStream& eis);
01011 void fieldNameFromBin( EndianIStream& eis);
01012 void sourceNameFromBin( EndianIStream& eis);
01013 void sourceCodeFromBin( EndianIStream& eis);
01014 void scanIntentFromBin( EndianIStream& eis);
01015 
01016 */
01017         
01019         // text-deserialization material //
01021         std::map<std::string, CalDataAttributeFromText> fromTextMethods;
01022         
01023 void calDataIdFromText (const string & s);
01024         
01025         
01026 void startTimeObservedFromText (const string & s);
01027         
01028         
01029 void endTimeObservedFromText (const string & s);
01030         
01031         
01032         
01033 void calDataTypeFromText (const string & s);
01034         
01035         
01036 void calTypeFromText (const string & s);
01037         
01038         
01039 void numScanFromText (const string & s);
01040         
01041         
01042 void scanSetFromText (const string & s);
01043         
01044 
01045         
01046 void assocCalDataIdFromText (const string & s);
01047         
01048         
01049 void assocCalNatureFromText (const string & s);
01050         
01051         
01052 void fieldNameFromText (const string & s);
01053         
01054         
01055 void sourceNameFromText (const string & s);
01056         
01057         
01058 void sourceCodeFromText (const string & s);
01059         
01060         
01061 void scanIntentFromText (const string & s);
01062         
01063         
01064         
01065         void fromText(const std::string& attributeName, const std::string&  t);
01066         
01071          void toBin(EndianOSStream& eoss);
01072                  
01082 };
01083 
01084 } // End namespace asdm
01085 
01086 #endif /* CalData_CLASS */