casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PulsarRow.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 PulsarRow.h
32  */
33 
34 #ifndef PulsarRow_CLASS
35 #define PulsarRow_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 
51 #include <alma/ASDM/ArrayTime.h>
52 
53 
54 
55 #include <alma/ASDM/Frequency.h>
56 
57 
58 
59 #include <alma/ASDM/Tag.h>
60 
61 
62 
63 #include <alma/ASDM/Interval.h>
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
96 #include <alma/ASDM/NoSuchRow.h>
98 
100 //#include <alma/ASDM/TableStreamReader.h>
101 
102 /*\file Pulsar.h
103  \brief Generated from model's revision "-1", branch ""
104 */
105 
106 namespace asdm {
107 
108 //class asdm::PulsarTable;
109 
110 
111 
112 class PulsarRow;
114 typedef void (PulsarRow::*PulsarAttributeFromText) (const std::string& s);
115 
122 class PulsarRow {
123 friend class asdm::PulsarTable;
125 //friend class asdm::TableStreamReader<PulsarTable, PulsarRow>;
126 
127 public:
128 
129  virtual ~PulsarRow();
130 
134  PulsarTable &getTable() const;
135 
140  bool isAdded() const;
141 
143  // Intrinsic Table Attributes //
145 
146 
147  // ===> Attribute pulsarId
148 
149 
150 
151 
152 
157  Tag getPulsarId() const;
158 
159 
160 
161 
162 
163 
164 
165 
166 
167  // ===> Attribute refTime
168 
169 
170 
171 
172 
177  ArrayTime getRefTime() const;
178 
179 
180 
181 
190 
191 
192 
193 
194 
195 
196 
197  // ===> Attribute refPulseFreq
198 
199 
200 
201 
202 
207  Frequency getRefPulseFreq() const;
208 
209 
210 
211 
220 
221 
222 
223 
224 
225 
226 
227  // ===> Attribute refPhase
228 
229 
230 
231 
232 
237  double getRefPhase() const;
238 
239 
240 
241 
249  void setRefPhase (double refPhase);
250 
251 
252 
253 
254 
255 
256 
257  // ===> Attribute numBin
258 
259 
260 
261 
262 
267  int getNumBin() const;
268 
269 
270 
271 
279  void setNumBin (int numBin);
280 
281 
282 
283 
284 
285 
286 
287  // ===> Attribute numPoly, which is optional
288 
289 
290 
295  bool isNumPolyExists() const;
296 
297 
298 
304  int getNumPoly() const;
305 
306 
307 
308 
315  void setNumPoly (int numPoly);
316 
317 
318 
319 
323  void clearNumPoly ();
324 
325 
326 
327 
328  // ===> Attribute phasePoly, which is optional
329 
330 
331 
336  bool isPhasePolyExists() const;
337 
338 
339 
345  std::vector<double > getPhasePoly() const;
346 
347 
348 
349 
356  void setPhasePoly (std::vector<double > phasePoly);
357 
358 
359 
360 
364  void clearPhasePoly ();
365 
366 
367 
368 
369  // ===> Attribute timeSpan, which is optional
370 
371 
372 
377  bool isTimeSpanExists() const;
378 
379 
380 
386  Interval getTimeSpan() const;
387 
388 
389 
390 
398 
399 
400 
401 
405  void clearTimeSpan ();
406 
407 
408 
409 
410  // ===> Attribute startPhaseBin, which is optional
411 
412 
413 
418  bool isStartPhaseBinExists() const;
419 
420 
421 
427  std::vector<float > getStartPhaseBin() const;
428 
429 
430 
431 
438  void setStartPhaseBin (std::vector<float > startPhaseBin);
439 
440 
441 
442 
446  void clearStartPhaseBin ();
447 
448 
449 
450 
451  // ===> Attribute endPhaseBin, which is optional
452 
453 
454 
459  bool isEndPhaseBinExists() const;
460 
461 
462 
468  std::vector<float > getEndPhaseBin() const;
469 
470 
471 
472 
479  void setEndPhaseBin (std::vector<float > endPhaseBin);
480 
481 
482 
483 
487  void clearEndPhaseBin ();
488 
489 
490 
491 
492  // ===> Attribute dispersionMeasure, which is optional
493 
494 
495 
500  bool isDispersionMeasureExists() const;
501 
502 
503 
509  double getDispersionMeasure() const;
510 
511 
512 
513 
521 
522 
523 
524 
528  void clearDispersionMeasure ();
529 
530 
531 
532 
533  // ===> Attribute refFrequency, which is optional
534 
535 
536 
541  bool isRefFrequencyExists() const;
542 
543 
544 
550  Frequency getRefFrequency() const;
551 
552 
553 
554 
562 
563 
564 
565 
569  void clearRefFrequency ();
570 
571 
572 
574  // Extrinsic Table Attributes //
576 
578  // Links //
580 
581 
582 
583 
598 
599 
600 
601 
616 
617 
627 
628 #ifndef WITHOUT_ACS
629 
633  asdmIDL::PulsarRowIDL *toIDL() const;
634 
642  void toIDL(asdmIDL::PulsarRowIDL& x) const;
643 #endif
644 
645 #ifndef WITHOUT_ACS
646 
651  void setFromIDL (asdmIDL::PulsarRowIDL x) ;
652 #endif
653 
658  std::string toXML() const;
659 
666  void setFromXML (std::string rowDoc) ;
667 
670  // binary-deserialization material from an EndianIStream //
672 
673  std::map<std::string, PulsarAttributeFromBin> fromBinMethods;
674 void pulsarIdFromBin( EndianIStream& eis);
675 void refTimeFromBin( EndianIStream& eis);
677 void refPhaseFromBin( EndianIStream& eis);
678 void numBinFromBin( EndianIStream& eis);
679 
680 void numPolyFromBin( EndianIStream& eis);
681 void phasePolyFromBin( EndianIStream& eis);
682 void timeSpanFromBin( EndianIStream& eis);
687 
688 
696  static PulsarRow* fromBin(EndianIStream& eis, PulsarTable& table, const std::vector<std::string>& attributesSeq);
697 
704  void fromText(const std::string& attributeName, const std::string& t);
706 
707 private:
716 
717  // This method is used by the Table class when this row is added to the table.
718  void isAdded(bool added);
719 
720 
730 
749 
751  // Intrinsic Table Attributes //
753 
754 
755  // ===> Attribute pulsarId
756 
757 
758 
759  Tag pulsarId;
760 
761 
762 
763 
773  void setPulsarId (Tag pulsarId);
774 
775 
776 
777 
778  // ===> Attribute refTime
779 
780 
781 
783 
784 
785 
786 
787 
788 
789  // ===> Attribute refPulseFreq
790 
791 
792 
794 
795 
796 
797 
798 
799 
800  // ===> Attribute refPhase
801 
802 
803 
804  double refPhase;
805 
806 
807 
808 
809 
810 
811  // ===> Attribute numBin
812 
813 
814 
815  int numBin;
816 
817 
818 
819 
820 
821 
822  // ===> Attribute numPoly, which is optional
823 
824 
826 
827 
828  int numPoly;
829 
830 
831 
832 
833 
834 
835  // ===> Attribute phasePoly, which is optional
836 
837 
839 
840 
841  std::vector<double > phasePoly;
842 
843 
844 
845 
846 
847 
848  // ===> Attribute timeSpan, which is optional
849 
850 
852 
853 
855 
856 
857 
858 
859 
860 
861  // ===> Attribute startPhaseBin, which is optional
862 
863 
865 
866 
867  std::vector<float > startPhaseBin;
868 
869 
870 
871 
872 
873 
874  // ===> Attribute endPhaseBin, which is optional
875 
876 
878 
879 
880  std::vector<float > endPhaseBin;
881 
882 
883 
884 
885 
886 
887  // ===> Attribute dispersionMeasure, which is optional
888 
889 
891 
892 
894 
895 
896 
897 
898 
899 
900  // ===> Attribute refFrequency, which is optional
901 
902 
904 
905 
907 
908 
909 
910 
911 
913  // Extrinsic Table Attributes //
915 
917  // Links //
919 
920 
921 /*
923  // binary-deserialization material from an EndianIStream //
925  std::map<std::string, PulsarAttributeFromBin> fromBinMethods;
926 void pulsarIdFromBin( EndianIStream& eis);
927 void refTimeFromBin( EndianIStream& eis);
928 void refPulseFreqFromBin( EndianIStream& eis);
929 void refPhaseFromBin( EndianIStream& eis);
930 void numBinFromBin( EndianIStream& eis);
931 
932 void numPolyFromBin( EndianIStream& eis);
933 void phasePolyFromBin( EndianIStream& eis);
934 void timeSpanFromBin( EndianIStream& eis);
935 void startPhaseBinFromBin( EndianIStream& eis);
936 void endPhaseBinFromBin( EndianIStream& eis);
937 void dispersionMeasureFromBin( EndianIStream& eis);
938 void refFrequencyFromBin( EndianIStream& eis);
939 
940 */
941 
943  // text-deserialization material //
945  std::map<std::string, PulsarAttributeFromText> fromTextMethods;
946 
947 void pulsarIdFromText (const std::string & s);
948 
949 
950 void refTimeFromText (const std::string & s);
951 
952 
953 void refPulseFreqFromText (const std::string & s);
954 
955 
956 void refPhaseFromText (const std::string & s);
957 
958 
959 void numBinFromText (const std::string & s);
960 
961 
962 
963 void numPolyFromText (const std::string & s);
964 
965 
966 void phasePolyFromText (const std::string & s);
967 
968 
969 void timeSpanFromText (const std::string & s);
970 
971 
972 void startPhaseBinFromText (const std::string & s);
973 
974 
975 void endPhaseBinFromText (const std::string & s);
976 
977 
978 void dispersionMeasureFromText (const std::string & s);
979 
980 
981 void refFrequencyFromText (const std::string & s);
982 
983 
984 
989  void toBin(EndianOSStream& eoss);
990 
1000 };
1001 
1002 } // End namespace asdm
1003 
1004 #endif /* Pulsar_CLASS */
PulsarRow(PulsarTable &table)
Create a PulsarRow.
bool isTimeSpanExists() const
===&gt; Attribute timeSpan, which is optional
std::string toXML() const
Return this row in the form of an XML string.
void refTimeFromText(const std::string &s)
The Interval class implements an interval of time in units of nanoseconds.
Definition: Interval.h:58
void refTimeFromBin(EndianIStream &eis)
virtual ~PulsarRow()
friend class asdm::TableStreamReader&lt;PulsarTable, PulsarRow&gt;;
void numBinFromBin(EndianIStream &eis)
void clearTimeSpan()
Mark timeSpan, which is an optional field, as non-existent.
void endPhaseBinFromBin(EndianIStream &eis)
void refFrequencyFromText(const std::string &s)
Frequency getRefPulseFreq() const
===&gt; Attribute refPulseFreq
void clearRefFrequency()
Mark refFrequency, which is an optional field, as non-existent.
void setRefPhase(double refPhase)
Set refPhase with the specified double.
asdmIDL::PulsarRowIDL * toIDL() const
Return this row in the form of an IDL struct.
double refPhase
===&gt; Attribute refPhase
Definition: PulsarRow.h:804
void refPulseFreqFromText(const std::string &s)
void refPulseFreqFromBin(EndianIStream &eis)
void setRefFrequency(Frequency refFrequency)
Set refFrequency with the specified Frequency.
double getDispersionMeasure() const
Get dispersionMeasure, which is optional.
void phasePolyFromText(const std::string &s)
bool endPhaseBinExists
===&gt; Attribute endPhaseBin, which is optional
Definition: PulsarRow.h:877
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: PulsarRow.h:715
Interval getTimeSpan() const
Get timeSpan, which is optional.
bool isPhasePolyExists() const
===&gt; Attribute phasePoly, which is optional
void setEndPhaseBin(std::vector< float > endPhaseBin)
Set endPhaseBin with the specified std::vector&lt;float &gt;.
void endPhaseBinFromText(const std::string &s)
void dispersionMeasureFromBin(EndianIStream &eis)
void startPhaseBinFromText(const std::string &s)
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void refPhaseFromBin(EndianIStream &eis)
void clearEndPhaseBin()
Mark endPhaseBin, which is an optional field, as non-existent.
void clearNumPoly()
Mark numPoly, which is an optional field, as non-existent.
Frequency refFrequency
Definition: PulsarRow.h:906
bool isNumPolyExists() const
===&gt; Attribute numPoly, which is optional
bool timeSpanExists
===&gt; Attribute timeSpan, which is optional
Definition: PulsarRow.h:851
Frequency getRefFrequency() const
Get refFrequency, which is optional.
void setTimeSpan(Interval timeSpan)
Set timeSpan with the specified Interval.
std::vector< double > phasePoly
Definition: PulsarRow.h:841
void setDispersionMeasure(double dispersionMeasure)
Set dispersionMeasure with the specified double.
std::vector< float > getEndPhaseBin() const
Get endPhaseBin, which is optional.
PulsarTable & table
The table to which this row belongs.
Definition: PulsarRow.h:711
void setPulsarId(Tag pulsarId)
Set pulsarId with the specified Tag value.
void timeSpanFromText(const std::string &s)
The PulsarTable class is an Alma table.
Definition: PulsarTable.h:224
void pulsarIdFromText(const std::string &s)
Frequency refPulseFreq
===&gt; Attribute refPulseFreq
Definition: PulsarRow.h:793
void refFrequencyFromBin(EndianIStream &eis)
int getNumPoly() const
Get numPoly, which is optional.
std::vector< float > startPhaseBin
Definition: PulsarRow.h:867
void setNumPoly(int numPoly)
Set numPoly with the specified int.
void(PulsarRow::* PulsarAttributeFromBin)(EndianIStream &eis)
Definition: PulsarRow.h:113
std::vector< double > getPhasePoly() const
Get phasePoly, which is optional.
void clearDispersionMeasure()
Mark dispersionMeasure, which is an optional field, as non-existent.
void numPolyFromBin(EndianIStream &eis)
ArrayTime refTime
===&gt; Attribute refTime
Definition: PulsarRow.h:782
PulsarTable & getTable() const
Return the table to which this row belongs.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
Interval timeSpan
Definition: PulsarRow.h:854
void numPolyFromText(const std::string &s)
The PulsarRow class is a row of a PulsarTable.
Definition: PulsarRow.h:122
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void(PulsarRow::* PulsarAttributeFromText)(const std::string &s)
Definition: PulsarRow.h:114
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void setRefPulseFreq(Frequency refPulseFreq)
Set refPulseFreq with the specified Frequency.
double getRefPhase() const
===&gt; Attribute refPhase
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, PulsarAttributeFromBin > fromBinMethods
Definition: PulsarRow.h:925
bool numPolyExists
===&gt; Attribute numPoly, which is optional
Definition: PulsarRow.h:825
void startPhaseBinFromBin(EndianIStream &eis)
void setNumBin(int numBin)
Set numBin with the specified int.
bool isEndPhaseBinExists() const
===&gt; Attribute endPhaseBin, which is optional
void setStartPhaseBin(std::vector< float > startPhaseBin)
Set startPhaseBin with the specified std::vector&lt;float &gt;.
int numBin
===&gt; Attribute numBin
Definition: PulsarRow.h:815
bool equalByRequiredValue(PulsarRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
bool isDispersionMeasureExists() const
===&gt; Attribute dispersionMeasure, which is optional
bool isAdded() const
Has this row been added to its table ?
Extrinsic Table Attributes Links *bool compareNoAutoInc(ArrayTime refTime, Frequency refPulseFreq, double refPhase, int numBin)
Compare each mandatory attribute except the autoincrementable one of this PulsarRow with the correspo...
bool compareRequiredValue(ArrayTime refTime, Frequency refPulseFreq, double refPhase, int numBin)
Compare each mandatory value (i.e.
void pulsarIdFromBin(EndianIStream &eis)
void clearStartPhaseBin()
Mark startPhaseBin, which is an optional field, as non-existent.
std::vector< float > getStartPhaseBin() const
Get startPhaseBin, which is optional.
double dispersionMeasure
Definition: PulsarRow.h:893
bool startPhaseBinExists
===&gt; Attribute startPhaseBin, which is optional
Definition: PulsarRow.h:864
bool dispersionMeasureExists
===&gt; Attribute dispersionMeasure, which is optional
Definition: PulsarRow.h:890
void dispersionMeasureFromText(const std::string &s)
int getNumBin() const
===&gt; Attribute numBin
void refPhaseFromText(const std::string &s)
void setRefTime(ArrayTime refTime)
Set refTime with the specified ArrayTime.
void timeSpanFromBin(EndianIStream &eis)
void numBinFromText(const std::string &s)
bool phasePolyExists
===&gt; Attribute phasePoly, which is optional
Definition: PulsarRow.h:838
The Frequency class implements a quantity of frequency in hertz.
Definition: Frequency.h:53
bool isRefFrequencyExists() const
===&gt; Attribute refFrequency, which is optional
void setFromIDL(asdmIDL::PulsarRowIDL x)
Fill the values of this row from the IDL struct PulsarRowIDL.
*text deserialization material std::map< std::string, PulsarAttributeFromText > fromTextMethods
Definition: PulsarRow.h:945
ArrayTime getRefTime() const
===&gt; Attribute refTime
std::vector< float > endPhaseBin
Definition: PulsarRow.h:880
void phasePolyFromBin(EndianIStream &eis)
bool refFrequencyExists
===&gt; Attribute refFrequency, which is optional
Definition: PulsarRow.h:903
bool isStartPhaseBinExists() const
===&gt; Attribute startPhaseBin, which is optional
void setPhasePoly(std::vector< double > phasePoly)
Set phasePoly with the specified std::vector&lt;double &gt;.
void clearPhasePoly()
Mark phasePoly, which is an optional field, as non-existent.