casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SBSummaryRow.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 SBSummaryRow.h
00032  */
00033  
00034 #ifndef SBSummaryRow_CLASS
00035 #define SBSummaryRow_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 <Angle.h>
00056         
00057 
00058          
00059 #include <Interval.h>
00060         
00061 
00062          
00063 #include <Tag.h>
00064         
00065 
00066          
00067 #include <EntityRef.h>
00068         
00069 
00070 
00071 
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 #include "CReceiverBand.h"
00085         
00086 
00087         
00088 #include "CSBType.h"
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 #include "CDirectionReferenceCode.h"
00111         
00112 
00113         
00114 
00115 
00116 
00117 #include <ConversionException.h>
00118 #include <NoSuchRow.h>
00119 #include <IllegalAccessException.h>
00120 
00121 #include <RowTransformer.h>
00122 //#include <TableStreamReader.h>
00123 
00124 /*\file SBSummary.h
00125     \brief Generated from model's revision "1.64", branch "HEAD"
00126 */
00127 
00128 namespace asdm {
00129 
00130 //class asdm::SBSummaryTable;
00131 
00132         
00133 
00134 class SBSummaryRow;
00135 typedef void (SBSummaryRow::*SBSummaryAttributeFromBin) (EndianIStream& eis);
00136 typedef void (SBSummaryRow::*SBSummaryAttributeFromText) (const string& s);
00137 
00144 class SBSummaryRow {
00145 friend class asdm::SBSummaryTable;
00146 friend class asdm::RowTransformer<SBSummaryRow>;
00147 //friend class asdm::TableStreamReader<SBSummaryTable, SBSummaryRow>;
00148 
00149 public:
00150 
00151         virtual ~SBSummaryRow();
00152 
00156         SBSummaryTable &getTable() const;
00157         
00162         bool isAdded() const;
00163                 
00165         // Intrinsic Table Attributes //
00167         
00168         
00169         // ===> Attribute sBSummaryId
00170         
00171         
00172         
00173 
00174         
00179         Tag getSBSummaryId() const;
00180         
00181  
00182         
00183         
00184         
00185         
00186 
00187 
00188         
00189         // ===> Attribute sbSummaryUID
00190         
00191         
00192         
00193 
00194         
00199         EntityRef getSbSummaryUID() const;
00200         
00201  
00202         
00203         
00211         void setSbSummaryUID (EntityRef sbSummaryUID);
00212                 
00213         
00214         
00215         
00216 
00217 
00218         
00219         // ===> Attribute projectUID
00220         
00221         
00222         
00223 
00224         
00229         EntityRef getProjectUID() const;
00230         
00231  
00232         
00233         
00241         void setProjectUID (EntityRef projectUID);
00242                 
00243         
00244         
00245         
00246 
00247 
00248         
00249         // ===> Attribute obsUnitSetUID
00250         
00251         
00252         
00253 
00254         
00259         EntityRef getObsUnitSetUID() const;
00260         
00261  
00262         
00263         
00271         void setObsUnitSetUID (EntityRef obsUnitSetUID);
00272                 
00273         
00274         
00275         
00276 
00277 
00278         
00279         // ===> Attribute frequency
00280         
00281         
00282         
00283 
00284         
00289         double getFrequency() const;
00290         
00291  
00292         
00293         
00301         void setFrequency (double frequency);
00302                 
00303         
00304         
00305         
00306 
00307 
00308         
00309         // ===> Attribute frequencyBand
00310         
00311         
00312         
00313 
00314         
00319         ReceiverBandMod::ReceiverBand getFrequencyBand() const;
00320         
00321  
00322         
00323         
00331         void setFrequencyBand (ReceiverBandMod::ReceiverBand frequencyBand);
00332                 
00333         
00334         
00335         
00336 
00337 
00338         
00339         // ===> Attribute sbType
00340         
00341         
00342         
00343 
00344         
00349         SBTypeMod::SBType getSbType() const;
00350         
00351  
00352         
00353         
00361         void setSbType (SBTypeMod::SBType sbType);
00362                 
00363         
00364         
00365         
00366 
00367 
00368         
00369         // ===> Attribute sbDuration
00370         
00371         
00372         
00373 
00374         
00379         Interval getSbDuration() const;
00380         
00381  
00382         
00383         
00391         void setSbDuration (Interval sbDuration);
00392                 
00393         
00394         
00395         
00396 
00397 
00398         
00399         // ===> Attribute numObservingMode
00400         
00401         
00402         
00403 
00404         
00409         int getNumObservingMode() const;
00410         
00411  
00412         
00413         
00421         void setNumObservingMode (int numObservingMode);
00422                 
00423         
00424         
00425         
00426 
00427 
00428         
00429         // ===> Attribute observingMode
00430         
00431         
00432         
00433 
00434         
00439         vector<string > getObservingMode() const;
00440         
00441  
00442         
00443         
00451         void setObservingMode (vector<string > observingMode);
00452                 
00453         
00454         
00455         
00456 
00457 
00458         
00459         // ===> Attribute numberRepeats
00460         
00461         
00462         
00463 
00464         
00469         int getNumberRepeats() const;
00470         
00471  
00472         
00473         
00481         void setNumberRepeats (int numberRepeats);
00482                 
00483         
00484         
00485         
00486 
00487 
00488         
00489         // ===> Attribute numScienceGoal
00490         
00491         
00492         
00493 
00494         
00499         int getNumScienceGoal() const;
00500         
00501  
00502         
00503         
00511         void setNumScienceGoal (int numScienceGoal);
00512                 
00513         
00514         
00515         
00516 
00517 
00518         
00519         // ===> Attribute scienceGoal
00520         
00521         
00522         
00523 
00524         
00529         vector<string > getScienceGoal() const;
00530         
00531  
00532         
00533         
00541         void setScienceGoal (vector<string > scienceGoal);
00542                 
00543         
00544         
00545         
00546 
00547 
00548         
00549         // ===> Attribute numWeatherConstraint
00550         
00551         
00552         
00553 
00554         
00559         int getNumWeatherConstraint() const;
00560         
00561  
00562         
00563         
00571         void setNumWeatherConstraint (int numWeatherConstraint);
00572                 
00573         
00574         
00575         
00576 
00577 
00578         
00579         // ===> Attribute weatherConstraint
00580         
00581         
00582         
00583 
00584         
00589         vector<string > getWeatherConstraint() const;
00590         
00591  
00592         
00593         
00601         void setWeatherConstraint (vector<string > weatherConstraint);
00602                 
00603         
00604         
00605         
00606 
00607 
00608         
00609         // ===> Attribute centerDirection, which is optional
00610         
00611         
00612         
00617         bool isCenterDirectionExists() const;
00618         
00619 
00620         
00626         vector<Angle > getCenterDirection() const;
00627         
00628  
00629         
00630         
00637         void setCenterDirection (vector<Angle > centerDirection);
00638                 
00639         
00640         
00641         
00645         void clearCenterDirection ();
00646         
00647 
00648 
00649         
00650         // ===> Attribute centerDirectionCode, which is optional
00651         
00652         
00653         
00658         bool isCenterDirectionCodeExists() const;
00659         
00660 
00661         
00667         DirectionReferenceCodeMod::DirectionReferenceCode getCenterDirectionCode() const;
00668         
00669  
00670         
00671         
00678         void setCenterDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode centerDirectionCode);
00679                 
00680         
00681         
00682         
00686         void clearCenterDirectionCode ();
00687         
00688 
00689 
00690         
00691         // ===> Attribute centerDirectionEquinox, which is optional
00692         
00693         
00694         
00699         bool isCenterDirectionEquinoxExists() const;
00700         
00701 
00702         
00708         ArrayTime getCenterDirectionEquinox() const;
00709         
00710  
00711         
00712         
00719         void setCenterDirectionEquinox (ArrayTime centerDirectionEquinox);
00720                 
00721         
00722         
00723         
00727         void clearCenterDirectionEquinox ();
00728         
00729 
00730 
00732         // Extrinsic Table Attributes //
00734         
00736         // Links //
00738         
00739         
00740         
00741         
00775         bool compareNoAutoInc(EntityRef sbSummaryUID, EntityRef projectUID, EntityRef obsUnitSetUID, double frequency, ReceiverBandMod::ReceiverBand frequencyBand, SBTypeMod::SBType sbType, Interval sbDuration, int numObservingMode, vector<string > observingMode, int numberRepeats, int numScienceGoal, vector<string > scienceGoal, int numWeatherConstraint, vector<string > weatherConstraint);
00776         
00777         
00778 
00779         
00813         bool compareRequiredValue(EntityRef sbSummaryUID, EntityRef projectUID, EntityRef obsUnitSetUID, double frequency, ReceiverBandMod::ReceiverBand frequencyBand, SBTypeMod::SBType sbType, Interval sbDuration, int numObservingMode, vector<string > observingMode, int numberRepeats, int numScienceGoal, vector<string > scienceGoal, int numWeatherConstraint, vector<string > weatherConstraint); 
00814                  
00815         
00824         bool equalByRequiredValue(SBSummaryRow* x) ;
00825         
00826 #ifndef WITHOUT_ACS
00827 
00831         asdmIDL::SBSummaryRowIDL *toIDL() const;
00832         
00840          void toIDL(asdmIDL::SBSummaryRowIDL& x) const;
00841 #endif
00842         
00843 #ifndef WITHOUT_ACS
00844 
00849         void setFromIDL (asdmIDL::SBSummaryRowIDL x) ;
00850 #endif
00851         
00856         std::string toXML() const;
00857 
00864         void setFromXML (std::string rowDoc) ;
00865 
00868         // binary-deserialization material from an EndianIStream  //
00870 
00871         std::map<std::string, SBSummaryAttributeFromBin> fromBinMethods;
00872 void sBSummaryIdFromBin( EndianIStream& eis);
00873 void sbSummaryUIDFromBin( EndianIStream& eis);
00874 void projectUIDFromBin( EndianIStream& eis);
00875 void obsUnitSetUIDFromBin( EndianIStream& eis);
00876 void frequencyFromBin( EndianIStream& eis);
00877 void frequencyBandFromBin( EndianIStream& eis);
00878 void sbTypeFromBin( EndianIStream& eis);
00879 void sbDurationFromBin( EndianIStream& eis);
00880 void numObservingModeFromBin( EndianIStream& eis);
00881 void observingModeFromBin( EndianIStream& eis);
00882 void numberRepeatsFromBin( EndianIStream& eis);
00883 void numScienceGoalFromBin( EndianIStream& eis);
00884 void scienceGoalFromBin( EndianIStream& eis);
00885 void numWeatherConstraintFromBin( EndianIStream& eis);
00886 void weatherConstraintFromBin( EndianIStream& eis);
00887 
00888 void centerDirectionFromBin( EndianIStream& eis);
00889 void centerDirectionCodeFromBin( EndianIStream& eis);
00890 void centerDirectionEquinoxFromBin( EndianIStream& eis);
00891 
00892 
00900          static SBSummaryRow* fromBin(EndianIStream& eis, SBSummaryTable& table, const std::vector<std::string>& attributesSeq);         
00901  
00908          void fromText(const std::string& attributeName, const std::string&  t);
00910 
00911 private:
00915         SBSummaryTable &table;
00919         bool hasBeenAdded;
00920 
00921         // This method is used by the Table class when this row is added to the table.
00922         void isAdded(bool added);
00923 
00924 
00933         SBSummaryRow (SBSummaryTable &table);
00934 
00952          SBSummaryRow (SBSummaryTable &table, SBSummaryRow &row);
00953                 
00955         // Intrinsic Table Attributes //
00957         
00958         
00959         // ===> Attribute sBSummaryId
00960         
00961         
00962 
00963         Tag sBSummaryId;
00964 
00965         
00966         
00967         
00977         void setSBSummaryId (Tag sBSummaryId);
00978                 
00979         
00980 
00981         
00982         // ===> Attribute sbSummaryUID
00983         
00984         
00985 
00986         EntityRef sbSummaryUID;
00987 
00988         
00989         
00990         
00991 
00992         
00993         // ===> Attribute projectUID
00994         
00995         
00996 
00997         EntityRef projectUID;
00998 
00999         
01000         
01001         
01002 
01003         
01004         // ===> Attribute obsUnitSetUID
01005         
01006         
01007 
01008         EntityRef obsUnitSetUID;
01009 
01010         
01011         
01012         
01013 
01014         
01015         // ===> Attribute frequency
01016         
01017         
01018 
01019         double frequency;
01020 
01021         
01022         
01023         
01024 
01025         
01026         // ===> Attribute frequencyBand
01027         
01028         
01029 
01030         ReceiverBandMod::ReceiverBand frequencyBand;
01031 
01032         
01033         
01034         
01035 
01036         
01037         // ===> Attribute sbType
01038         
01039         
01040 
01041         SBTypeMod::SBType sbType;
01042 
01043         
01044         
01045         
01046 
01047         
01048         // ===> Attribute sbDuration
01049         
01050         
01051 
01052         Interval sbDuration;
01053 
01054         
01055         
01056         
01057 
01058         
01059         // ===> Attribute numObservingMode
01060         
01061         
01062 
01063         int numObservingMode;
01064 
01065         
01066         
01067         
01068 
01069         
01070         // ===> Attribute observingMode
01071         
01072         
01073 
01074         vector<string > observingMode;
01075 
01076         
01077         
01078         
01079 
01080         
01081         // ===> Attribute numberRepeats
01082         
01083         
01084 
01085         int numberRepeats;
01086 
01087         
01088         
01089         
01090 
01091         
01092         // ===> Attribute numScienceGoal
01093         
01094         
01095 
01096         int numScienceGoal;
01097 
01098         
01099         
01100         
01101 
01102         
01103         // ===> Attribute scienceGoal
01104         
01105         
01106 
01107         vector<string > scienceGoal;
01108 
01109         
01110         
01111         
01112 
01113         
01114         // ===> Attribute numWeatherConstraint
01115         
01116         
01117 
01118         int numWeatherConstraint;
01119 
01120         
01121         
01122         
01123 
01124         
01125         // ===> Attribute weatherConstraint
01126         
01127         
01128 
01129         vector<string > weatherConstraint;
01130 
01131         
01132         
01133         
01134 
01135         
01136         // ===> Attribute centerDirection, which is optional
01137         
01138         
01139         bool centerDirectionExists;
01140         
01141 
01142         vector<Angle > centerDirection;
01143 
01144         
01145         
01146         
01147 
01148         
01149         // ===> Attribute centerDirectionCode, which is optional
01150         
01151         
01152         bool centerDirectionCodeExists;
01153         
01154 
01155         DirectionReferenceCodeMod::DirectionReferenceCode centerDirectionCode;
01156 
01157         
01158         
01159         
01160 
01161         
01162         // ===> Attribute centerDirectionEquinox, which is optional
01163         
01164         
01165         bool centerDirectionEquinoxExists;
01166         
01167 
01168         ArrayTime centerDirectionEquinox;
01169 
01170         
01171         
01172         
01173 
01175         // Extrinsic Table Attributes //
01177         
01179         // Links //
01181         
01182         
01183 /*
01185         // binary-deserialization material from an EndianIStream  //
01187         std::map<std::string, SBSummaryAttributeFromBin> fromBinMethods;
01188 void sBSummaryIdFromBin( EndianIStream& eis);
01189 void sbSummaryUIDFromBin( EndianIStream& eis);
01190 void projectUIDFromBin( EndianIStream& eis);
01191 void obsUnitSetUIDFromBin( EndianIStream& eis);
01192 void frequencyFromBin( EndianIStream& eis);
01193 void frequencyBandFromBin( EndianIStream& eis);
01194 void sbTypeFromBin( EndianIStream& eis);
01195 void sbDurationFromBin( EndianIStream& eis);
01196 void numObservingModeFromBin( EndianIStream& eis);
01197 void observingModeFromBin( EndianIStream& eis);
01198 void numberRepeatsFromBin( EndianIStream& eis);
01199 void numScienceGoalFromBin( EndianIStream& eis);
01200 void scienceGoalFromBin( EndianIStream& eis);
01201 void numWeatherConstraintFromBin( EndianIStream& eis);
01202 void weatherConstraintFromBin( EndianIStream& eis);
01203 
01204 void centerDirectionFromBin( EndianIStream& eis);
01205 void centerDirectionCodeFromBin( EndianIStream& eis);
01206 void centerDirectionEquinoxFromBin( EndianIStream& eis);
01207 
01208 */
01209         
01211         // text-deserialization material //
01213         std::map<std::string, SBSummaryAttributeFromText> fromTextMethods;
01214         
01215 void sBSummaryIdFromText (const string & s);
01216         
01217         
01218         
01219         
01220         
01221 void frequencyFromText (const string & s);
01222         
01223         
01224 void frequencyBandFromText (const string & s);
01225         
01226         
01227 void sbTypeFromText (const string & s);
01228         
01229         
01230 void sbDurationFromText (const string & s);
01231         
01232         
01233 void numObservingModeFromText (const string & s);
01234         
01235         
01236 void observingModeFromText (const string & s);
01237         
01238         
01239 void numberRepeatsFromText (const string & s);
01240         
01241         
01242 void numScienceGoalFromText (const string & s);
01243         
01244         
01245 void scienceGoalFromText (const string & s);
01246         
01247         
01248 void numWeatherConstraintFromText (const string & s);
01249         
01250         
01251 void weatherConstraintFromText (const string & s);
01252         
01253 
01254         
01255 void centerDirectionFromText (const string & s);
01256         
01257         
01258 void centerDirectionCodeFromText (const string & s);
01259         
01260         
01261 void centerDirectionEquinoxFromText (const string & s);
01262         
01263         
01264         
01269          void toBin(EndianOSStream& eoss);
01270                  
01280 };
01281 
01282 } // End namespace asdm
01283 
01284 #endif /* SBSummary_CLASS */