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.64", 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         
00711          void toIDL(asdmIDL::CalDataRowIDL& x) const;
00712 #endif
00713         
00714 #ifndef WITHOUT_ACS
00715 
00720         void setFromIDL (asdmIDL::CalDataRowIDL x) ;
00721 #endif
00722         
00727         std::string toXML() const;
00728 
00735         void setFromXML (std::string rowDoc) ;
00736 
00739         // binary-deserialization material from an EndianIStream  //
00741 
00742         std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
00743 void calDataIdFromBin( EndianIStream& eis);
00744 void startTimeObservedFromBin( EndianIStream& eis);
00745 void endTimeObservedFromBin( EndianIStream& eis);
00746 void execBlockUIDFromBin( EndianIStream& eis);
00747 void calDataTypeFromBin( EndianIStream& eis);
00748 void calTypeFromBin( EndianIStream& eis);
00749 void numScanFromBin( EndianIStream& eis);
00750 void scanSetFromBin( EndianIStream& eis);
00751 
00752 void assocCalDataIdFromBin( EndianIStream& eis);
00753 void assocCalNatureFromBin( EndianIStream& eis);
00754 void fieldNameFromBin( EndianIStream& eis);
00755 void sourceNameFromBin( EndianIStream& eis);
00756 void sourceCodeFromBin( EndianIStream& eis);
00757 void scanIntentFromBin( EndianIStream& eis);
00758 
00759 
00767          static CalDataRow* fromBin(EndianIStream& eis, CalDataTable& table, const std::vector<std::string>& attributesSeq);     
00768  
00775          void fromText(const std::string& attributeName, const std::string&  t);
00777 
00778 private:
00782         CalDataTable &table;
00786         bool hasBeenAdded;
00787 
00788         // This method is used by the Table class when this row is added to the table.
00789         void isAdded(bool added);
00790 
00791 
00800         CalDataRow (CalDataTable &table);
00801 
00819          CalDataRow (CalDataTable &table, CalDataRow &row);
00820                 
00822         // Intrinsic Table Attributes //
00824         
00825         
00826         // ===> Attribute calDataId
00827         
00828         
00829 
00830         Tag calDataId;
00831 
00832         
00833         
00834         
00844         void setCalDataId (Tag calDataId);
00845                 
00846         
00847 
00848         
00849         // ===> Attribute startTimeObserved
00850         
00851         
00852 
00853         ArrayTime startTimeObserved;
00854 
00855         
00856         
00857         
00858 
00859         
00860         // ===> Attribute endTimeObserved
00861         
00862         
00863 
00864         ArrayTime endTimeObserved;
00865 
00866         
00867         
00868         
00869 
00870         
00871         // ===> Attribute execBlockUID
00872         
00873         
00874 
00875         EntityRef execBlockUID;
00876 
00877         
00878         
00879         
00880 
00881         
00882         // ===> Attribute calDataType
00883         
00884         
00885 
00886         CalDataOriginMod::CalDataOrigin calDataType;
00887 
00888         
00889         
00890         
00891 
00892         
00893         // ===> Attribute calType
00894         
00895         
00896 
00897         CalTypeMod::CalType calType;
00898 
00899         
00900         
00901         
00902 
00903         
00904         // ===> Attribute numScan
00905         
00906         
00907 
00908         int numScan;
00909 
00910         
00911         
00912         
00913 
00914         
00915         // ===> Attribute scanSet
00916         
00917         
00918 
00919         vector<int > scanSet;
00920 
00921         
00922         
00923         
00924 
00925         
00926         // ===> Attribute assocCalDataId, which is optional
00927         
00928         
00929         bool assocCalDataIdExists;
00930         
00931 
00932         Tag assocCalDataId;
00933 
00934         
00935         
00936         
00937 
00938         
00939         // ===> Attribute assocCalNature, which is optional
00940         
00941         
00942         bool assocCalNatureExists;
00943         
00944 
00945         AssociatedCalNatureMod::AssociatedCalNature assocCalNature;
00946 
00947         
00948         
00949         
00950 
00951         
00952         // ===> Attribute fieldName, which is optional
00953         
00954         
00955         bool fieldNameExists;
00956         
00957 
00958         vector<string > fieldName;
00959 
00960         
00961         
00962         
00963 
00964         
00965         // ===> Attribute sourceName, which is optional
00966         
00967         
00968         bool sourceNameExists;
00969         
00970 
00971         vector<string > sourceName;
00972 
00973         
00974         
00975         
00976 
00977         
00978         // ===> Attribute sourceCode, which is optional
00979         
00980         
00981         bool sourceCodeExists;
00982         
00983 
00984         vector<string > sourceCode;
00985 
00986         
00987         
00988         
00989 
00990         
00991         // ===> Attribute scanIntent, which is optional
00992         
00993         
00994         bool scanIntentExists;
00995         
00996 
00997         vector<ScanIntentMod::ScanIntent > scanIntent;
00998 
00999         
01000         
01001         
01002 
01004         // Extrinsic Table Attributes //
01006         
01008         // Links //
01010         
01011         
01012 /*
01014         // binary-deserialization material from an EndianIStream  //
01016         std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
01017 void calDataIdFromBin( EndianIStream& eis);
01018 void startTimeObservedFromBin( EndianIStream& eis);
01019 void endTimeObservedFromBin( EndianIStream& eis);
01020 void execBlockUIDFromBin( EndianIStream& eis);
01021 void calDataTypeFromBin( EndianIStream& eis);
01022 void calTypeFromBin( EndianIStream& eis);
01023 void numScanFromBin( EndianIStream& eis);
01024 void scanSetFromBin( EndianIStream& eis);
01025 
01026 void assocCalDataIdFromBin( EndianIStream& eis);
01027 void assocCalNatureFromBin( EndianIStream& eis);
01028 void fieldNameFromBin( EndianIStream& eis);
01029 void sourceNameFromBin( EndianIStream& eis);
01030 void sourceCodeFromBin( EndianIStream& eis);
01031 void scanIntentFromBin( EndianIStream& eis);
01032 
01033 */
01034         
01036         // text-deserialization material //
01038         std::map<std::string, CalDataAttributeFromText> fromTextMethods;
01039         
01040 void calDataIdFromText (const string & s);
01041         
01042         
01043 void startTimeObservedFromText (const string & s);
01044         
01045         
01046 void endTimeObservedFromText (const string & s);
01047         
01048         
01049         
01050 void calDataTypeFromText (const string & s);
01051         
01052         
01053 void calTypeFromText (const string & s);
01054         
01055         
01056 void numScanFromText (const string & s);
01057         
01058         
01059 void scanSetFromText (const string & s);
01060         
01061 
01062         
01063 void assocCalDataIdFromText (const string & s);
01064         
01065         
01066 void assocCalNatureFromText (const string & s);
01067         
01068         
01069 void fieldNameFromText (const string & s);
01070         
01071         
01072 void sourceNameFromText (const string & s);
01073         
01074         
01075 void sourceCodeFromText (const string & s);
01076         
01077         
01078 void scanIntentFromText (const string & s);
01079         
01080         
01081         
01086          void toBin(EndianOSStream& eoss);
01087                  
01097 };
01098 
01099 } // End namespace asdm
01100 
01101 #endif /* CalData_CLASS */