casa
$Rev:20696$
|
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.61", 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 #endif 00824 00825 #ifndef WITHOUT_ACS 00826 00831 void setFromIDL (asdmIDL::AnnotationRowIDL x) ; 00832 #endif 00833 00838 std::string toXML() const; 00839 00846 void setFromXML (std::string rowDoc) ; 00847 00850 // binary-deserialization material from an EndianIStream // 00852 00853 std::map<std::string, AnnotationAttributeFromBin> fromBinMethods; 00854 void annotationIdFromBin( EndianIStream& eis); 00855 void timeFromBin( EndianIStream& eis); 00856 void issueFromBin( EndianIStream& eis); 00857 void detailsFromBin( EndianIStream& eis); 00858 00859 void numAntennaFromBin( EndianIStream& eis); 00860 void basebandNameFromBin( EndianIStream& eis); 00861 void numBasebandFromBin( EndianIStream& eis); 00862 void intervalFromBin( EndianIStream& eis); 00863 void dValueFromBin( EndianIStream& eis); 00864 void vdValueFromBin( EndianIStream& eis); 00865 void vvdValuesFromBin( EndianIStream& eis); 00866 void llValueFromBin( EndianIStream& eis); 00867 void vllValueFromBin( EndianIStream& eis); 00868 void vvllValueFromBin( EndianIStream& eis); 00869 void antennaIdFromBin( EndianIStream& eis); 00870 00871 00879 static AnnotationRow* fromBin(EndianIStream& eis, AnnotationTable& table, const std::vector<std::string>& attributesSeq); 00881 00882 private: 00886 AnnotationTable &table; 00890 bool hasBeenAdded; 00891 00892 // This method is used by the Table class when this row is added to the table. 00893 void isAdded(bool added); 00894 00895 00904 AnnotationRow (AnnotationTable &table); 00905 00923 AnnotationRow (AnnotationTable &table, AnnotationRow &row); 00924 00926 // Intrinsic Table Attributes // 00928 00929 00930 // ===> Attribute annotationId 00931 00932 00933 00934 Tag annotationId; 00935 00936 00937 00938 00948 void setAnnotationId (Tag annotationId); 00949 00950 00951 00952 00953 // ===> Attribute time 00954 00955 00956 00957 ArrayTime time; 00958 00959 00960 00961 00962 00963 00964 // ===> Attribute issue 00965 00966 00967 00968 string issue; 00969 00970 00971 00972 00973 00974 00975 // ===> Attribute details 00976 00977 00978 00979 string details; 00980 00981 00982 00983 00984 00985 00986 // ===> Attribute numAntenna, which is optional 00987 00988 00989 bool numAntennaExists; 00990 00991 00992 int numAntenna; 00993 00994 00995 00996 00997 00998 00999 // ===> Attribute basebandName, which is optional 01000 01001 01002 bool basebandNameExists; 01003 01004 01005 vector<BasebandNameMod::BasebandName > basebandName; 01006 01007 01008 01009 01010 01011 01012 // ===> Attribute numBaseband, which is optional 01013 01014 01015 bool numBasebandExists; 01016 01017 01018 int numBaseband; 01019 01020 01021 01022 01023 01024 01025 // ===> Attribute interval, which is optional 01026 01027 01028 bool intervalExists; 01029 01030 01031 Interval interval; 01032 01033 01034 01035 01036 01037 01038 // ===> Attribute dValue, which is optional 01039 01040 01041 bool dValueExists; 01042 01043 01044 double dValue; 01045 01046 01047 01048 01049 01050 01051 // ===> Attribute vdValue, which is optional 01052 01053 01054 bool vdValueExists; 01055 01056 01057 vector<double > vdValue; 01058 01059 01060 01061 01062 01063 01064 // ===> Attribute vvdValues, which is optional 01065 01066 01067 bool vvdValuesExists; 01068 01069 01070 vector<vector<double > > vvdValues; 01071 01072 01073 01074 01075 01076 01077 // ===> Attribute llValue, which is optional 01078 01079 01080 bool llValueExists; 01081 01082 01083 int64_t llValue; 01084 01085 01086 01087 01088 01089 01090 // ===> Attribute vllValue, which is optional 01091 01092 01093 bool vllValueExists; 01094 01095 01096 vector<int64_t > vllValue; 01097 01098 01099 01100 01101 01102 01103 // ===> Attribute vvllValue, which is optional 01104 01105 01106 bool vvllValueExists; 01107 01108 01109 vector<vector<int64_t > > vvllValue; 01110 01111 01112 01113 01114 01116 // Extrinsic Table Attributes // 01118 01119 01120 // ===> Attribute antennaId, which is optional 01121 01122 01123 bool antennaIdExists; 01124 01125 01126 vector<Tag> antennaId; 01127 01128 01129 01130 01131 01133 // Links // 01135 01136 01137 01138 01139 01140 01141 01142 01143 /* 01145 // binary-deserialization material from an EndianIStream // 01147 std::map<std::string, AnnotationAttributeFromBin> fromBinMethods; 01148 void annotationIdFromBin( EndianIStream& eis); 01149 void timeFromBin( EndianIStream& eis); 01150 void issueFromBin( EndianIStream& eis); 01151 void detailsFromBin( EndianIStream& eis); 01152 01153 void numAntennaFromBin( EndianIStream& eis); 01154 void basebandNameFromBin( EndianIStream& eis); 01155 void numBasebandFromBin( EndianIStream& eis); 01156 void intervalFromBin( EndianIStream& eis); 01157 void dValueFromBin( EndianIStream& eis); 01158 void vdValueFromBin( EndianIStream& eis); 01159 void vvdValuesFromBin( EndianIStream& eis); 01160 void llValueFromBin( EndianIStream& eis); 01161 void vllValueFromBin( EndianIStream& eis); 01162 void vvllValueFromBin( EndianIStream& eis); 01163 void antennaIdFromBin( EndianIStream& eis); 01164 01165 */ 01166 01168 // text-deserialization material // 01170 std::map<std::string, AnnotationAttributeFromText> fromTextMethods; 01171 01172 void annotationIdFromText (const string & s); 01173 01174 01175 void timeFromText (const string & s); 01176 01177 01178 void issueFromText (const string & s); 01179 01180 01181 void detailsFromText (const string & s); 01182 01183 01184 01185 void numAntennaFromText (const string & s); 01186 01187 01188 void basebandNameFromText (const string & s); 01189 01190 01191 void numBasebandFromText (const string & s); 01192 01193 01194 void intervalFromText (const string & s); 01195 01196 01197 void dValueFromText (const string & s); 01198 01199 01200 void vdValueFromText (const string & s); 01201 01202 01203 void vvdValuesFromText (const string & s); 01204 01205 01206 void llValueFromText (const string & s); 01207 01208 01209 void vllValueFromText (const string & s); 01210 01211 01212 void vvllValueFromText (const string & s); 01213 01214 01215 void antennaIdFromText (const string & s); 01216 01217 01218 01219 void fromText(const std::string& attributeName, const std::string& t); 01220 01225 void toBin(EndianOSStream& eoss); 01226 01236 }; 01237 01238 } // End namespace asdm 01239 01240 #endif /* Annotation_CLASS */