casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalDataRow.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 CalDataRow.h
32  */
33 
34 #ifndef CalDataRow_CLASS
35 #define CalDataRow_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 #include <alma/ASDM/EntityRef.h>
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
75 
76 
77 
79 
80 
81 
82 
83 
84 
85 
86 
87 
89 
90 
91 
92 
93 
94 
95 
96 
97 
99 
100 
101 
102 
104 #include <alma/ASDM/NoSuchRow.h>
106 
108 //#include <alma/ASDM/TableStreamReader.h>
109 
110 /*\file CalData.h
111  \brief Generated from model's revision "-1", branch ""
112 */
113 
114 namespace asdm {
115 
116 //class asdm::CalDataTable;
117 
118 
119 
120 class CalDataRow;
122 typedef void (CalDataRow::*CalDataAttributeFromText) (const std::string& s);
123 
130 class CalDataRow {
131 friend class asdm::CalDataTable;
133 //friend class asdm::TableStreamReader<CalDataTable, CalDataRow>;
134 
135 public:
136 
137  virtual ~CalDataRow();
138 
142  CalDataTable &getTable() const;
143 
148  bool isAdded() const;
149 
151  // Intrinsic Table Attributes //
153 
154 
155  // ===> Attribute calDataId
156 
157 
158 
159 
160 
165  Tag getCalDataId() const;
166 
167 
168 
169 
170 
171 
172 
173 
174 
175  // ===> Attribute startTimeObserved
176 
177 
178 
179 
180 
186 
187 
188 
189 
198 
199 
200 
201 
202 
203 
204 
205  // ===> Attribute endTimeObserved
206 
207 
208 
209 
210 
216 
217 
218 
219 
228 
229 
230 
231 
232 
233 
234 
235  // ===> Attribute execBlockUID
236 
237 
238 
239 
240 
245  EntityRef getExecBlockUID() const;
246 
247 
248 
249 
258 
259 
260 
261 
262 
263 
264 
265  // ===> Attribute calDataType
266 
267 
268 
269 
270 
275  CalDataOriginMod::CalDataOrigin getCalDataType() const;
276 
277 
278 
279 
287  void setCalDataType (CalDataOriginMod::CalDataOrigin calDataType);
288 
289 
290 
291 
292 
293 
294 
295  // ===> Attribute calType
296 
297 
298 
299 
300 
305  CalTypeMod::CalType getCalType() const;
306 
307 
308 
309 
317  void setCalType (CalTypeMod::CalType calType);
318 
319 
320 
321 
322 
323 
324 
325  // ===> Attribute numScan
326 
327 
328 
329 
330 
335  int getNumScan() const;
336 
337 
338 
339 
347  void setNumScan (int numScan);
348 
349 
350 
351 
352 
353 
354 
355  // ===> Attribute scanSet
356 
357 
358 
359 
360 
365  std::vector<int > getScanSet() const;
366 
367 
368 
369 
377  void setScanSet (std::vector<int > scanSet);
378 
379 
380 
381 
382 
383 
384 
385  // ===> Attribute assocCalDataId, which is optional
386 
387 
388 
393  bool isAssocCalDataIdExists() const;
394 
395 
396 
402  Tag getAssocCalDataId() const;
403 
404 
405 
406 
414 
415 
416 
417 
421  void clearAssocCalDataId ();
422 
423 
424 
425 
426  // ===> Attribute assocCalNature, which is optional
427 
428 
429 
434  bool isAssocCalNatureExists() const;
435 
436 
437 
443  AssociatedCalNatureMod::AssociatedCalNature getAssocCalNature() const;
444 
445 
446 
447 
454  void setAssocCalNature (AssociatedCalNatureMod::AssociatedCalNature assocCalNature);
455 
456 
457 
458 
462  void clearAssocCalNature ();
463 
464 
465 
466 
467  // ===> Attribute fieldName, which is optional
468 
469 
470 
475  bool isFieldNameExists() const;
476 
477 
478 
484  std::vector<std::string > getFieldName() const;
485 
486 
487 
488 
495  void setFieldName (std::vector<std::string > fieldName);
496 
497 
498 
499 
503  void clearFieldName ();
504 
505 
506 
507 
508  // ===> Attribute sourceName, which is optional
509 
510 
511 
516  bool isSourceNameExists() const;
517 
518 
519 
525  std::vector<std::string > getSourceName() const;
526 
527 
528 
529 
536  void setSourceName (std::vector<std::string > sourceName);
537 
538 
539 
540 
544  void clearSourceName ();
545 
546 
547 
548 
549  // ===> Attribute sourceCode, which is optional
550 
551 
552 
557  bool isSourceCodeExists() const;
558 
559 
560 
566  std::vector<std::string > getSourceCode() const;
567 
568 
569 
570 
577  void setSourceCode (std::vector<std::string > sourceCode);
578 
579 
580 
581 
585  void clearSourceCode ();
586 
587 
588 
589 
590  // ===> Attribute scanIntent, which is optional
591 
592 
593 
598  bool isScanIntentExists() const;
599 
600 
601 
607  std::vector<ScanIntentMod::ScanIntent > getScanIntent() const;
608 
609 
610 
611 
618  void setScanIntent (std::vector<ScanIntentMod::ScanIntent > scanIntent);
619 
620 
621 
622 
626  void clearScanIntent ();
627 
628 
629 
631  // Extrinsic Table Attributes //
633 
635  // Links //
637 
638 
639 
640 
660  bool compareNoAutoInc(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, std::vector<int > scanSet);
661 
662 
663 
664 
684  bool compareRequiredValue(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, std::vector<int > scanSet);
685 
686 
696 
697 #ifndef WITHOUT_ACS
698 
702  asdmIDL::CalDataRowIDL *toIDL() const;
703 
711  void toIDL(asdmIDL::CalDataRowIDL& x) const;
712 #endif
713 
714 #ifndef WITHOUT_ACS
715 
720  void setFromIDL (asdmIDL::CalDataRowIDL x) ;
721 #endif
722 
727  std::string toXML() const;
728 
735  void setFromXML (std::string rowDoc) ;
736 
739  // binary-deserialization material from an EndianIStream //
741 
742  std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
743 void calDataIdFromBin( EndianIStream& eis);
748 void calTypeFromBin( EndianIStream& eis);
749 void numScanFromBin( EndianIStream& eis);
750 void scanSetFromBin( EndianIStream& eis);
751 
754 void fieldNameFromBin( EndianIStream& eis);
755 void sourceNameFromBin( EndianIStream& eis);
756 void sourceCodeFromBin( EndianIStream& eis);
757 void scanIntentFromBin( EndianIStream& eis);
758 
759 
767  static CalDataRow* fromBin(EndianIStream& eis, CalDataTable& table, const std::vector<std::string>& attributesSeq);
768 
775  void fromText(const std::string& attributeName, const std::string& t);
777 
778 private:
787 
788  // This method is used by the Table class when this row is added to the table.
789  void isAdded(bool added);
790 
791 
801 
820 
822  // Intrinsic Table Attributes //
824 
825 
826  // ===> Attribute calDataId
827 
828 
829 
830  Tag calDataId;
831 
832 
833 
834 
844  void setCalDataId (Tag calDataId);
845 
846 
847 
848 
849  // ===> Attribute startTimeObserved
850 
851 
852 
854 
855 
856 
857 
858 
859 
860  // ===> Attribute endTimeObserved
861 
862 
863 
865 
866 
867 
868 
869 
870 
871  // ===> Attribute execBlockUID
872 
873 
874 
876 
877 
878 
879 
880 
881 
882  // ===> Attribute calDataType
883 
884 
885 
886  CalDataOriginMod::CalDataOrigin calDataType;
887 
888 
889 
890 
891 
892 
893  // ===> Attribute calType
894 
895 
896 
897  CalTypeMod::CalType calType;
898 
899 
900 
901 
902 
903 
904  // ===> Attribute numScan
905 
906 
907 
908  int numScan;
909 
910 
911 
912 
913 
914 
915  // ===> Attribute scanSet
916 
917 
918 
919  std::vector<int > scanSet;
920 
921 
922 
923 
924 
925 
926  // ===> Attribute assocCalDataId, which is optional
927 
928 
930 
931 
933 
934 
935 
936 
937 
938 
939  // ===> Attribute assocCalNature, which is optional
940 
941 
943 
944 
945  AssociatedCalNatureMod::AssociatedCalNature assocCalNature;
946 
947 
948 
949 
950 
951 
952  // ===> Attribute fieldName, which is optional
953 
954 
956 
957 
958  std::vector<std::string > fieldName;
959 
960 
961 
962 
963 
964 
965  // ===> Attribute sourceName, which is optional
966 
967 
969 
970 
971  std::vector<std::string > sourceName;
972 
973 
974 
975 
976 
977 
978  // ===> Attribute sourceCode, which is optional
979 
980 
982 
983 
984  std::vector<std::string > sourceCode;
985 
986 
987 
988 
989 
990 
991  // ===> Attribute scanIntent, which is optional
992 
993 
995 
996 
997  std::vector<ScanIntentMod::ScanIntent > scanIntent;
998 
999 
1000 
1001 
1002 
1004  // Extrinsic Table Attributes //
1006 
1008  // Links //
1010 
1011 
1012 /*
1014  // binary-deserialization material from an EndianIStream //
1016  std::map<std::string, CalDataAttributeFromBin> fromBinMethods;
1017 void calDataIdFromBin( EndianIStream& eis);
1018 void startTimeObservedFromBin( EndianIStream& eis);
1019 void endTimeObservedFromBin( EndianIStream& eis);
1020 void execBlockUIDFromBin( EndianIStream& eis);
1021 void calDataTypeFromBin( EndianIStream& eis);
1022 void calTypeFromBin( EndianIStream& eis);
1023 void numScanFromBin( EndianIStream& eis);
1024 void scanSetFromBin( EndianIStream& eis);
1025 
1026 void assocCalDataIdFromBin( EndianIStream& eis);
1027 void assocCalNatureFromBin( EndianIStream& eis);
1028 void fieldNameFromBin( EndianIStream& eis);
1029 void sourceNameFromBin( EndianIStream& eis);
1030 void sourceCodeFromBin( EndianIStream& eis);
1031 void scanIntentFromBin( EndianIStream& eis);
1032 
1033 */
1034 
1036  // text-deserialization material //
1038  std::map<std::string, CalDataAttributeFromText> fromTextMethods;
1039 
1040 void calDataIdFromText (const std::string & s);
1041 
1042 
1043 void startTimeObservedFromText (const std::string & s);
1044 
1045 
1046 void endTimeObservedFromText (const std::string & s);
1047 
1048 
1049 
1050 void calDataTypeFromText (const std::string & s);
1051 
1052 
1053 void calTypeFromText (const std::string & s);
1054 
1055 
1056 void numScanFromText (const std::string & s);
1057 
1058 
1059 void scanSetFromText (const std::string & s);
1060 
1061 
1062 
1063 void assocCalDataIdFromText (const std::string & s);
1064 
1065 
1066 void assocCalNatureFromText (const std::string & s);
1067 
1068 
1069 void fieldNameFromText (const std::string & s);
1070 
1071 
1072 void sourceNameFromText (const std::string & s);
1073 
1074 
1075 void sourceCodeFromText (const std::string & s);
1076 
1077 
1078 void scanIntentFromText (const std::string & s);
1079 
1080 
1081 
1086  void toBin(EndianOSStream& eoss);
1087 
1097 };
1098 
1099 } // End namespace asdm
1100 
1101 #endif /* CalData_CLASS */
bool isScanIntentExists() const
===&gt; Attribute scanIntent, which is optional
void(CalDataRow::* CalDataAttributeFromBin)(EndianIStream &eis)
Definition: CalDataRow.h:121
CalTypeMod::CalType calType
===&gt; Attribute calType
Definition: CalDataRow.h:897
bool sourceCodeExists
===&gt; Attribute sourceCode, which is optional
Definition: CalDataRow.h:981
void endTimeObservedFromText(const std::string &s)
bool equalByRequiredValue(CalDataRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
bool scanIntentExists
===&gt; Attribute scanIntent, which is optional
Definition: CalDataRow.h:994
void endTimeObservedFromBin(EndianIStream &eis)
std::vector< int > getScanSet() const
===&gt; Attribute scanSet
void scanIntentFromBin(EndianIStream &eis)
std::vector< std::string > getFieldName() const
Get fieldName, which is optional.
void(CalDataRow::* CalDataAttributeFromText)(const std::string &s)
Definition: CalDataRow.h:122
bool assocCalDataIdExists
===&gt; Attribute assocCalDataId, which is optional
Definition: CalDataRow.h:929
virtual ~CalDataRow()
friend class asdm::TableStreamReader&lt;CalDataTable, CalDataRow&gt;;
void clearAssocCalDataId()
Mark assocCalDataId, which is an optional field, as non-existent.
void fieldNameFromBin(EndianIStream &eis)
std::vector< ScanIntentMod::ScanIntent > getScanIntent() const
Get scanIntent, which is optional.
Extrinsic Table Attributes Links *bool compareNoAutoInc(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, std::vector< int > scanSet)
Compare each mandatory attribute except the autoincrementable one of this CalDataRow with the corresp...
void clearScanIntent()
Mark scanIntent, which is an optional field, as non-existent.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
CalDataOriginMod::CalDataOrigin calDataType
===&gt; Attribute calDataType
Definition: CalDataRow.h:886
std::vector< std::string > getSourceName() const
Get sourceName, which is optional.
bool isAdded() const
Has this row been added to its table ?
void sourceCodeFromText(const std::string &s)
void setStartTimeObserved(ArrayTime startTimeObserved)
Set startTimeObserved with the specified ArrayTime.
void calTypeFromText(const std::string &s)
bool sourceNameExists
===&gt; Attribute sourceName, which is optional
Definition: CalDataRow.h:968
void numScanFromText(const std::string &s)
bool fieldNameExists
===&gt; Attribute fieldName, which is optional
Definition: CalDataRow.h:955
void setFieldName(std::vector< std::string > fieldName)
Set fieldName with the specified std::vector&lt;std::string &gt;.
void calDataTypeFromBin(EndianIStream &eis)
bool compareRequiredValue(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, std::vector< int > scanSet)
Compare each mandatory value (i.e.
void fieldNameFromText(const std::string &s)
void setCalType(CalTypeMod::CalType calType)
Set calType with the specified CalTypeMod::CalType.
void setAssocCalDataId(Tag assocCalDataId)
Set assocCalDataId with the specified Tag.
void startTimeObservedFromBin(EndianIStream &eis)
void clearFieldName()
Mark fieldName, which is an optional field, as non-existent.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: CalDataRow.h:786
void clearSourceCode()
Mark sourceCode, which is an optional field, as non-existent.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, CalDataAttributeFromBin > fromBinMethods
Definition: CalDataRow.h:1016
void sourceNameFromBin(EndianIStream &eis)
void assocCalNatureFromText(const std::string &s)
The EntityRef class is an identification of a persistant entity in the ALMA archive.
Definition: EntityRef.h:58
void assocCalNatureFromBin(EndianIStream &eis)
void setEndTimeObserved(ArrayTime endTimeObserved)
Set endTimeObserved with the specified ArrayTime.
AssociatedCalNatureMod::AssociatedCalNature getAssocCalNature() const
Get assocCalNature, which is optional.
CalDataTable & table
The table to which this row belongs.
Definition: CalDataRow.h:782
void setScanIntent(std::vector< ScanIntentMod::ScanIntent > scanIntent)
Set scanIntent with the specified std::vector&lt;ScanIntentMod::ScanIntent &gt;.
void setExecBlockUID(EntityRef execBlockUID)
Set execBlockUID with the specified EntityRef.
CalDataRow(CalDataTable &table)
Create a CalDataRow.
ArrayTime endTimeObserved
===&gt; Attribute endTimeObserved
Definition: CalDataRow.h:864
void setScanSet(std::vector< int > scanSet)
Set scanSet with the specified std::vector&lt;int &gt;.
void calDataTypeFromText(const std::string &s)
std::vector< std::string > getSourceCode() const
Get sourceCode, which is optional.
bool assocCalNatureExists
===&gt; Attribute assocCalNature, which is optional
Definition: CalDataRow.h:942
void startTimeObservedFromText(const std::string &s)
CalDataOriginMod::CalDataOrigin getCalDataType() const
===&gt; Attribute calDataType
AssociatedCalNatureMod::AssociatedCalNature assocCalNature
Definition: CalDataRow.h:945
void scanSetFromText(const std::string &s)
void calTypeFromBin(EndianIStream &eis)
void setFromIDL(asdmIDL::CalDataRowIDL x)
Fill the values of this row from the IDL struct CalDataRowIDL.
ArrayTime getStartTimeObserved() const
===&gt; Attribute startTimeObserved
void numScanFromBin(EndianIStream &eis)
void clearAssocCalNature()
Mark assocCalNature, which is an optional field, as non-existent.
ArrayTime getEndTimeObserved() const
===&gt; Attribute endTimeObserved
bool isSourceNameExists() const
===&gt; Attribute sourceName, which is optional
void scanSetFromBin(EndianIStream &eis)
void setSourceCode(std::vector< std::string > sourceCode)
Set sourceCode with the specified std::vector&lt;std::string &gt;.
bool isSourceCodeExists() const
===&gt; Attribute sourceCode, which is optional
bool isAssocCalDataIdExists() const
===&gt; Attribute assocCalDataId, which is optional
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
std::vector< ScanIntentMod::ScanIntent > scanIntent
Definition: CalDataRow.h:997
void clearSourceName()
Mark sourceName, which is an optional field, as non-existent.
std::vector< int > scanSet
===&gt; Attribute scanSet
Definition: CalDataRow.h:919
void calDataIdFromText(const std::string &s)
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void setAssocCalNature(AssociatedCalNatureMod::AssociatedCalNature assocCalNature)
Set assocCalNature with the specified AssociatedCalNatureMod::AssociatedCalNature.
bool isAssocCalNatureExists() const
===&gt; Attribute assocCalNature, which is optional
void setSourceName(std::vector< std::string > sourceName)
Set sourceName with the specified std::vector&lt;std::string &gt;.
bool isFieldNameExists() const
===&gt; Attribute fieldName, which is optional
void sourceCodeFromBin(EndianIStream &eis)
EntityRef execBlockUID
===&gt; Attribute execBlockUID
Definition: CalDataRow.h:875
CalTypeMod::CalType getCalType() const
===&gt; Attribute calType
void assocCalDataIdFromBin(EndianIStream &eis)
void assocCalDataIdFromText(const std::string &s)
CalDataTable & getTable() const
Return the table to which this row belongs.
ArrayTime startTimeObserved
===&gt; Attribute startTimeObserved
Definition: CalDataRow.h:853
std::vector< std::string > fieldName
Definition: CalDataRow.h:958
int numScan
===&gt; Attribute numScan
Definition: CalDataRow.h:908
asdmIDL::CalDataRowIDL * toIDL() const
Return this row in the form of an IDL struct.
The CalDataTable class is an Alma table.
Definition: CalDataTable.h:245
The CalDataRow class is a row of a CalDataTable.
Definition: CalDataRow.h:130
*text deserialization material std::map< std::string, CalDataAttributeFromText > fromTextMethods
Definition: CalDataRow.h:1038
void setCalDataId(Tag calDataId)
Set calDataId with the specified Tag value.
EntityRef getExecBlockUID() const
===&gt; Attribute execBlockUID
void calDataIdFromBin(EndianIStream &eis)
void setNumScan(int numScan)
Set numScan with the specified int.
std::vector< std::string > sourceCode
Definition: CalDataRow.h:984
std::vector< std::string > sourceName
Definition: CalDataRow.h:971
void sourceNameFromText(const std::string &s)
Tag getAssocCalDataId() const
Get assocCalDataId, which is optional.
std::string toXML() const
Return this row in the form of an XML string.
int getNumScan() const
===&gt; Attribute numScan
void setCalDataType(CalDataOriginMod::CalDataOrigin calDataType)
Set calDataType with the specified CalDataOriginMod::CalDataOrigin.
void scanIntentFromText(const std::string &s)
void execBlockUIDFromBin(EndianIStream &eis)