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 FieldRow.h 00032 */ 00033 00034 #ifndef FieldRow_CLASS 00035 #define FieldRow_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 <Tag.h> 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 #include "CDirectionReferenceCode.h" 00083 00084 00085 00086 00087 00088 00089 00090 00091 #include <ConversionException.h> 00092 #include <NoSuchRow.h> 00093 #include <IllegalAccessException.h> 00094 00095 #include <RowTransformer.h> 00096 //#include <TableStreamReader.h> 00097 00098 /*\file Field.h 00099 \brief Generated from model's revision "1.61", branch "HEAD" 00100 */ 00101 00102 namespace asdm { 00103 00104 //class asdm::FieldTable; 00105 00106 00107 // class asdm::EphemerisRow; 00108 class EphemerisRow; 00109 00110 // class asdm::SourceRow; 00111 class SourceRow; 00112 00113 // class asdm::FieldRow; 00114 class FieldRow; 00115 00116 00117 class FieldRow; 00118 typedef void (FieldRow::*FieldAttributeFromBin) (EndianIStream& eis); 00119 typedef void (FieldRow::*FieldAttributeFromText) (const string& s); 00120 00127 class FieldRow { 00128 friend class asdm::FieldTable; 00129 friend class asdm::RowTransformer<FieldRow>; 00130 //friend class asdm::TableStreamReader<FieldTable, FieldRow>; 00131 00132 public: 00133 00134 virtual ~FieldRow(); 00135 00139 FieldTable &getTable() const; 00140 00145 bool isAdded() const; 00146 00148 // Intrinsic Table Attributes // 00150 00151 00152 // ===> Attribute fieldId 00153 00154 00155 00156 00157 00162 Tag getFieldId() const; 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 // ===> Attribute fieldName 00173 00174 00175 00176 00177 00182 string getFieldName() const; 00183 00184 00185 00186 00194 void setFieldName (string fieldName); 00195 00196 00197 00198 00199 00200 00201 00202 // ===> Attribute numPoly 00203 00204 00205 00206 00207 00212 int getNumPoly() const; 00213 00214 00215 00216 00224 void setNumPoly (int numPoly); 00225 00226 00227 00228 00229 00230 00231 00232 // ===> Attribute delayDir 00233 00234 00235 00236 00237 00242 vector<vector<Angle > > getDelayDir() const; 00243 00244 00245 00246 00254 void setDelayDir (vector<vector<Angle > > delayDir); 00255 00256 00257 00258 00259 00260 00261 00262 // ===> Attribute phaseDir 00263 00264 00265 00266 00267 00272 vector<vector<Angle > > getPhaseDir() const; 00273 00274 00275 00276 00284 void setPhaseDir (vector<vector<Angle > > phaseDir); 00285 00286 00287 00288 00289 00290 00291 00292 // ===> Attribute referenceDir 00293 00294 00295 00296 00297 00302 vector<vector<Angle > > getReferenceDir() const; 00303 00304 00305 00306 00314 void setReferenceDir (vector<vector<Angle > > referenceDir); 00315 00316 00317 00318 00319 00320 00321 00322 // ===> Attribute time, which is optional 00323 00324 00325 00330 bool isTimeExists() const; 00331 00332 00333 00339 ArrayTime getTime() const; 00340 00341 00342 00343 00350 void setTime (ArrayTime time); 00351 00352 00353 00354 00358 void clearTime (); 00359 00360 00361 00362 00363 // ===> Attribute code, which is optional 00364 00365 00366 00371 bool isCodeExists() const; 00372 00373 00374 00380 string getCode() const; 00381 00382 00383 00384 00391 void setCode (string code); 00392 00393 00394 00395 00399 void clearCode (); 00400 00401 00402 00403 00404 // ===> Attribute directionCode, which is optional 00405 00406 00407 00412 bool isDirectionCodeExists() const; 00413 00414 00415 00421 DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const; 00422 00423 00424 00425 00432 void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode); 00433 00434 00435 00436 00440 void clearDirectionCode (); 00441 00442 00443 00444 00445 // ===> Attribute directionEquinox, which is optional 00446 00447 00448 00453 bool isDirectionEquinoxExists() const; 00454 00455 00456 00462 ArrayTime getDirectionEquinox() const; 00463 00464 00465 00466 00473 void setDirectionEquinox (ArrayTime directionEquinox); 00474 00475 00476 00477 00481 void clearDirectionEquinox (); 00482 00483 00484 00485 00486 // ===> Attribute assocNature, which is optional 00487 00488 00489 00494 bool isAssocNatureExists() const; 00495 00496 00497 00503 string getAssocNature() const; 00504 00505 00506 00507 00514 void setAssocNature (string assocNature); 00515 00516 00517 00518 00522 void clearAssocNature (); 00523 00524 00525 00527 // Extrinsic Table Attributes // 00529 00530 00531 // ===> Attribute assocFieldId, which is optional 00532 00533 00534 00539 bool isAssocFieldIdExists() const; 00540 00541 00542 00548 Tag getAssocFieldId() const; 00549 00550 00551 00552 00559 void setAssocFieldId (Tag assocFieldId); 00560 00561 00562 00563 00567 void clearAssocFieldId (); 00568 00569 00570 00571 00572 // ===> Attribute ephemerisId, which is optional 00573 00574 00575 00580 bool isEphemerisIdExists() const; 00581 00582 00583 00589 Tag getEphemerisId() const; 00590 00591 00592 00593 00600 void setEphemerisId (Tag ephemerisId); 00601 00602 00603 00604 00608 void clearEphemerisId (); 00609 00610 00611 00612 00613 // ===> Attribute sourceId, which is optional 00614 00615 00616 00621 bool isSourceIdExists() const; 00622 00623 00624 00630 int getSourceId() const; 00631 00632 00633 00634 00641 void setSourceId (int sourceId); 00642 00643 00644 00645 00649 void clearSourceId (); 00650 00651 00652 00654 // Links // 00656 00657 00658 00659 00660 00669 EphemerisRow* getEphemerisUsingEphemerisId(); 00670 00671 00672 00673 00674 00675 00676 00677 00678 // ===> Slice link from a row of Field table to a collection of row of Source table. 00679 00685 vector <SourceRow *> getSources(); 00686 00687 00688 00689 00690 00691 00692 00693 00694 00703 FieldRow* getFieldUsingAssocFieldId(); 00704 00705 00706 00707 00708 00709 00710 00726 bool compareNoAutoInc(string fieldName, int numPoly, vector<vector<Angle > > delayDir, vector<vector<Angle > > phaseDir, vector<vector<Angle > > referenceDir); 00727 00728 00729 00730 00746 bool compareRequiredValue(string fieldName, int numPoly, vector<vector<Angle > > delayDir, vector<vector<Angle > > phaseDir, vector<vector<Angle > > referenceDir); 00747 00748 00757 bool equalByRequiredValue(FieldRow* x) ; 00758 00759 #ifndef WITHOUT_ACS 00760 00764 asdmIDL::FieldRowIDL *toIDL() const; 00765 #endif 00766 00767 #ifndef WITHOUT_ACS 00768 00773 void setFromIDL (asdmIDL::FieldRowIDL x) ; 00774 #endif 00775 00780 std::string toXML() const; 00781 00788 void setFromXML (std::string rowDoc) ; 00789 00792 // binary-deserialization material from an EndianIStream // 00794 00795 std::map<std::string, FieldAttributeFromBin> fromBinMethods; 00796 void fieldIdFromBin( EndianIStream& eis); 00797 void fieldNameFromBin( EndianIStream& eis); 00798 void numPolyFromBin( EndianIStream& eis); 00799 void delayDirFromBin( EndianIStream& eis); 00800 void phaseDirFromBin( EndianIStream& eis); 00801 void referenceDirFromBin( EndianIStream& eis); 00802 00803 void timeFromBin( EndianIStream& eis); 00804 void codeFromBin( EndianIStream& eis); 00805 void directionCodeFromBin( EndianIStream& eis); 00806 void directionEquinoxFromBin( EndianIStream& eis); 00807 void assocNatureFromBin( EndianIStream& eis); 00808 void ephemerisIdFromBin( EndianIStream& eis); 00809 void sourceIdFromBin( EndianIStream& eis); 00810 void assocFieldIdFromBin( EndianIStream& eis); 00811 00812 00820 static FieldRow* fromBin(EndianIStream& eis, FieldTable& table, const std::vector<std::string>& attributesSeq); 00822 00823 private: 00827 FieldTable &table; 00831 bool hasBeenAdded; 00832 00833 // This method is used by the Table class when this row is added to the table. 00834 void isAdded(bool added); 00835 00836 00845 FieldRow (FieldTable &table); 00846 00864 FieldRow (FieldTable &table, FieldRow &row); 00865 00867 // Intrinsic Table Attributes // 00869 00870 00871 // ===> Attribute fieldId 00872 00873 00874 00875 Tag fieldId; 00876 00877 00878 00879 00889 void setFieldId (Tag fieldId); 00890 00891 00892 00893 00894 // ===> Attribute fieldName 00895 00896 00897 00898 string fieldName; 00899 00900 00901 00902 00903 00904 00905 // ===> Attribute numPoly 00906 00907 00908 00909 int numPoly; 00910 00911 00912 00913 00914 00915 00916 // ===> Attribute delayDir 00917 00918 00919 00920 vector<vector<Angle > > delayDir; 00921 00922 00923 00924 00925 00926 00927 // ===> Attribute phaseDir 00928 00929 00930 00931 vector<vector<Angle > > phaseDir; 00932 00933 00934 00935 00936 00937 00938 // ===> Attribute referenceDir 00939 00940 00941 00942 vector<vector<Angle > > referenceDir; 00943 00944 00945 00946 00947 00948 00949 // ===> Attribute time, which is optional 00950 00951 00952 bool timeExists; 00953 00954 00955 ArrayTime time; 00956 00957 00958 00959 00960 00961 00962 // ===> Attribute code, which is optional 00963 00964 00965 bool codeExists; 00966 00967 00968 string code; 00969 00970 00971 00972 00973 00974 00975 // ===> Attribute directionCode, which is optional 00976 00977 00978 bool directionCodeExists; 00979 00980 00981 DirectionReferenceCodeMod::DirectionReferenceCode directionCode; 00982 00983 00984 00985 00986 00987 00988 // ===> Attribute directionEquinox, which is optional 00989 00990 00991 bool directionEquinoxExists; 00992 00993 00994 ArrayTime directionEquinox; 00995 00996 00997 00998 00999 01000 01001 // ===> Attribute assocNature, which is optional 01002 01003 01004 bool assocNatureExists; 01005 01006 01007 string assocNature; 01008 01009 01010 01011 01012 01014 // Extrinsic Table Attributes // 01016 01017 01018 // ===> Attribute assocFieldId, which is optional 01019 01020 01021 bool assocFieldIdExists; 01022 01023 01024 Tag assocFieldId; 01025 01026 01027 01028 01029 01030 01031 // ===> Attribute ephemerisId, which is optional 01032 01033 01034 bool ephemerisIdExists; 01035 01036 01037 Tag ephemerisId; 01038 01039 01040 01041 01042 01043 01044 // ===> Attribute sourceId, which is optional 01045 01046 01047 bool sourceIdExists; 01048 01049 01050 int sourceId; 01051 01052 01053 01054 01055 01057 // Links // 01059 01060 01061 01062 01063 01064 01065 01066 01067 01068 01069 01070 01071 01072 01073 01074 01075 01076 01077 01078 01079 01080 01081 /* 01083 // binary-deserialization material from an EndianIStream // 01085 std::map<std::string, FieldAttributeFromBin> fromBinMethods; 01086 void fieldIdFromBin( EndianIStream& eis); 01087 void fieldNameFromBin( EndianIStream& eis); 01088 void numPolyFromBin( EndianIStream& eis); 01089 void delayDirFromBin( EndianIStream& eis); 01090 void phaseDirFromBin( EndianIStream& eis); 01091 void referenceDirFromBin( EndianIStream& eis); 01092 01093 void timeFromBin( EndianIStream& eis); 01094 void codeFromBin( EndianIStream& eis); 01095 void directionCodeFromBin( EndianIStream& eis); 01096 void directionEquinoxFromBin( EndianIStream& eis); 01097 void assocNatureFromBin( EndianIStream& eis); 01098 void ephemerisIdFromBin( EndianIStream& eis); 01099 void sourceIdFromBin( EndianIStream& eis); 01100 void assocFieldIdFromBin( EndianIStream& eis); 01101 01102 */ 01103 01105 // text-deserialization material // 01107 std::map<std::string, FieldAttributeFromText> fromTextMethods; 01108 01109 void fieldIdFromText (const string & s); 01110 01111 01112 void fieldNameFromText (const string & s); 01113 01114 01115 void numPolyFromText (const string & s); 01116 01117 01118 void delayDirFromText (const string & s); 01119 01120 01121 void phaseDirFromText (const string & s); 01122 01123 01124 void referenceDirFromText (const string & s); 01125 01126 01127 01128 void timeFromText (const string & s); 01129 01130 01131 void codeFromText (const string & s); 01132 01133 01134 void directionCodeFromText (const string & s); 01135 01136 01137 void directionEquinoxFromText (const string & s); 01138 01139 01140 void assocNatureFromText (const string & s); 01141 01142 01143 void ephemerisIdFromText (const string & s); 01144 01145 01146 void sourceIdFromText (const string & s); 01147 01148 01149 void assocFieldIdFromText (const string & s); 01150 01151 01152 01153 void fromText(const std::string& attributeName, const std::string& t); 01154 01159 void toBin(EndianOSStream& eoss); 01160 01170 }; 01171 01172 } // End namespace asdm 01173 01174 #endif /* Field_CLASS */