casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EphemerisRow.h
Go to the documentation of this file.
1 
2 /*
3  * ALMA - Atacama Large Millimeter Array
4  * (c) European Southern Observatory, 2002
5  * (c) Associated Universities Inc., 2002
6  * Copyright by ESO (in the framework of the ALMA collaboration),
7  * Copyright by AUI (in the framework of the ALMA collaboration),
8  * All rights reserved.
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY, without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23  * MA 02111-1307 USA
24  *
25  * Warning!
26  * --------------------------------------------------------------------
27  * | This is generated code! Do not modify this file. |
28  * | If you do, all changes will be lost when the file is re-generated. |
29  * --------------------------------------------------------------------
30  *
31  * File EphemerisRow.h
32  */
33 
34 #ifndef EphemerisRow_CLASS
35 #define EphemerisRow_CLASS
36 
37 #include <vector>
38 #include <string>
39 #include <set>
40 
41 #ifndef WITHOUT_ACS
42 #include <asdmIDLC.h>
43 #endif
44 
45 
46 
47 
48 
49 
50 
52 
53 
54 
55 #include <alma/ASDM/ArrayTime.h>
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
88 #include <alma/ASDM/NoSuchRow.h>
90 
92 //#include <alma/ASDM/TableStreamReader.h>
93 
94 /*\file Ephemeris.h
95  \brief Generated from model's revision "-1", branch ""
96 */
97 
98 namespace asdm {
99 
100 //class asdm::EphemerisTable;
101 
102 
103 
104 class EphemerisRow;
106 typedef void (EphemerisRow::*EphemerisAttributeFromText) (const std::string& s);
107 
115 friend class asdm::EphemerisTable;
117 //friend class asdm::TableStreamReader<EphemerisTable, EphemerisRow>;
118 
119 public:
120 
121  virtual ~EphemerisRow();
122 
126  EphemerisTable &getTable() const;
127 
132  bool isAdded() const;
133 
135  // Intrinsic Table Attributes //
137 
138 
139  // ===> Attribute timeInterval
140 
141 
142 
143 
144 
149  ArrayTimeInterval getTimeInterval() const;
150 
151 
152 
153 
163  void setTimeInterval (ArrayTimeInterval timeInterval);
164 
165 
166 
167 
168 
169 
170 
171  // ===> Attribute ephemerisId
172 
173 
174 
175 
176 
181  int getEphemerisId() const;
182 
183 
184 
185 
195  void setEphemerisId (int ephemerisId);
196 
197 
198 
199 
200 
201 
202 
203  // ===> Attribute observerLocation
204 
205 
206 
207 
208 
213  std::vector<double > getObserverLocation() const;
214 
215 
216 
217 
225  void setObserverLocation (std::vector<double > observerLocation);
226 
227 
228 
229 
230 
231 
232 
233  // ===> Attribute equinoxEquator
234 
235 
236 
237 
238 
243  double getEquinoxEquator() const;
244 
245 
246 
247 
255  void setEquinoxEquator (double equinoxEquator);
256 
257 
258 
259 
260 
261 
262 
263  // ===> Attribute numPolyDir
264 
265 
266 
267 
268 
273  int getNumPolyDir() const;
274 
275 
276 
277 
285  void setNumPolyDir (int numPolyDir);
286 
287 
288 
289 
290 
291 
292 
293  // ===> Attribute dir
294 
295 
296 
297 
298 
303  std::vector<std::vector<double > > getDir() const;
304 
305 
306 
307 
315  void setDir (std::vector<std::vector<double > > dir);
316 
317 
318 
319 
320 
321 
322 
323  // ===> Attribute numPolyDist
324 
325 
326 
327 
328 
333  int getNumPolyDist() const;
334 
335 
336 
337 
345  void setNumPolyDist (int numPolyDist);
346 
347 
348 
349 
350 
351 
352 
353  // ===> Attribute distance
354 
355 
356 
357 
358 
363  std::vector<double > getDistance() const;
364 
365 
366 
367 
375  void setDistance (std::vector<double > distance);
376 
377 
378 
379 
380 
381 
382 
383  // ===> Attribute timeOrigin
384 
385 
386 
387 
388 
393  ArrayTime getTimeOrigin() const;
394 
395 
396 
397 
406 
407 
408 
409 
410 
411 
412 
413  // ===> Attribute origin
414 
415 
416 
417 
418 
423  std::string getOrigin() const;
424 
425 
426 
427 
435  void setOrigin (std::string origin);
436 
437 
438 
439 
440 
441 
442 
443  // ===> Attribute numPolyRadVel, which is optional
444 
445 
446 
451  bool isNumPolyRadVelExists() const;
452 
453 
454 
460  int getNumPolyRadVel() const;
461 
462 
463 
464 
471  void setNumPolyRadVel (int numPolyRadVel);
472 
473 
474 
475 
479  void clearNumPolyRadVel ();
480 
481 
482 
483 
484  // ===> Attribute radVel, which is optional
485 
486 
487 
492  bool isRadVelExists() const;
493 
494 
495 
501  std::vector<double > getRadVel() const;
502 
503 
504 
505 
512  void setRadVel (std::vector<double > radVel);
513 
514 
515 
516 
520  void clearRadVel ();
521 
522 
523 
525  // Extrinsic Table Attributes //
527 
529  // Links //
531 
532 
533 
534 
560  bool compareNoAutoInc(ArrayTimeInterval timeInterval, int ephemerisId, std::vector<double > observerLocation, double equinoxEquator, int numPolyDir, std::vector<std::vector<double > > dir, int numPolyDist, std::vector<double > distance, ArrayTime timeOrigin, std::string origin);
561 
562 
563 
564 
586  bool compareRequiredValue(std::vector<double > observerLocation, double equinoxEquator, int numPolyDir, std::vector<std::vector<double > > dir, int numPolyDist, std::vector<double > distance, ArrayTime timeOrigin, std::string origin);
587 
588 
598 
599 #ifndef WITHOUT_ACS
600 
604  asdmIDL::EphemerisRowIDL *toIDL() const;
605 
613  void toIDL(asdmIDL::EphemerisRowIDL& x) const;
614 #endif
615 
616 #ifndef WITHOUT_ACS
617 
622  void setFromIDL (asdmIDL::EphemerisRowIDL x) ;
623 #endif
624 
629  std::string toXML() const;
630 
637  void setFromXML (std::string rowDoc) ;
638 
641  // binary-deserialization material from an EndianIStream //
643 
644  std::map<std::string, EphemerisAttributeFromBin> fromBinMethods;
649 void numPolyDirFromBin( EndianIStream& eis);
650 void dirFromBin( EndianIStream& eis);
652 void distanceFromBin( EndianIStream& eis);
653 void timeOriginFromBin( EndianIStream& eis);
654 void originFromBin( EndianIStream& eis);
655 
657 void radVelFromBin( EndianIStream& eis);
658 
659 
667  static EphemerisRow* fromBin(EndianIStream& eis, EphemerisTable& table, const std::vector<std::string>& attributesSeq);
668 
675  void fromText(const std::string& attributeName, const std::string& t);
677 
678 private:
687 
688  // This method is used by the Table class when this row is added to the table.
689  void isAdded(bool added);
690 
691 
701 
720 
722  // Intrinsic Table Attributes //
724 
725 
726  // ===> Attribute timeInterval
727 
728 
729 
730  ArrayTimeInterval timeInterval;
731 
732 
733 
734 
735 
736 
737  // ===> Attribute ephemerisId
738 
739 
740 
742 
743 
744 
745 
746 
747 
748  // ===> Attribute observerLocation
749 
750 
751 
752  std::vector<double > observerLocation;
753 
754 
755 
756 
757 
758 
759  // ===> Attribute equinoxEquator
760 
761 
762 
764 
765 
766 
767 
768 
769 
770  // ===> Attribute numPolyDir
771 
772 
773 
775 
776 
777 
778 
779 
780 
781  // ===> Attribute dir
782 
783 
784 
785  std::vector<std::vector<double > > dir;
786 
787 
788 
789 
790 
791 
792  // ===> Attribute numPolyDist
793 
794 
795 
797 
798 
799 
800 
801 
802 
803  // ===> Attribute distance
804 
805 
806 
807  std::vector<double > distance;
808 
809 
810 
811 
812 
813 
814  // ===> Attribute timeOrigin
815 
816 
817 
819 
820 
821 
822 
823 
824 
825  // ===> Attribute origin
826 
827 
828 
829  std::string origin;
830 
831 
832 
833 
834 
835 
836  // ===> Attribute numPolyRadVel, which is optional
837 
838 
840 
841 
843 
844 
845 
846 
847 
848 
849  // ===> Attribute radVel, which is optional
850 
851 
853 
854 
855  std::vector<double > radVel;
856 
857 
858 
859 
860 
862  // Extrinsic Table Attributes //
864 
866  // Links //
868 
869 
870 /*
872  // binary-deserialization material from an EndianIStream //
874  std::map<std::string, EphemerisAttributeFromBin> fromBinMethods;
875 void timeIntervalFromBin( EndianIStream& eis);
876 void ephemerisIdFromBin( EndianIStream& eis);
877 void observerLocationFromBin( EndianIStream& eis);
878 void equinoxEquatorFromBin( EndianIStream& eis);
879 void numPolyDirFromBin( EndianIStream& eis);
880 void dirFromBin( EndianIStream& eis);
881 void numPolyDistFromBin( EndianIStream& eis);
882 void distanceFromBin( EndianIStream& eis);
883 void timeOriginFromBin( EndianIStream& eis);
884 void originFromBin( EndianIStream& eis);
885 
886 void numPolyRadVelFromBin( EndianIStream& eis);
887 void radVelFromBin( EndianIStream& eis);
888 
889 */
890 
892  // text-deserialization material //
894  std::map<std::string, EphemerisAttributeFromText> fromTextMethods;
895 
896 void timeIntervalFromText (const std::string & s);
897 
898 
899 void ephemerisIdFromText (const std::string & s);
900 
901 
902 void observerLocationFromText (const std::string & s);
903 
904 
905 void equinoxEquatorFromText (const std::string & s);
906 
907 
908 void numPolyDirFromText (const std::string & s);
909 
910 
911 void dirFromText (const std::string & s);
912 
913 
914 void numPolyDistFromText (const std::string & s);
915 
916 
917 void distanceFromText (const std::string & s);
918 
919 
920 void timeOriginFromText (const std::string & s);
921 
922 
923 void originFromText (const std::string & s);
924 
925 
926 
927 void numPolyRadVelFromText (const std::string & s);
928 
929 
930 void radVelFromText (const std::string & s);
931 
932 
933 
938  void toBin(EndianOSStream& eoss);
939 
949 };
950 
951 } // End namespace asdm
952 
953 #endif /* Ephemeris_CLASS */
void numPolyDistFromBin(EndianIStream &eis)
std::vector< double > distance
===&gt; Attribute distance
Definition: EphemerisRow.h:807
void setTimeOrigin(ArrayTime timeOrigin)
Set timeOrigin with the specified ArrayTime.
bool radVelExists
===&gt; Attribute radVel, which is optional
Definition: EphemerisRow.h:852
void numPolyDistFromText(const std::string &s)
int getNumPolyDist() const
===&gt; Attribute numPolyDist
void setEquinoxEquator(double equinoxEquator)
Set equinoxEquator with the specified double.
void setOrigin(std::string origin)
Set origin with the specified std::string.
The EphemerisTable class is an Alma table.
std::vector< double > getRadVel() const
Get radVel, which is optional.
void clearRadVel()
Mark radVel, which is an optional field, as non-existent.
int numPolyDir
===&gt; Attribute numPolyDir
Definition: EphemerisRow.h:774
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
bool compareRequiredValue(std::vector< double > observerLocation, double equinoxEquator, int numPolyDir, std::vector< std::vector< double > > dir, int numPolyDist, std::vector< double > distance, ArrayTime timeOrigin, std::string origin)
Compare each mandatory value (i.e.
void timeOriginFromText(const std::string &s)
EphemerisTable & getTable() const
Return the table to which this row belongs.
void dirFromBin(EndianIStream &eis)
std::vector< double > observerLocation
===&gt; Attribute observerLocation
Definition: EphemerisRow.h:752
int getNumPolyDir() const
===&gt; Attribute numPolyDir
void setDistance(std::vector< double > distance)
Set distance with the specified std::vector&lt;double &gt;.
std::vector< double > getDistance() const
===&gt; Attribute distance
void setFromIDL(asdmIDL::EphemerisRowIDL x)
Fill the values of this row from the IDL struct EphemerisRowIDL.
void setNumPolyRadVel(int numPolyRadVel)
Set numPolyRadVel with the specified int.
void radVelFromBin(EndianIStream &eis)
void distanceFromText(const std::string &s)
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
EphemerisRow(EphemerisTable &table)
Create a EphemerisRow.
void numPolyRadVelFromBin(EndianIStream &eis)
EphemerisTable & table
The table to which this row belongs.
Definition: EphemerisRow.h:682
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, EphemerisAttributeFromBin > fromBinMethods
Definition: EphemerisRow.h:874
bool equalByRequiredValue(EphemerisRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void timeIntervalFromText(const std::string &s)
double getEquinoxEquator() const
===&gt; Attribute equinoxEquator
double equinoxEquator
===&gt; Attribute equinoxEquator
Definition: EphemerisRow.h:763
The EphemerisRow class is a row of a EphemerisTable.
Definition: EphemerisRow.h:114
void radVelFromText(const std::string &s)
*text deserialization material std::map< std::string, EphemerisAttributeFromText > fromTextMethods
Definition: EphemerisRow.h:894
int getEphemerisId() const
===&gt; Attribute ephemerisId
void setEphemerisId(int ephemerisId)
Set ephemerisId with the specified int.
void dirFromText(const std::string &s)
void setRadVel(std::vector< double > radVel)
Set radVel with the specified std::vector&lt;double &gt;.
void numPolyDirFromText(const std::string &s)
void setNumPolyDir(int numPolyDir)
Set numPolyDir with the specified int.
void equinoxEquatorFromBin(EndianIStream &eis)
std::vector< double > getObserverLocation() const
===&gt; Attribute observerLocation
void timeIntervalFromBin(EndianIStream &eis)
ArrayTime timeOrigin
===&gt; Attribute timeOrigin
Definition: EphemerisRow.h:818
void numPolyRadVelFromText(const std::string &s)
int ephemerisId
===&gt; Attribute ephemerisId
Definition: EphemerisRow.h:741
void numPolyDirFromBin(EndianIStream &eis)
std::vector< double > radVel
Definition: EphemerisRow.h:855
Extrinsic Table Attributes Links *bool compareNoAutoInc(ArrayTimeInterval timeInterval, int ephemerisId, std::vector< double > observerLocation, double equinoxEquator, int numPolyDir, std::vector< std::vector< double > > dir, int numPolyDist, std::vector< double > distance, ArrayTime timeOrigin, std::string origin)
Compare each mandatory attribute except the autoincrementable one of this EphemerisRow with the corre...
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
bool numPolyRadVelExists
===&gt; Attribute numPolyRadVel, which is optional
Definition: EphemerisRow.h:839
void setTimeInterval(ArrayTimeInterval timeInterval)
Set timeInterval with the specified ArrayTimeInterval.
void ephemerisIdFromText(const std::string &s)
int getNumPolyRadVel() const
Get numPolyRadVel, which is optional.
bool isNumPolyRadVelExists() const
===&gt; Attribute numPolyRadVel, which is optional
bool isAdded() const
Has this row been added to its table ?
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void distanceFromBin(EndianIStream &eis)
virtual ~EphemerisRow()
friend class asdm::TableStreamReader&lt;EphemerisTable, EphemerisRow&gt;;
std::vector< std::vector< double > > getDir() const
===&gt; Attribute dir
asdmIDL::EphemerisRowIDL * toIDL() const
Return this row in the form of an IDL struct.
std::string origin
===&gt; Attribute origin
Definition: EphemerisRow.h:829
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: EphemerisRow.h:686
void(EphemerisRow::* EphemerisAttributeFromBin)(EndianIStream &eis)
Definition: EphemerisRow.h:105
void originFromBin(EndianIStream &eis)
int numPolyDist
===&gt; Attribute numPolyDist
Definition: EphemerisRow.h:796
std::string getOrigin() const
===&gt; Attribute origin
void timeOriginFromBin(EndianIStream &eis)
void setObserverLocation(std::vector< double > observerLocation)
Set observerLocation with the specified std::vector&lt;double &gt;.
std::vector< std::vector< double > > dir
===&gt; Attribute dir
Definition: EphemerisRow.h:785
void setNumPolyDist(int numPolyDist)
Set numPolyDist with the specified int.
void ephemerisIdFromBin(EndianIStream &eis)
void originFromText(const std::string &s)
void(EphemerisRow::* EphemerisAttributeFromText)(const std::string &s)
Definition: EphemerisRow.h:106
bool isRadVelExists() const
===&gt; Attribute radVel, which is optional
std::string toXML() const
Return this row in the form of an XML string.
void clearNumPolyRadVel()
Mark numPolyRadVel, which is an optional field, as non-existent.
ArrayTime getTimeOrigin() const
===&gt; Attribute timeOrigin
void observerLocationFromText(const std::string &s)
void equinoxEquatorFromText(const std::string &s)
void observerLocationFromBin(EndianIStream &eis)
void setDir(std::vector< std::vector< double > > dir)
Set dir with the specified std::vector&lt;std::vector&lt;double &gt; &gt;.