casa  $Rev:20696$
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.62", 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);     
00759  
00766          void fromText(const std::string& attributeName, const std::string&  t);
00768 
00769 private:
00773         CalDataTable &table;
00777         bool hasBeenAdded;
00778 
00779         // This method is used by the Table class when this row is added to the table.
00780         void isAdded(bool added);
00781 
00782 
00791         CalDataRow (CalDataTable &table);
00792 
00810          CalDataRow (CalDataTable &table, CalDataRow &row);
00811                 
00813         // Intrinsic Table Attributes //
00815         
00816         
00817         // ===> Attribute calDataId
00818         
00819         
00820 
00821         Tag calDataId;
00822 
00823         
00824         
00825         
00835         void setCalDataId (Tag calDataId);
00836                 
00837         
00838 
00839         
00840         // ===> Attribute startTimeObserved
00841         
00842         
00843 
00844         ArrayTime startTimeObserved;
00845 
00846         
00847         
00848         
00849 
00850         
00851         // ===> Attribute endTimeObserved
00852         
00853         
00854 
00855         ArrayTime endTimeObserved;
00856 
00857         
00858         
00859         
00860 
00861         
00862         // ===> Attribute execBlockUID
00863         
00864         
00865 
00866         EntityRef execBlockUID;
00867 
00868         
00869         
00870         
00871 
00872         
00873         // ===> Attribute calDataType
00874         
00875         
00876 
00877         CalDataOriginMod::CalDataOrigin calDataType;
00878 
00879         
00880         
00881         
00882 
00883         
00884         // ===> Attribute calType
00885         
00886         
00887 
00888         CalTypeMod::CalType calType;
00889 
00890         
00891         
00892         
00893 
00894         
00895         // ===> Attribute numScan
00896         
00897         
00898 
00899         int numScan;
00900 
00901         
00902         
00903         
00904 
00905         
00906         // ===> Attribute scanSet
00907         
00908         
00909 
00910         vector<int > scanSet;
00911 
00912         
00913         
00914         
00915 
00916         
00917         // ===> Attribute assocCalDataId, which is optional
00918         
00919         
00920         bool assocCalDataIdExists;
00921         
00922 
00923         Tag assocCalDataId;
00924 
00925         
00926         
00927         
00928 
00929         
00930         // ===> Attribute assocCalNature, which is optional
00931         
00932         
00933         bool assocCalNatureExists;
00934         
00935 
00936         AssociatedCalNatureMod::AssociatedCalNature assocCalNature;
00937 
00938         
00939         
00940         
00941 
00942         
00943         // ===> Attribute fieldName, which is optional
00944         
00945         
00946         bool fieldNameExists;
00947         
00948 
00949         vector<string > fieldName;
00950 
00951         
00952         
00953         
00954 
00955         
00956         // ===> Attribute sourceName, which is optional
00957         
00958         
00959         bool sourceNameExists;
00960         
00961 
00962         vector<string > sourceName;
00963 
00964         
00965         
00966         
00967 
00968         
00969         // ===> Attribute sourceCode, which is optional
00970         
00971         
00972         bool sourceCodeExists;
00973         
00974 
00975         vector<string > sourceCode;
00976 
00977         
00978         
00979         
00980 
00981         
00982         // ===> Attribute scanIntent, which is optional
00983         
00984         
00985         bool scanIntentExists;
00986         
00987 
00988         vector<ScanIntentMod::ScanIntent > scanIntent;
00989 
00990         
00991         
00992         
00993 
00995         // Extrinsic Table Attributes //
00997         
00999         // Links //
01001         
01002         
01003 /*
01005         // binary-deserialization material from an EndianIStream  //
01007         std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
01008 void calDataIdFromBin( EndianIStream& eis);
01009 void startTimeObservedFromBin( EndianIStream& eis);
01010 void endTimeObservedFromBin( EndianIStream& eis);
01011 void execBlockUIDFromBin( EndianIStream& eis);
01012 void calDataTypeFromBin( EndianIStream& eis);
01013 void calTypeFromBin( EndianIStream& eis);
01014 void numScanFromBin( EndianIStream& eis);
01015 void scanSetFromBin( EndianIStream& eis);
01016 
01017 void assocCalDataIdFromBin( EndianIStream& eis);
01018 void assocCalNatureFromBin( EndianIStream& eis);
01019 void fieldNameFromBin( EndianIStream& eis);
01020 void sourceNameFromBin( EndianIStream& eis);
01021 void sourceCodeFromBin( EndianIStream& eis);
01022 void scanIntentFromBin( EndianIStream& eis);
01023 
01024 */
01025         
01027         // text-deserialization material //
01029         std::map<std::string, CalDataAttributeFromText> fromTextMethods;
01030         
01031 void calDataIdFromText (const string & s);
01032         
01033         
01034 void startTimeObservedFromText (const string & s);
01035         
01036         
01037 void endTimeObservedFromText (const string & s);
01038         
01039         
01040         
01041 void calDataTypeFromText (const string & s);
01042         
01043         
01044 void calTypeFromText (const string & s);
01045         
01046         
01047 void numScanFromText (const string & s);
01048         
01049         
01050 void scanSetFromText (const string & s);
01051         
01052 
01053         
01054 void assocCalDataIdFromText (const string & s);
01055         
01056         
01057 void assocCalNatureFromText (const string & s);
01058         
01059         
01060 void fieldNameFromText (const string & s);
01061         
01062         
01063 void sourceNameFromText (const string & s);
01064         
01065         
01066 void sourceCodeFromText (const string & s);
01067         
01068         
01069 void scanIntentFromText (const string & s);
01070         
01071         
01072         
01077          void toBin(EndianOSStream& eoss);
01078                  
01088 };
01089 
01090 } // End namespace asdm
01091 
01092 #endif /* CalData_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines