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.62", 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); 00880 00887 void fromText(const std::string& attributeName, const std::string& t); 00889 00890 private: 00894 AnnotationTable &table; 00898 bool hasBeenAdded; 00899 00900 // This method is used by the Table class when this row is added to the table. 00901 void isAdded(bool added); 00902 00903 00912 AnnotationRow (AnnotationTable &table); 00913 00931 AnnotationRow (AnnotationTable &table, AnnotationRow &row); 00932 00934 // Intrinsic Table Attributes // 00936 00937 00938 // ===> Attribute annotationId 00939 00940 00941 00942 Tag annotationId; 00943 00944 00945 00946 00956 void setAnnotationId (Tag annotationId); 00957 00958 00959 00960 00961 // ===> Attribute time 00962 00963 00964 00965 ArrayTime time; 00966 00967 00968 00969 00970 00971 00972 // ===> Attribute issue 00973 00974 00975 00976 string issue; 00977 00978 00979 00980 00981 00982 00983 // ===> Attribute details 00984 00985 00986 00987 string details; 00988 00989 00990 00991 00992 00993 00994 // ===> Attribute numAntenna, which is optional 00995 00996 00997 bool numAntennaExists; 00998 00999 01000 int numAntenna; 01001 01002 01003 01004 01005 01006 01007 // ===> Attribute basebandName, which is optional 01008 01009 01010 bool basebandNameExists; 01011 01012 01013 vector<BasebandNameMod::BasebandName > basebandName; 01014 01015 01016 01017 01018 01019 01020 // ===> Attribute numBaseband, which is optional 01021 01022 01023 bool numBasebandExists; 01024 01025 01026 int numBaseband; 01027 01028 01029 01030 01031 01032 01033 // ===> Attribute interval, which is optional 01034 01035 01036 bool intervalExists; 01037 01038 01039 Interval interval; 01040 01041 01042 01043 01044 01045 01046 // ===> Attribute dValue, which is optional 01047 01048 01049 bool dValueExists; 01050 01051 01052 double dValue; 01053 01054 01055 01056 01057 01058 01059 // ===> Attribute vdValue, which is optional 01060 01061 01062 bool vdValueExists; 01063 01064 01065 vector<double > vdValue; 01066 01067 01068 01069 01070 01071 01072 // ===> Attribute vvdValues, which is optional 01073 01074 01075 bool vvdValuesExists; 01076 01077 01078 vector<vector<double > > vvdValues; 01079 01080 01081 01082 01083 01084 01085 // ===> Attribute llValue, which is optional 01086 01087 01088 bool llValueExists; 01089 01090 01091 int64_t llValue; 01092 01093 01094 01095 01096 01097 01098 // ===> Attribute vllValue, which is optional 01099 01100 01101 bool vllValueExists; 01102 01103 01104 vector<int64_t > vllValue; 01105 01106 01107 01108 01109 01110 01111 // ===> Attribute vvllValue, which is optional 01112 01113 01114 bool vvllValueExists; 01115 01116 01117 vector<vector<int64_t > > vvllValue; 01118 01119 01120 01121 01122 01124 // Extrinsic Table Attributes // 01126 01127 01128 // ===> Attribute antennaId, which is optional 01129 01130 01131 bool antennaIdExists; 01132 01133 01134 vector<Tag> antennaId; 01135 01136 01137 01138 01139 01141 // Links // 01143 01144 01145 01146 01147 01148 01149 01150 01151 /* 01153 // binary-deserialization material from an EndianIStream // 01155 std::map<std::string, AnnotationAttributeFromBin> fromBinMethods; 01156 void annotationIdFromBin( EndianIStream& eis); 01157 void timeFromBin( EndianIStream& eis); 01158 void issueFromBin( EndianIStream& eis); 01159 void detailsFromBin( EndianIStream& eis); 01160 01161 void numAntennaFromBin( EndianIStream& eis); 01162 void basebandNameFromBin( EndianIStream& eis); 01163 void numBasebandFromBin( EndianIStream& eis); 01164 void intervalFromBin( EndianIStream& eis); 01165 void dValueFromBin( EndianIStream& eis); 01166 void vdValueFromBin( EndianIStream& eis); 01167 void vvdValuesFromBin( EndianIStream& eis); 01168 void llValueFromBin( EndianIStream& eis); 01169 void vllValueFromBin( EndianIStream& eis); 01170 void vvllValueFromBin( EndianIStream& eis); 01171 void antennaIdFromBin( EndianIStream& eis); 01172 01173 */ 01174 01176 // text-deserialization material // 01178 std::map<std::string, AnnotationAttributeFromText> fromTextMethods; 01179 01180 void annotationIdFromText (const string & s); 01181 01182 01183 void timeFromText (const string & s); 01184 01185 01186 void issueFromText (const string & s); 01187 01188 01189 void detailsFromText (const string & s); 01190 01191 01192 01193 void numAntennaFromText (const string & s); 01194 01195 01196 void basebandNameFromText (const string & s); 01197 01198 01199 void numBasebandFromText (const string & s); 01200 01201 01202 void intervalFromText (const string & s); 01203 01204 01205 void dValueFromText (const string & s); 01206 01207 01208 void vdValueFromText (const string & s); 01209 01210 01211 void vvdValuesFromText (const string & s); 01212 01213 01214 void llValueFromText (const string & s); 01215 01216 01217 void vllValueFromText (const string & s); 01218 01219 01220 void vvllValueFromText (const string & s); 01221 01222 01223 void antennaIdFromText (const string & s); 01224 01225 01226 01231 void toBin(EndianOSStream& eoss); 01232 01242 }; 01243 01244 } // End namespace asdm 01245 01246 #endif /* Annotation_CLASS */