casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
AnnotationRow.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 AnnotationRow.h
00032  */
00033  
00034 #ifndef AnnotationRow_CLASS
00035 #define AnnotationRow_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 #include <stdint.h>
00048 
00049 
00050 
00051 
00052          
00053 #include <ArrayTime.h>
00054         
00055 
00056          
00057 #include <Interval.h>
00058         
00059 
00060          
00061 #include <Tag.h>
00062         
00063 
00064 
00065 
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 #include "CBasebandName.h"
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097 
00098 
00099 #include <ConversionException.h>
00100 #include <NoSuchRow.h>
00101 #include <IllegalAccessException.h>
00102 
00103 #include <RowTransformer.h>
00104 //#include <TableStreamReader.h>
00105 
00106 /*\file Annotation.h
00107     \brief Generated from model's revision "1.64", branch "HEAD"
00108 */
00109 
00110 namespace asdm {
00111 
00112 //class asdm::AnnotationTable;
00113 
00114 
00115 // class asdm::AntennaRow;
00116 class AntennaRow;
00117         
00118 
00119 class AnnotationRow;
00120 typedef void (AnnotationRow::*AnnotationAttributeFromBin) (EndianIStream& eis);
00121 typedef void (AnnotationRow::*AnnotationAttributeFromText) (const string& s);
00122 
00129 class AnnotationRow {
00130 friend class asdm::AnnotationTable;
00131 friend class asdm::RowTransformer<AnnotationRow>;
00132 //friend class asdm::TableStreamReader<AnnotationTable, AnnotationRow>;
00133 
00134 public:
00135 
00136         virtual ~AnnotationRow();
00137 
00141         AnnotationTable &getTable() const;
00142         
00147         bool isAdded() const;
00148                 
00150         // Intrinsic Table Attributes //
00152         
00153         
00154         // ===> Attribute annotationId
00155         
00156         
00157         
00158 
00159         
00164         Tag getAnnotationId() const;
00165         
00166  
00167         
00168         
00169         
00170         
00171 
00172 
00173         
00174         // ===> Attribute time
00175         
00176         
00177         
00178 
00179         
00184         ArrayTime getTime() const;
00185         
00186  
00187         
00188         
00196         void setTime (ArrayTime time);
00197                 
00198         
00199         
00200         
00201 
00202 
00203         
00204         // ===> Attribute issue
00205         
00206         
00207         
00208 
00209         
00214         string getIssue() const;
00215         
00216  
00217         
00218         
00226         void setIssue (string issue);
00227                 
00228         
00229         
00230         
00231 
00232 
00233         
00234         // ===> Attribute details
00235         
00236         
00237         
00238 
00239         
00244         string getDetails() const;
00245         
00246  
00247         
00248         
00256         void setDetails (string details);
00257                 
00258         
00259         
00260         
00261 
00262 
00263         
00264         // ===> Attribute numAntenna, which is optional
00265         
00266         
00267         
00272         bool isNumAntennaExists() const;
00273         
00274 
00275         
00281         int getNumAntenna() const;
00282         
00283  
00284         
00285         
00292         void setNumAntenna (int numAntenna);
00293                 
00294         
00295         
00296         
00300         void clearNumAntenna ();
00301         
00302 
00303 
00304         
00305         // ===> Attribute basebandName, which is optional
00306         
00307         
00308         
00313         bool isBasebandNameExists() const;
00314         
00315 
00316         
00322         vector<BasebandNameMod::BasebandName > getBasebandName() const;
00323         
00324  
00325         
00326         
00333         void setBasebandName (vector<BasebandNameMod::BasebandName > basebandName);
00334                 
00335         
00336         
00337         
00341         void clearBasebandName ();
00342         
00343 
00344 
00345         
00346         // ===> Attribute numBaseband, which is optional
00347         
00348         
00349         
00354         bool isNumBasebandExists() const;
00355         
00356 
00357         
00363         int getNumBaseband() const;
00364         
00365  
00366         
00367         
00374         void setNumBaseband (int numBaseband);
00375                 
00376         
00377         
00378         
00382         void clearNumBaseband ();
00383         
00384 
00385 
00386         
00387         // ===> Attribute interval, which is optional
00388         
00389         
00390         
00395         bool isIntervalExists() const;
00396         
00397 
00398         
00404         Interval getInterval() const;
00405         
00406  
00407         
00408         
00415         void setInterval (Interval interval);
00416                 
00417         
00418         
00419         
00423         void clearInterval ();
00424         
00425 
00426 
00427         
00428         // ===> Attribute dValue, which is optional
00429         
00430         
00431         
00436         bool isDValueExists() const;
00437         
00438 
00439         
00445         double getDValue() const;
00446         
00447  
00448         
00449         
00456         void setDValue (double dValue);
00457                 
00458         
00459         
00460         
00464         void clearDValue ();
00465         
00466 
00467 
00468         
00469         // ===> Attribute vdValue, which is optional
00470         
00471         
00472         
00477         bool isVdValueExists() const;
00478         
00479 
00480         
00486         vector<double > getVdValue() const;
00487         
00488  
00489         
00490         
00497         void setVdValue (vector<double > vdValue);
00498                 
00499         
00500         
00501         
00505         void clearVdValue ();
00506         
00507 
00508 
00509         
00510         // ===> Attribute vvdValues, which is optional
00511         
00512         
00513         
00518         bool isVvdValuesExists() const;
00519         
00520 
00521         
00527         vector<vector<double > > getVvdValues() const;
00528         
00529  
00530         
00531         
00538         void setVvdValues (vector<vector<double > > vvdValues);
00539                 
00540         
00541         
00542         
00546         void clearVvdValues ();
00547         
00548 
00549 
00550         
00551         // ===> Attribute llValue, which is optional
00552         
00553         
00554         
00559         bool isLlValueExists() const;
00560         
00561 
00562         
00568         int64_t getLlValue() const;
00569         
00570  
00571         
00572         
00579         void setLlValue (int64_t llValue);
00580                 
00581         
00582         
00583         
00587         void clearLlValue ();
00588         
00589 
00590 
00591         
00592         // ===> Attribute vllValue, which is optional
00593         
00594         
00595         
00600         bool isVllValueExists() const;
00601         
00602 
00603         
00609         vector<int64_t > getVllValue() const;
00610         
00611  
00612         
00613         
00620         void setVllValue (vector<int64_t > vllValue);
00621                 
00622         
00623         
00624         
00628         void clearVllValue ();
00629         
00630 
00631 
00632         
00633         // ===> Attribute vvllValue, which is optional
00634         
00635         
00636         
00641         bool isVvllValueExists() const;
00642         
00643 
00644         
00650         vector<vector<int64_t > > getVvllValue() const;
00651         
00652  
00653         
00654         
00661         void setVvllValue (vector<vector<int64_t > > vvllValue);
00662                 
00663         
00664         
00665         
00669         void clearVvllValue ();
00670         
00671 
00672 
00674         // Extrinsic Table Attributes //
00676         
00677         
00678         // ===> Attribute antennaId, which is optional
00679         
00680         
00681         
00686         bool isAntennaIdExists() const;
00687         
00688 
00689         
00695         vector<Tag>  getAntennaId() const;
00696         
00697  
00698         
00699         
00706         void setAntennaId (vector<Tag>  antennaId);
00707                 
00708         
00709         
00710         
00714         void clearAntennaId ();
00715         
00716 
00717 
00719         // Links //
00721         
00722         
00723                 
00730         void setAntennaId (int i, Tag antennaId)  ;
00731                         
00732         
00733 
00734         
00735                  
00740  void addAntennaId(Tag id); 
00741 
00746  void addAntennaId(const vector<Tag> & id); 
00747  
00748 
00754  const Tag getAntennaId(int i);
00755  
00763  AntennaRow* getAntennaUsingAntennaId(int i); 
00764  
00769  vector<AntennaRow *> getAntennasUsingAntennaId(); 
00770   
00771 
00772         
00773 
00774         
00775         
00776         
00788         bool compareNoAutoInc(ArrayTime time, string issue, string details);
00789         
00790         
00791 
00792         
00804         bool compareRequiredValue(ArrayTime time, string issue, string details); 
00805                  
00806         
00815         bool equalByRequiredValue(AnnotationRow* x) ;
00816         
00817 #ifndef WITHOUT_ACS
00818 
00822         asdmIDL::AnnotationRowIDL *toIDL() const;
00823         
00831          void toIDL(asdmIDL::AnnotationRowIDL& x) const;
00832 #endif
00833         
00834 #ifndef WITHOUT_ACS
00835 
00840         void setFromIDL (asdmIDL::AnnotationRowIDL x) ;
00841 #endif
00842         
00847         std::string toXML() const;
00848 
00855         void setFromXML (std::string rowDoc) ;
00856 
00859         // binary-deserialization material from an EndianIStream  //
00861 
00862         std::map<std::string, AnnotationAttributeFromBin> fromBinMethods;
00863 void annotationIdFromBin( EndianIStream& eis);
00864 void timeFromBin( EndianIStream& eis);
00865 void issueFromBin( EndianIStream& eis);
00866 void detailsFromBin( EndianIStream& eis);
00867 
00868 void numAntennaFromBin( EndianIStream& eis);
00869 void basebandNameFromBin( EndianIStream& eis);
00870 void numBasebandFromBin( EndianIStream& eis);
00871 void intervalFromBin( EndianIStream& eis);
00872 void dValueFromBin( EndianIStream& eis);
00873 void vdValueFromBin( EndianIStream& eis);
00874 void vvdValuesFromBin( EndianIStream& eis);
00875 void llValueFromBin( EndianIStream& eis);
00876 void vllValueFromBin( EndianIStream& eis);
00877 void vvllValueFromBin( EndianIStream& eis);
00878 void antennaIdFromBin( EndianIStream& eis);
00879 
00880 
00888          static AnnotationRow* fromBin(EndianIStream& eis, AnnotationTable& table, const std::vector<std::string>& attributesSeq);       
00889  
00896          void fromText(const std::string& attributeName, const std::string&  t);
00898 
00899 private:
00903         AnnotationTable &table;
00907         bool hasBeenAdded;
00908 
00909         // This method is used by the Table class when this row is added to the table.
00910         void isAdded(bool added);
00911 
00912 
00921         AnnotationRow (AnnotationTable &table);
00922 
00940          AnnotationRow (AnnotationTable &table, AnnotationRow &row);
00941                 
00943         // Intrinsic Table Attributes //
00945         
00946         
00947         // ===> Attribute annotationId
00948         
00949         
00950 
00951         Tag annotationId;
00952 
00953         
00954         
00955         
00965         void setAnnotationId (Tag annotationId);
00966                 
00967         
00968 
00969         
00970         // ===> Attribute time
00971         
00972         
00973 
00974         ArrayTime time;
00975 
00976         
00977         
00978         
00979 
00980         
00981         // ===> Attribute issue
00982         
00983         
00984 
00985         string issue;
00986 
00987         
00988         
00989         
00990 
00991         
00992         // ===> Attribute details
00993         
00994         
00995 
00996         string details;
00997 
00998         
00999         
01000         
01001 
01002         
01003         // ===> Attribute numAntenna, which is optional
01004         
01005         
01006         bool numAntennaExists;
01007         
01008 
01009         int numAntenna;
01010 
01011         
01012         
01013         
01014 
01015         
01016         // ===> Attribute basebandName, which is optional
01017         
01018         
01019         bool basebandNameExists;
01020         
01021 
01022         vector<BasebandNameMod::BasebandName > basebandName;
01023 
01024         
01025         
01026         
01027 
01028         
01029         // ===> Attribute numBaseband, which is optional
01030         
01031         
01032         bool numBasebandExists;
01033         
01034 
01035         int numBaseband;
01036 
01037         
01038         
01039         
01040 
01041         
01042         // ===> Attribute interval, which is optional
01043         
01044         
01045         bool intervalExists;
01046         
01047 
01048         Interval interval;
01049 
01050         
01051         
01052         
01053 
01054         
01055         // ===> Attribute dValue, which is optional
01056         
01057         
01058         bool dValueExists;
01059         
01060 
01061         double dValue;
01062 
01063         
01064         
01065         
01066 
01067         
01068         // ===> Attribute vdValue, which is optional
01069         
01070         
01071         bool vdValueExists;
01072         
01073 
01074         vector<double > vdValue;
01075 
01076         
01077         
01078         
01079 
01080         
01081         // ===> Attribute vvdValues, which is optional
01082         
01083         
01084         bool vvdValuesExists;
01085         
01086 
01087         vector<vector<double > > vvdValues;
01088 
01089         
01090         
01091         
01092 
01093         
01094         // ===> Attribute llValue, which is optional
01095         
01096         
01097         bool llValueExists;
01098         
01099 
01100         int64_t llValue;
01101 
01102         
01103         
01104         
01105 
01106         
01107         // ===> Attribute vllValue, which is optional
01108         
01109         
01110         bool vllValueExists;
01111         
01112 
01113         vector<int64_t > vllValue;
01114 
01115         
01116         
01117         
01118 
01119         
01120         // ===> Attribute vvllValue, which is optional
01121         
01122         
01123         bool vvllValueExists;
01124         
01125 
01126         vector<vector<int64_t > > vvllValue;
01127 
01128         
01129         
01130         
01131 
01133         // Extrinsic Table Attributes //
01135         
01136         
01137         // ===> Attribute antennaId, which is optional
01138         
01139         
01140         bool antennaIdExists;
01141         
01142 
01143         vector<Tag>  antennaId;
01144 
01145         
01146         
01147         
01148 
01150         // Links //
01152         
01153         
01154                 
01155 
01156 
01157         
01158 
01159         
01160 /*
01162         // binary-deserialization material from an EndianIStream  //
01164         std::map<std::string, AnnotationAttributeFromBin> fromBinMethods;
01165 void annotationIdFromBin( EndianIStream& eis);
01166 void timeFromBin( EndianIStream& eis);
01167 void issueFromBin( EndianIStream& eis);
01168 void detailsFromBin( EndianIStream& eis);
01169 
01170 void numAntennaFromBin( EndianIStream& eis);
01171 void basebandNameFromBin( EndianIStream& eis);
01172 void numBasebandFromBin( EndianIStream& eis);
01173 void intervalFromBin( EndianIStream& eis);
01174 void dValueFromBin( EndianIStream& eis);
01175 void vdValueFromBin( EndianIStream& eis);
01176 void vvdValuesFromBin( EndianIStream& eis);
01177 void llValueFromBin( EndianIStream& eis);
01178 void vllValueFromBin( EndianIStream& eis);
01179 void vvllValueFromBin( EndianIStream& eis);
01180 void antennaIdFromBin( EndianIStream& eis);
01181 
01182 */
01183         
01185         // text-deserialization material //
01187         std::map<std::string, AnnotationAttributeFromText> fromTextMethods;
01188         
01189 void annotationIdFromText (const string & s);
01190         
01191         
01192 void timeFromText (const string & s);
01193         
01194         
01195 void issueFromText (const string & s);
01196         
01197         
01198 void detailsFromText (const string & s);
01199         
01200 
01201         
01202 void numAntennaFromText (const string & s);
01203         
01204         
01205 void basebandNameFromText (const string & s);
01206         
01207         
01208 void numBasebandFromText (const string & s);
01209         
01210         
01211 void intervalFromText (const string & s);
01212         
01213         
01214 void dValueFromText (const string & s);
01215         
01216         
01217 void vdValueFromText (const string & s);
01218         
01219         
01220 void vvdValuesFromText (const string & s);
01221         
01222         
01223 void llValueFromText (const string & s);
01224         
01225         
01226 void vllValueFromText (const string & s);
01227         
01228         
01229 void vvllValueFromText (const string & s);
01230         
01231         
01232 void antennaIdFromText (const string & s);
01233         
01234         
01235         
01240          void toBin(EndianOSStream& eoss);
01241                  
01251 };
01252 
01253 } // End namespace asdm
01254 
01255 #endif /* Annotation_CLASS */