casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SubscanRow.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 SubscanRow.h
32  */
33 
34 #ifndef SubscanRow_CLASS
35 #define SubscanRow_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/Tag.h>
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
73 
74 
75 
77 
78 
79 
80 
81 
82 
83 
85 
86 
87 
88 
90 #include <alma/ASDM/NoSuchRow.h>
92 
94 //#include <alma/ASDM/TableStreamReader.h>
95 
96 /*\file Subscan.h
97  \brief Generated from model's revision "-1", branch ""
98 */
99 
100 namespace asdm {
101 
102 //class asdm::SubscanTable;
103 
104 
105 // class asdm::ExecBlockRow;
106 class ExecBlockRow;
107 
108 
109 class SubscanRow;
111 typedef void (SubscanRow::*SubscanAttributeFromText) (const std::string& s);
112 
119 class SubscanRow {
120 friend class asdm::SubscanTable;
122 //friend class asdm::TableStreamReader<SubscanTable, SubscanRow>;
123 
124 public:
125 
126  virtual ~SubscanRow();
127 
131  SubscanTable &getTable() const;
132 
137  bool isAdded() const;
138 
140  // Intrinsic Table Attributes //
142 
143 
144  // ===> Attribute scanNumber
145 
146 
147 
148 
149 
154  int getScanNumber() const;
155 
156 
157 
158 
168  void setScanNumber (int scanNumber);
169 
170 
171 
172 
173 
174 
175 
176  // ===> Attribute subscanNumber
177 
178 
179 
180 
181 
186  int getSubscanNumber() const;
187 
188 
189 
190 
200  void setSubscanNumber (int subscanNumber);
201 
202 
203 
204 
205 
206 
207 
208  // ===> Attribute startTime
209 
210 
211 
212 
213 
218  ArrayTime getStartTime() const;
219 
220 
221 
222 
231 
232 
233 
234 
235 
236 
237 
238  // ===> Attribute endTime
239 
240 
241 
242 
243 
248  ArrayTime getEndTime() const;
249 
250 
251 
252 
261 
262 
263 
264 
265 
266 
267 
268  // ===> Attribute fieldName
269 
270 
271 
272 
273 
278  std::string getFieldName() const;
279 
280 
281 
282 
290  void setFieldName (std::string fieldName);
291 
292 
293 
294 
295 
296 
297 
298  // ===> Attribute subscanIntent
299 
300 
301 
302 
303 
308  SubscanIntentMod::SubscanIntent getSubscanIntent() const;
309 
310 
311 
312 
320  void setSubscanIntent (SubscanIntentMod::SubscanIntent subscanIntent);
321 
322 
323 
324 
325 
326 
327 
328  // ===> Attribute subscanMode, which is optional
329 
330 
331 
336  bool isSubscanModeExists() const;
337 
338 
339 
345  SwitchingModeMod::SwitchingMode getSubscanMode() const;
346 
347 
348 
349 
356  void setSubscanMode (SwitchingModeMod::SwitchingMode subscanMode);
357 
358 
359 
360 
364  void clearSubscanMode ();
365 
366 
367 
368 
369  // ===> Attribute numIntegration
370 
371 
372 
373 
374 
379  int getNumIntegration() const;
380 
381 
382 
383 
392 
393 
394 
395 
396 
397 
398 
399  // ===> Attribute numSubintegration
400 
401 
402 
403 
404 
409  std::vector<int > getNumSubintegration() const;
410 
411 
412 
413 
421  void setNumSubintegration (std::vector<int > numSubintegration);
422 
423 
424 
425 
426 
427 
428 
429  // ===> Attribute correlatorCalibration, which is optional
430 
431 
432 
437  bool isCorrelatorCalibrationExists() const;
438 
439 
440 
446  CorrelatorCalibrationMod::CorrelatorCalibration getCorrelatorCalibration() const;
447 
448 
449 
450 
457  void setCorrelatorCalibration (CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration);
458 
459 
460 
461 
466 
467 
468 
470  // Extrinsic Table Attributes //
472 
473 
474  // ===> Attribute execBlockId
475 
476 
477 
478 
479 
484  Tag getExecBlockId() const;
485 
486 
487 
488 
498  void setExecBlockId (Tag execBlockId);
499 
500 
501 
502 
503 
504 
506  // Links //
508 
509 
510 
511 
512 
520 
521 
522 
523 
524 
525 
526 
550  bool compareNoAutoInc(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, std::string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, std::vector<int > numSubintegration);
551 
552 
553 
554 
572  bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, std::string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, std::vector<int > numSubintegration);
573 
574 
584 
585 #ifndef WITHOUT_ACS
586 
590  asdmIDL::SubscanRowIDL *toIDL() const;
591 
599  void toIDL(asdmIDL::SubscanRowIDL& x) const;
600 #endif
601 
602 #ifndef WITHOUT_ACS
603 
608  void setFromIDL (asdmIDL::SubscanRowIDL x) ;
609 #endif
610 
615  std::string toXML() const;
616 
623  void setFromXML (std::string rowDoc) ;
624 
627  // binary-deserialization material from an EndianIStream //
629 
630  std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
632 void scanNumberFromBin( EndianIStream& eis);
634 void startTimeFromBin( EndianIStream& eis);
635 void endTimeFromBin( EndianIStream& eis);
636 void fieldNameFromBin( EndianIStream& eis);
640 
643 
644 
652  static SubscanRow* fromBin(EndianIStream& eis, SubscanTable& table, const std::vector<std::string>& attributesSeq);
653 
660  void fromText(const std::string& attributeName, const std::string& t);
662 
663 private:
672 
673  // This method is used by the Table class when this row is added to the table.
674  void isAdded(bool added);
675 
676 
686 
705 
707  // Intrinsic Table Attributes //
709 
710 
711  // ===> Attribute scanNumber
712 
713 
714 
715  int scanNumber;
716 
717 
718 
719 
720 
721 
722  // ===> Attribute subscanNumber
723 
724 
725 
727 
728 
729 
730 
731 
732 
733  // ===> Attribute startTime
734 
735 
736 
738 
739 
740 
741 
742 
743 
744  // ===> Attribute endTime
745 
746 
747 
749 
750 
751 
752 
753 
754 
755  // ===> Attribute fieldName
756 
757 
758 
759  std::string fieldName;
760 
761 
762 
763 
764 
765 
766  // ===> Attribute subscanIntent
767 
768 
769 
770  SubscanIntentMod::SubscanIntent subscanIntent;
771 
772 
773 
774 
775 
776 
777  // ===> Attribute subscanMode, which is optional
778 
779 
781 
782 
783  SwitchingModeMod::SwitchingMode subscanMode;
784 
785 
786 
787 
788 
789 
790  // ===> Attribute numIntegration
791 
792 
793 
795 
796 
797 
798 
799 
800 
801  // ===> Attribute numSubintegration
802 
803 
804 
805  std::vector<int > numSubintegration;
806 
807 
808 
809 
810 
811 
812  // ===> Attribute correlatorCalibration, which is optional
813 
814 
816 
817 
818  CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration;
819 
820 
821 
822 
823 
825  // Extrinsic Table Attributes //
827 
828 
829  // ===> Attribute execBlockId
830 
831 
832 
833  Tag execBlockId;
834 
835 
836 
837 
838 
840  // Links //
842 
843 
844 
845 
846 
847 
848 
849 
850 
851 /*
853  // binary-deserialization material from an EndianIStream //
855  std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
856 void execBlockIdFromBin( EndianIStream& eis);
857 void scanNumberFromBin( EndianIStream& eis);
858 void subscanNumberFromBin( EndianIStream& eis);
859 void startTimeFromBin( EndianIStream& eis);
860 void endTimeFromBin( EndianIStream& eis);
861 void fieldNameFromBin( EndianIStream& eis);
862 void subscanIntentFromBin( EndianIStream& eis);
863 void numIntegrationFromBin( EndianIStream& eis);
864 void numSubintegrationFromBin( EndianIStream& eis);
865 
866 void subscanModeFromBin( EndianIStream& eis);
867 void correlatorCalibrationFromBin( EndianIStream& eis);
868 
869 */
870 
872  // text-deserialization material //
874  std::map<std::string, SubscanAttributeFromText> fromTextMethods;
875 
876 void execBlockIdFromText (const std::string & s);
877 
878 
879 void scanNumberFromText (const std::string & s);
880 
881 
882 void subscanNumberFromText (const std::string & s);
883 
884 
885 void startTimeFromText (const std::string & s);
886 
887 
888 void endTimeFromText (const std::string & s);
889 
890 
891 void fieldNameFromText (const std::string & s);
892 
893 
894 void subscanIntentFromText (const std::string & s);
895 
896 
897 void numIntegrationFromText (const std::string & s);
898 
899 
900 void numSubintegrationFromText (const std::string & s);
901 
902 
903 
904 void subscanModeFromText (const std::string & s);
905 
906 
907 void correlatorCalibrationFromText (const std::string & s);
908 
909 
910 
915  void toBin(EndianOSStream& eoss);
916 
926 };
927 
928 } // End namespace asdm
929 
930 #endif /* Subscan_CLASS */
int getSubscanNumber() const
===&gt; Attribute subscanNumber
void correlatorCalibrationFromBin(EndianIStream &eis)
bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, std::string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, std::vector< int > numSubintegration)
Compare each mandatory value (i.e.
SubscanIntentMod::SubscanIntent getSubscanIntent() const
===&gt; Attribute subscanIntent
void execBlockIdFromBin(EndianIStream &eis)
Links *binary deserialization material from an EndianIStream std::map< std::string, SubscanAttributeFromBin > fromBinMethods
Definition: SubscanRow.h:855
std::vector< int > getNumSubintegration() const
===&gt; Attribute numSubintegration
void setNumIntegration(int numIntegration)
Set numIntegration with the specified int.
void endTimeFromBin(EndianIStream &eis)
void setEndTime(ArrayTime endTime)
Set endTime with the specified ArrayTime.
std::vector< int > numSubintegration
===&gt; Attribute numSubintegration
Definition: SubscanRow.h:805
ArrayTime getEndTime() const
===&gt; Attribute endTime
bool isCorrelatorCalibrationExists() const
===&gt; Attribute correlatorCalibration, which is optional
void subscanIntentFromText(const std::string &s)
void clearCorrelatorCalibration()
Mark correlatorCalibration, which is an optional field, as non-existent.
void setScanNumber(int scanNumber)
Set scanNumber with the specified int.
ArrayTime startTime
===&gt; Attribute startTime
Definition: SubscanRow.h:737
bool subscanModeExists
===&gt; Attribute subscanMode, which is optional
Definition: SubscanRow.h:780
The SubscanRow class is a row of a SubscanTable.
Definition: SubscanRow.h:119
Links *ExecBlockRow * getExecBlockUsingExecBlockId()
execBlockId pointer to the row in the ExecBlock table having ExecBlock.execBlockId == execBlockId ...
void numIntegrationFromBin(EndianIStream &eis)
void startTimeFromBin(EndianIStream &eis)
void setExecBlockId(Tag execBlockId)
Set execBlockId with the specified Tag.
void setSubscanIntent(SubscanIntentMod::SubscanIntent subscanIntent)
Set subscanIntent with the specified SubscanIntentMod::SubscanIntent.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: SubscanRow.h:671
The ExecBlockRow class is a row of a ExecBlockTable.
Definition: ExecBlockRow.h:163
ArrayTime getStartTime() const
===&gt; Attribute startTime
void numSubintegrationFromText(const std::string &s)
void(SubscanRow::* SubscanAttributeFromBin)(EndianIStream &eis)
Definition: SubscanRow.h:110
void(SubscanRow::* SubscanAttributeFromText)(const std::string &s)
Definition: SubscanRow.h:111
SwitchingModeMod::SwitchingMode getSubscanMode() const
Get subscanMode, which is optional.
int getNumIntegration() const
===&gt; Attribute numIntegration
SubscanIntentMod::SubscanIntent subscanIntent
===&gt; Attribute subscanIntent
Definition: SubscanRow.h:770
SubscanRow(SubscanTable &table)
Create a SubscanRow.
void startTimeFromText(const std::string &s)
bool isAdded() const
Has this row been added to its table ?
std::string fieldName
===&gt; Attribute fieldName
Definition: SubscanRow.h:759
void fieldNameFromText(const std::string &s)
virtual ~SubscanRow()
friend class asdm::TableStreamReader&lt;SubscanTable, SubscanRow&gt;;
void subscanModeFromBin(EndianIStream &eis)
bool correlatorCalibrationExists
===&gt; Attribute correlatorCalibration, which is optional
Definition: SubscanRow.h:815
void execBlockIdFromText(const std::string &s)
CorrelatorCalibrationMod::CorrelatorCalibration getCorrelatorCalibration() const
Get correlatorCalibration, which is optional.
SubscanTable & getTable() const
Return the table to which this row belongs.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void fieldNameFromBin(EndianIStream &eis)
void clearSubscanMode()
Mark subscanMode, which is an optional field, as non-existent.
void setStartTime(ArrayTime startTime)
Set startTime with the specified ArrayTime.
int numIntegration
===&gt; Attribute numIntegration
Definition: SubscanRow.h:794
void correlatorCalibrationFromText(const std::string &s)
void setCorrelatorCalibration(CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration)
Set correlatorCalibration with the specified CorrelatorCalibrationMod::CorrelatorCalibration.
void setFieldName(std::string fieldName)
Set fieldName with the specified std::string.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
void endTimeFromText(const std::string &s)
void setNumSubintegration(std::vector< int > numSubintegration)
Set numSubintegration with the specified std::vector&lt;int &gt;.
SwitchingModeMod::SwitchingMode subscanMode
Definition: SubscanRow.h:783
void setSubscanMode(SwitchingModeMod::SwitchingMode subscanMode)
Set subscanMode with the specified SwitchingModeMod::SwitchingMode.
void subscanNumberFromBin(EndianIStream &eis)
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration
Definition: SubscanRow.h:818
int subscanNumber
===&gt; Attribute subscanNumber
Definition: SubscanRow.h:726
bool isSubscanModeExists() const
===&gt; Attribute subscanMode, which is optional
ArrayTime endTime
===&gt; Attribute endTime
Definition: SubscanRow.h:748
bool compareNoAutoInc(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, std::string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, std::vector< int > numSubintegration)
Compare each mandatory attribute except the autoincrementable one of this SubscanRow with the corresp...
void numSubintegrationFromBin(EndianIStream &eis)
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
asdmIDL::SubscanRowIDL * toIDL() const
Return this row in the form of an IDL struct.
std::string toXML() const
Return this row in the form of an XML string.
void subscanNumberFromText(const std::string &s)
SubscanTable & table
The table to which this row belongs.
Definition: SubscanRow.h:667
The SubscanTable class is an Alma table.
Definition: SubscanTable.h:214
void setFromIDL(asdmIDL::SubscanRowIDL x)
Fill the values of this row from the IDL struct SubscanRowIDL.
*text deserialization material std::map< std::string, SubscanAttributeFromText > fromTextMethods
Definition: SubscanRow.h:874
void numIntegrationFromText(const std::string &s)
bool equalByRequiredValue(SubscanRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void scanNumberFromText(const std::string &s)
std::string getFieldName() const
===&gt; Attribute fieldName
void scanNumberFromBin(EndianIStream &eis)
void subscanIntentFromBin(EndianIStream &eis)
void subscanModeFromText(const std::string &s)
void setSubscanNumber(int subscanNumber)
Set subscanNumber with the specified int.