FieldRow.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 FieldRow.h
00032  */
00033  
00034 #ifndef FieldRow_CLASS
00035 #define FieldRow_CLASS
00036 
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 using std::vector;
00041 using std::string;
00042 using std::set;
00043 
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::FieldRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <ArrayTime.h>
00055 using  asdm::ArrayTime;
00056 
00057 #include <Angle.h>
00058 using  asdm::Angle;
00059 
00060 #include <Tag.h>
00061 using  asdm::Tag;
00062 
00063 
00064 
00065 
00066         
00067 
00068         
00069 
00070         
00071 
00072         
00073 
00074         
00075 
00076         
00077 
00078         
00079 
00080         
00081 
00082         
00083 #include "CDirectionReferenceCode.h"
00084 using namespace DirectionReferenceCodeMod;
00085         
00086 
00087         
00088 
00089         
00090 
00091 
00092 
00093 #include <ConversionException.h>
00094 #include <NoSuchRow.h>
00095 #include <IllegalAccessException.h>
00096 
00097 
00098 /*\file Field.h
00099     \brief Generated from model's revision "1.55", 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) (EndianISStream& eiss);
00119 
00126 class FieldRow {
00127 friend class asdm::FieldTable;
00128 
00129 public:
00130 
00131         virtual ~FieldRow();
00132 
00136         FieldTable &getTable() const;
00137         
00142         bool isAdded() const;
00143                 
00145         // Intrinsic Table Attributes //
00147         
00148         
00149         // ===> Attribute fieldId
00150         
00151         
00152         
00153 
00154         
00159         Tag getFieldId() const;
00160         
00161  
00162         
00163         
00164         
00165         
00166 
00167 
00168         
00169         // ===> Attribute fieldName
00170         
00171         
00172         
00173 
00174         
00179         string getFieldName() const;
00180         
00181  
00182         
00183         
00191         void setFieldName (string fieldName);
00192                 
00193         
00194         
00195         
00196 
00197 
00198         
00199         // ===> Attribute code
00200         
00201         
00202         
00203 
00204         
00209         string getCode() const;
00210         
00211  
00212         
00213         
00221         void setCode (string code);
00222                 
00223         
00224         
00225         
00226 
00227 
00228         
00229         // ===> Attribute numPoly
00230         
00231         
00232         
00233 
00234         
00239         int getNumPoly() const;
00240         
00241  
00242         
00243         
00251         void setNumPoly (int numPoly);
00252                 
00253         
00254         
00255         
00256 
00257 
00258         
00259         // ===> Attribute delayDir
00260         
00261         
00262         
00263 
00264         
00269         vector<vector<Angle > > getDelayDir() const;
00270         
00271  
00272         
00273         
00281         void setDelayDir (vector<vector<Angle > > delayDir);
00282                 
00283         
00284         
00285         
00286 
00287 
00288         
00289         // ===> Attribute phaseDir
00290         
00291         
00292         
00293 
00294         
00299         vector<vector<Angle > > getPhaseDir() const;
00300         
00301  
00302         
00303         
00311         void setPhaseDir (vector<vector<Angle > > phaseDir);
00312                 
00313         
00314         
00315         
00316 
00317 
00318         
00319         // ===> Attribute referenceDir
00320         
00321         
00322         
00323 
00324         
00329         vector<vector<Angle > > getReferenceDir() const;
00330         
00331  
00332         
00333         
00341         void setReferenceDir (vector<vector<Angle > > referenceDir);
00342                 
00343         
00344         
00345         
00346 
00347 
00348         
00349         // ===> Attribute time, which is optional
00350         
00351         
00352         
00357         bool isTimeExists() const;
00358         
00359 
00360         
00366         ArrayTime getTime() const;
00367         
00368  
00369         
00370         
00377         void setTime (ArrayTime time);
00378                 
00379         
00380         
00381         
00385         void clearTime ();
00386         
00387 
00388 
00389         
00390         // ===> Attribute directionCode, which is optional
00391         
00392         
00393         
00398         bool isDirectionCodeExists() const;
00399         
00400 
00401         
00407         DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const;
00408         
00409  
00410         
00411         
00418         void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode);
00419                 
00420         
00421         
00422         
00426         void clearDirectionCode ();
00427         
00428 
00429 
00430         
00431         // ===> Attribute directionEquinox, which is optional
00432         
00433         
00434         
00439         bool isDirectionEquinoxExists() const;
00440         
00441 
00442         
00448         ArrayTime getDirectionEquinox() const;
00449         
00450  
00451         
00452         
00459         void setDirectionEquinox (ArrayTime directionEquinox);
00460                 
00461         
00462         
00463         
00467         void clearDirectionEquinox ();
00468         
00469 
00470 
00471         
00472         // ===> Attribute assocNature, which is optional
00473         
00474         
00475         
00480         bool isAssocNatureExists() const;
00481         
00482 
00483         
00489         string getAssocNature() const;
00490         
00491  
00492         
00493         
00500         void setAssocNature (string assocNature);
00501                 
00502         
00503         
00504         
00508         void clearAssocNature ();
00509         
00510 
00511 
00513         // Extrinsic Table Attributes //
00515         
00516         
00517         // ===> Attribute assocFieldId, which is optional
00518         
00519         
00520         
00525         bool isAssocFieldIdExists() const;
00526         
00527 
00528         
00534         Tag getAssocFieldId() const;
00535         
00536  
00537         
00538         
00545         void setAssocFieldId (Tag assocFieldId);
00546                 
00547         
00548         
00549         
00553         void clearAssocFieldId ();
00554         
00555 
00556 
00557         
00558         // ===> Attribute ephemerisId, which is optional
00559         
00560         
00561         
00566         bool isEphemerisIdExists() const;
00567         
00568 
00569         
00575         Tag getEphemerisId() const;
00576         
00577  
00578         
00579         
00586         void setEphemerisId (Tag ephemerisId);
00587                 
00588         
00589         
00590         
00594         void clearEphemerisId ();
00595         
00596 
00597 
00598         
00599         // ===> Attribute sourceId, which is optional
00600         
00601         
00602         
00607         bool isSourceIdExists() const;
00608         
00609 
00610         
00616         int getSourceId() const;
00617         
00618  
00619         
00620         
00627         void setSourceId (int sourceId);
00628                 
00629         
00630         
00631         
00635         void clearSourceId ();
00636         
00637 
00638 
00640         // Links //
00642         
00643         
00644 
00645         
00646                 
00655          EphemerisRow* getEphemerisUsingEphemerisId();
00656          
00657 
00658         
00659 
00660         
00661 
00662         
00663                 
00664         // ===> Slice link from a row of Field table to a collection of row of Source table.
00665         
00671         vector <SourceRow *> getSources();
00672         
00673         
00674 
00675         
00676 
00677         
00678 
00679         
00680                 
00689          FieldRow* getFieldUsingAssocFieldId();
00690          
00691 
00692         
00693 
00694         
00695         
00696         
00714         bool compareNoAutoInc(string fieldName, string code, int numPoly, vector<vector<Angle > > delayDir, vector<vector<Angle > > phaseDir, vector<vector<Angle > > referenceDir);
00715         
00716         
00717 
00718         
00736         bool compareRequiredValue(string fieldName, string code, int numPoly, vector<vector<Angle > > delayDir, vector<vector<Angle > > phaseDir, vector<vector<Angle > > referenceDir); 
00737                  
00738         
00747         bool equalByRequiredValue(FieldRow* x) ;
00748         
00749 #ifndef WITHOUT_ACS
00750 
00754         FieldRowIDL *toIDL() const;
00755 #endif
00756         
00757 #ifndef WITHOUT_ACS
00758 
00763         void setFromIDL (FieldRowIDL x) ;
00764 #endif
00765         
00770         string toXML() const;
00771 
00778         void setFromXML (string rowDoc) ;       
00779 
00780 private:
00784         FieldTable &table;
00788         bool hasBeenAdded;
00789 
00790         // This method is used by the Table class when this row is added to the table.
00791         void isAdded(bool added);
00792 
00793 
00802         FieldRow (FieldTable &table);
00803 
00821          FieldRow (FieldTable &table, FieldRow &row);
00822                 
00824         // Intrinsic Table Attributes //
00826         
00827         
00828         // ===> Attribute fieldId
00829         
00830         
00831 
00832         Tag fieldId;
00833 
00834         
00835         
00836         
00846         void setFieldId (Tag fieldId);
00847                 
00848         
00849 
00850         
00851         // ===> Attribute fieldName
00852         
00853         
00854 
00855         string fieldName;
00856 
00857         
00858         
00859         
00860 
00861         
00862         // ===> Attribute code
00863         
00864         
00865 
00866         string code;
00867 
00868         
00869         
00870         
00871 
00872         
00873         // ===> Attribute numPoly
00874         
00875         
00876 
00877         int numPoly;
00878 
00879         
00880         
00881         
00882 
00883         
00884         // ===> Attribute delayDir
00885         
00886         
00887 
00888         vector<vector<Angle > > delayDir;
00889 
00890         
00891         
00892         
00893 
00894         
00895         // ===> Attribute phaseDir
00896         
00897         
00898 
00899         vector<vector<Angle > > phaseDir;
00900 
00901         
00902         
00903         
00904 
00905         
00906         // ===> Attribute referenceDir
00907         
00908         
00909 
00910         vector<vector<Angle > > referenceDir;
00911 
00912         
00913         
00914         
00915 
00916         
00917         // ===> Attribute time, which is optional
00918         
00919         
00920         bool timeExists;
00921         
00922 
00923         ArrayTime time;
00924 
00925         
00926         
00927         
00928 
00929         
00930         // ===> Attribute directionCode, which is optional
00931         
00932         
00933         bool directionCodeExists;
00934         
00935 
00936         DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
00937 
00938         
00939         
00940         
00941 
00942         
00943         // ===> Attribute directionEquinox, which is optional
00944         
00945         
00946         bool directionEquinoxExists;
00947         
00948 
00949         ArrayTime directionEquinox;
00950 
00951         
00952         
00953         
00954 
00955         
00956         // ===> Attribute assocNature, which is optional
00957         
00958         
00959         bool assocNatureExists;
00960         
00961 
00962         string assocNature;
00963 
00964         
00965         
00966         
00967 
00969         // Extrinsic Table Attributes //
00971         
00972         
00973         // ===> Attribute assocFieldId, which is optional
00974         
00975         
00976         bool assocFieldIdExists;
00977         
00978 
00979         Tag assocFieldId;
00980 
00981         
00982         
00983         
00984 
00985         
00986         // ===> Attribute ephemerisId, which is optional
00987         
00988         
00989         bool ephemerisIdExists;
00990         
00991 
00992         Tag ephemerisId;
00993 
00994         
00995         
00996         
00997 
00998         
00999         // ===> Attribute sourceId, which is optional
01000         
01001         
01002         bool sourceIdExists;
01003         
01004 
01005         int sourceId;
01006 
01007         
01008         
01009         
01010 
01012         // Links //
01014         
01015         
01016                 
01017 
01018          
01019 
01020         
01021 
01022         
01023                 
01024 
01025 
01026         
01027 
01028         
01029                 
01030 
01031          
01032 
01033         
01034 
01035         
01037         // binary-deserialization material//
01039         map<string, FieldAttributeFromBin> fromBinMethods;
01040 void fieldIdFromBin( EndianISStream& eiss);
01041 void fieldNameFromBin( EndianISStream& eiss);
01042 void codeFromBin( EndianISStream& eiss);
01043 void numPolyFromBin( EndianISStream& eiss);
01044 void delayDirFromBin( EndianISStream& eiss);
01045 void phaseDirFromBin( EndianISStream& eiss);
01046 void referenceDirFromBin( EndianISStream& eiss);
01047 
01048 void timeFromBin( EndianISStream& eiss);
01049 void directionCodeFromBin( EndianISStream& eiss);
01050 void directionEquinoxFromBin( EndianISStream& eiss);
01051 void assocNatureFromBin( EndianISStream& eiss);
01052 void ephemerisIdFromBin( EndianISStream& eiss);
01053 void sourceIdFromBin( EndianISStream& eiss);
01054 void assocFieldIdFromBin( EndianISStream& eiss);
01055         
01056         
01061          void toBin(EndianOSStream& eoss);
01062                  
01070          static FieldRow* fromBin(EndianISStream& eiss, FieldTable& table, const vector<string>& attributesSeq);         
01071 
01072 };
01073 
01074 } // End namespace asdm
01075 
01076 #endif /* Field_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines