casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FieldRow.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 FieldRow.h
32  */
33 
34 #ifndef FieldRow_CLASS
35 #define FieldRow_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/Angle.h>
52 
53 
54 
55 #include <alma/ASDM/ArrayTime.h>
56 
57 
58 
59 #include <alma/ASDM/Tag.h>
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
83 
84 
85 
86 
87 
88 
89 
90 
92 #include <alma/ASDM/NoSuchRow.h>
94 
96 //#include <alma/ASDM/TableStreamReader.h>
97 
98 /*\file Field.h
99  \brief Generated from model's revision "-1", branch ""
100 */
101 
102 namespace asdm {
103 
104 //class asdm::FieldTable;
105 
106 
107 // class asdm::EphemerisRow;
108 class EphemerisRow;
109 
110 // class asdm::SourceRow;
111 class SourceRow;
112 
113 // class asdm::FieldRow;
114 class FieldRow;
115 
116 
117 class FieldRow;
119 typedef void (FieldRow::*FieldAttributeFromText) (const std::string& s);
120 
127 class FieldRow {
128 friend class asdm::FieldTable;
130 //friend class asdm::TableStreamReader<FieldTable, FieldRow>;
131 
132 public:
133 
134  virtual ~FieldRow();
135 
139  FieldTable &getTable() const;
140 
145  bool isAdded() const;
146 
148  // Intrinsic Table Attributes //
150 
151 
152  // ===> Attribute fieldId
153 
154 
155 
156 
157 
162  Tag getFieldId() const;
163 
164 
165 
166 
167 
168 
169 
170 
171 
172  // ===> Attribute fieldName
173 
174 
175 
176 
177 
182  std::string getFieldName() const;
183 
184 
185 
186 
194  void setFieldName (std::string fieldName);
195 
196 
197 
198 
199 
200 
201 
202  // ===> Attribute numPoly
203 
204 
205 
206 
207 
212  int getNumPoly() const;
213 
214 
215 
216 
224  void setNumPoly (int numPoly);
225 
226 
227 
228 
229 
230 
231 
232  // ===> Attribute delayDir
233 
234 
235 
236 
237 
242  std::vector<std::vector<Angle > > getDelayDir() const;
243 
244 
245 
246 
254  void setDelayDir (std::vector<std::vector<Angle > > delayDir);
255 
256 
257 
258 
259 
260 
261 
262  // ===> Attribute phaseDir
263 
264 
265 
266 
267 
272  std::vector<std::vector<Angle > > getPhaseDir() const;
273 
274 
275 
276 
284  void setPhaseDir (std::vector<std::vector<Angle > > phaseDir);
285 
286 
287 
288 
289 
290 
291 
292  // ===> Attribute referenceDir
293 
294 
295 
296 
297 
302  std::vector<std::vector<Angle > > getReferenceDir() const;
303 
304 
305 
306 
314  void setReferenceDir (std::vector<std::vector<Angle > > referenceDir);
315 
316 
317 
318 
319 
320 
321 
322  // ===> Attribute time, which is optional
323 
324 
325 
330  bool isTimeExists() const;
331 
332 
333 
339  ArrayTime getTime() const;
340 
341 
342 
343 
350  void setTime (ArrayTime time);
351 
352 
353 
354 
358  void clearTime ();
359 
360 
361 
362 
363  // ===> Attribute code, which is optional
364 
365 
366 
371  bool isCodeExists() const;
372 
373 
374 
380  std::string getCode() const;
381 
382 
383 
384 
391  void setCode (std::string code);
392 
393 
394 
395 
399  void clearCode ();
400 
401 
402 
403 
404  // ===> Attribute directionCode, which is optional
405 
406 
407 
412  bool isDirectionCodeExists() const;
413 
414 
415 
421  DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const;
422 
423 
424 
425 
432  void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode);
433 
434 
435 
436 
440  void clearDirectionCode ();
441 
442 
443 
444 
445  // ===> Attribute directionEquinox, which is optional
446 
447 
448 
453  bool isDirectionEquinoxExists() const;
454 
455 
456 
463 
464 
465 
466 
474 
475 
476 
477 
481  void clearDirectionEquinox ();
482 
483 
484 
485 
486  // ===> Attribute assocNature, which is optional
487 
488 
489 
494  bool isAssocNatureExists() const;
495 
496 
497 
503  std::string getAssocNature() const;
504 
505 
506 
507 
514  void setAssocNature (std::string assocNature);
515 
516 
517 
518 
522  void clearAssocNature ();
523 
524 
525 
527  // Extrinsic Table Attributes //
529 
530 
531  // ===> Attribute assocFieldId, which is optional
532 
533 
534 
539  bool isAssocFieldIdExists() const;
540 
541 
542 
548  Tag getAssocFieldId() const;
549 
550 
551 
552 
560 
561 
562 
563 
567  void clearAssocFieldId ();
568 
569 
570 
571 
572  // ===> Attribute ephemerisId, which is optional
573 
574 
575 
580  bool isEphemerisIdExists() const;
581 
582 
583 
589  int getEphemerisId() const;
590 
591 
592 
593 
600  void setEphemerisId (int ephemerisId);
601 
602 
603 
604 
608  void clearEphemerisId ();
609 
610 
611 
612 
613  // ===> Attribute sourceId, which is optional
614 
615 
616 
621  bool isSourceIdExists() const;
622 
623 
624 
630  int getSourceId() const;
631 
632 
633 
634 
641  void setSourceId (int sourceId);
642 
643 
644 
645 
649  void clearSourceId ();
650 
651 
652 
654  // Links //
656 
657 
658 
659 
660 
661  // ===> Slice link from a row of Field table to a collection of row of Ephemeris table.
662 
668  std::vector <EphemerisRow *> getEphemeriss();
669 
670 
671 
672 
673 
674 
675 
676 
677 
678  // ===> Slice link from a row of Field table to a collection of row of Source table.
679 
685  std::vector <SourceRow *> getSources();
686 
687 
688 
689 
690 
691 
692 
693 
694 
704 
705 
706 
707 
708 
709 
710 
726  bool compareNoAutoInc(std::string fieldName, int numPoly, std::vector<std::vector<Angle > > delayDir, std::vector<std::vector<Angle > > phaseDir, std::vector<std::vector<Angle > > referenceDir);
727 
728 
729 
730 
746  bool compareRequiredValue(std::string fieldName, int numPoly, std::vector<std::vector<Angle > > delayDir, std::vector<std::vector<Angle > > phaseDir, std::vector<std::vector<Angle > > referenceDir);
747 
748 
757  bool equalByRequiredValue(FieldRow* x) ;
758 
759 #ifndef WITHOUT_ACS
760 
764  asdmIDL::FieldRowIDL *toIDL() const;
765 
773  void toIDL(asdmIDL::FieldRowIDL& x) const;
774 #endif
775 
776 #ifndef WITHOUT_ACS
777 
782  void setFromIDL (asdmIDL::FieldRowIDL x) ;
783 #endif
784 
789  std::string toXML() const;
790 
797  void setFromXML (std::string rowDoc) ;
798 
801  // binary-deserialization material from an EndianIStream //
803 
804  std::map<std::string, FieldAttributeFromBin> fromBinMethods;
805 void fieldIdFromBin( EndianIStream& eis);
806 void fieldNameFromBin( EndianIStream& eis);
807 void numPolyFromBin( EndianIStream& eis);
808 void delayDirFromBin( EndianIStream& eis);
809 void phaseDirFromBin( EndianIStream& eis);
811 
812 void timeFromBin( EndianIStream& eis);
813 void codeFromBin( EndianIStream& eis);
818 void sourceIdFromBin( EndianIStream& eis);
820 
821 
829  static FieldRow* fromBin(EndianIStream& eis, FieldTable& table, const std::vector<std::string>& attributesSeq);
830 
837  void fromText(const std::string& attributeName, const std::string& t);
839 
840 private:
849 
850  // This method is used by the Table class when this row is added to the table.
851  void isAdded(bool added);
852 
853 
863 
882 
884  // Intrinsic Table Attributes //
886 
887 
888  // ===> Attribute fieldId
889 
890 
891 
892  Tag fieldId;
893 
894 
895 
896 
906  void setFieldId (Tag fieldId);
907 
908 
909 
910 
911  // ===> Attribute fieldName
912 
913 
914 
915  std::string fieldName;
916 
917 
918 
919 
920 
921 
922  // ===> Attribute numPoly
923 
924 
925 
926  int numPoly;
927 
928 
929 
930 
931 
932 
933  // ===> Attribute delayDir
934 
935 
936 
937  std::vector<std::vector<Angle > > delayDir;
938 
939 
940 
941 
942 
943 
944  // ===> Attribute phaseDir
945 
946 
947 
948  std::vector<std::vector<Angle > > phaseDir;
949 
950 
951 
952 
953 
954 
955  // ===> Attribute referenceDir
956 
957 
958 
959  std::vector<std::vector<Angle > > referenceDir;
960 
961 
962 
963 
964 
965 
966  // ===> Attribute time, which is optional
967 
968 
970 
971 
973 
974 
975 
976 
977 
978 
979  // ===> Attribute code, which is optional
980 
981 
983 
984 
985  std::string code;
986 
987 
988 
989 
990 
991 
992  // ===> Attribute directionCode, which is optional
993 
994 
996 
997 
998  DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
999 
1000 
1001 
1002 
1003 
1004 
1005  // ===> Attribute directionEquinox, which is optional
1006 
1007 
1009 
1010 
1012 
1013 
1014 
1015 
1016 
1017 
1018  // ===> Attribute assocNature, which is optional
1019 
1020 
1022 
1023 
1024  std::string assocNature;
1025 
1026 
1027 
1028 
1029 
1031  // Extrinsic Table Attributes //
1033 
1034 
1035  // ===> Attribute assocFieldId, which is optional
1036 
1037 
1038  bool assocFieldIdExists;
1039 
1040 
1042 
1043 
1044 
1045 
1046 
1047 
1048  // ===> Attribute ephemerisId, which is optional
1049 
1050 
1052 
1053 
1055 
1056 
1057 
1058 
1059 
1060 
1061  // ===> Attribute sourceId, which is optional
1062 
1063 
1065 
1066 
1068 
1069 
1070 
1071 
1072 
1074  // Links //
1076 
1077 
1078 
1079 
1080 
1081 
1082 
1083 
1084 
1085 
1086 
1087 
1088 
1089 
1090 
1091 
1092 
1093 
1094 
1095 
1096 
1097 /*
1099  // binary-deserialization material from an EndianIStream //
1101  std::map<std::string, FieldAttributeFromBin> fromBinMethods;
1102 void fieldIdFromBin( EndianIStream& eis);
1103 void fieldNameFromBin( EndianIStream& eis);
1104 void numPolyFromBin( EndianIStream& eis);
1105 void delayDirFromBin( EndianIStream& eis);
1106 void phaseDirFromBin( EndianIStream& eis);
1107 void referenceDirFromBin( EndianIStream& eis);
1108 
1109 void timeFromBin( EndianIStream& eis);
1110 void codeFromBin( EndianIStream& eis);
1111 void directionCodeFromBin( EndianIStream& eis);
1112 void directionEquinoxFromBin( EndianIStream& eis);
1113 void assocNatureFromBin( EndianIStream& eis);
1114 void ephemerisIdFromBin( EndianIStream& eis);
1115 void sourceIdFromBin( EndianIStream& eis);
1116 void assocFieldIdFromBin( EndianIStream& eis);
1117 
1118 */
1119 
1121  // text-deserialization material //
1123  std::map<std::string, FieldAttributeFromText> fromTextMethods;
1124 
1125 void fieldIdFromText (const std::string & s);
1126 
1127 
1128 void fieldNameFromText (const std::string & s);
1129 
1130 
1131 void numPolyFromText (const std::string & s);
1132 
1133 
1134 void delayDirFromText (const std::string & s);
1135 
1136 
1137 void phaseDirFromText (const std::string & s);
1138 
1139 
1140 void referenceDirFromText (const std::string & s);
1141 
1142 
1143 
1144 void timeFromText (const std::string & s);
1145 
1146 
1147 void codeFromText (const std::string & s);
1148 
1149 
1150 void directionCodeFromText (const std::string & s);
1151 
1152 
1153 void directionEquinoxFromText (const std::string & s);
1154 
1155 
1156 void assocNatureFromText (const std::string & s);
1157 
1158 
1159 void ephemerisIdFromText (const std::string & s);
1160 
1161 
1162 void sourceIdFromText (const std::string & s);
1163 
1164 
1165 void assocFieldIdFromText (const std::string & s);
1166 
1167 
1168 
1173  void toBin(EndianOSStream& eoss);
1174 
1184 };
1185 
1186 } // End namespace asdm
1187 
1188 #endif /* Field_CLASS */
void codeFromText(const std::string &s)
std::string getFieldName() const
===&gt; Attribute fieldName
bool isEphemerisIdExists() const
===&gt; Attribute ephemerisId, which is optional
int numPoly
===&gt; Attribute numPoly
Definition: FieldRow.h:926
void delayDirFromText(const std::string &s)
void setAssocFieldId(Tag assocFieldId)
Set assocFieldId with the specified Tag.
std::string getCode() const
Get code, which is optional.
bool isTimeExists() const
===&gt; Attribute time, which is optional
void clearTime()
Mark time, which is an optional field, as non-existent.
void phaseDirFromBin(EndianIStream &eis)
void setFieldId(Tag fieldId)
Set fieldId with the specified Tag value.
std::vector< std::vector< Angle > > referenceDir
===&gt; Attribute referenceDir
Definition: FieldRow.h:959
asdmIDL::FieldRowIDL * toIDL() const
Return this row in the form of an IDL struct.
The FieldTable class is an Alma table.
Definition: FieldTable.h:233
std::vector< SourceRow * > getSources()
===&gt; Slice link from a row of Field table to a collection of row of Source table. ...
void(FieldRow::* FieldAttributeFromBin)(EndianIStream &eis)
Definition: FieldRow.h:118
std::string code
Definition: FieldRow.h:985
bool assocNatureExists
===&gt; Attribute assocNature, which is optional
Definition: FieldRow.h:1021
DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const
Get directionCode, which is optional.
ArrayTime getDirectionEquinox() const
Get directionEquinox, which is optional.
bool equalByRequiredValue(FieldRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
std::vector< std::vector< Angle > > getReferenceDir() const
===&gt; Attribute referenceDir
bool compareNoAutoInc(std::string fieldName, int numPoly, std::vector< std::vector< Angle > > delayDir, std::vector< std::vector< Angle > > phaseDir, std::vector< std::vector< Angle > > referenceDir)
Compare each mandatory attribute except the autoincrementable one of this FieldRow with the correspon...
int getNumPoly() const
===&gt; Attribute numPoly
void assocFieldIdFromText(const std::string &s)
void setDirectionEquinox(ArrayTime directionEquinox)
Set directionEquinox with the specified ArrayTime.
void sourceIdFromText(const std::string &s)
void(FieldRow::* FieldAttributeFromText)(const std::string &s)
Definition: FieldRow.h:119
void directionCodeFromBin(EndianIStream &eis)
void delayDirFromBin(EndianIStream &eis)
void phaseDirFromText(const std::string &s)
std::vector< std::vector< Angle > > getPhaseDir() const
===&gt; Attribute phaseDir
int getEphemerisId() const
Get ephemerisId, which is optional.
bool isDirectionCodeExists() const
===&gt; Attribute directionCode, which is optional
void setReferenceDir(std::vector< std::vector< Angle > > referenceDir)
Set referenceDir with the specified std::vector&lt;std::vector&lt;Angle &gt; &gt;.
void setFromIDL(asdmIDL::FieldRowIDL x)
Fill the values of this row from the IDL struct FieldRowIDL.
void sourceIdFromBin(EndianIStream &eis)
bool sourceIdExists
===&gt; Attribute sourceId, which is optional
Definition: FieldRow.h:1064
void numPolyFromBin(EndianIStream &eis)
virtual ~FieldRow()
friend class asdm::TableStreamReader&lt;FieldTable, FieldRow&gt;;
void referenceDirFromText(const std::string &s)
void ephemerisIdFromBin(EndianIStream &eis)
void assocFieldIdFromBin(EndianIStream &eis)
void setPhaseDir(std::vector< std::vector< Angle > > phaseDir)
Set phaseDir with the specified std::vector&lt;std::vector&lt;Angle &gt; &gt;.
bool compareRequiredValue(std::string fieldName, int numPoly, std::vector< std::vector< Angle > > delayDir, std::vector< std::vector< Angle > > phaseDir, std::vector< std::vector< Angle > > referenceDir)
Compare each mandatory value (i.e.
bool directionEquinoxExists
===&gt; Attribute directionEquinox, which is optional
Definition: FieldRow.h:1008
std::vector< std::vector< Angle > > getDelayDir() const
===&gt; Attribute delayDir
void referenceDirFromBin(EndianIStream &eis)
void assocNatureFromText(const std::string &s)
void fieldIdFromText(const std::string &s)
void setAssocNature(std::string assocNature)
Set assocNature with the specified std::string.
std::string getAssocNature() const
Get assocNature, which is optional.
void numPolyFromText(const std::string &s)
void clearSourceId()
Mark sourceId, which is an optional field, as non-existent.
void setSourceId(int sourceId)
Set sourceId with the specified int.
ArrayTime time
Definition: FieldRow.h:972
int getSourceId() const
Get sourceId, which is optional.
Links *binary deserialization material from an EndianIStream std::map< std::string, FieldAttributeFromBin > fromBinMethods
Definition: FieldRow.h:1101
std::string toXML() const
Return this row in the form of an XML string.
bool codeExists
===&gt; Attribute code, which is optional
Definition: FieldRow.h:982
void timeFromText(const std::string &s)
ArrayTime getTime() const
Get time, which is optional.
void clearDirectionEquinox()
Mark directionEquinox, which is an optional field, as non-existent.
FieldTable & table
The table to which this row belongs.
Definition: FieldRow.h:844
void clearDirectionCode()
Mark directionCode, which is an optional field, as non-existent.
void directionCodeFromText(const std::string &s)
void ephemerisIdFromText(const std::string &s)
bool isAdded() const
Has this row been added to its table ?
void fieldNameFromBin(EndianIStream &eis)
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
void setTime(ArrayTime time)
Set time with the specified ArrayTime.
bool directionCodeExists
===&gt; Attribute directionCode, which is optional
Definition: FieldRow.h:995
bool isCodeExists() const
===&gt; Attribute code, which is optional
void setDirectionCode(DirectionReferenceCodeMod::DirectionReferenceCode directionCode)
Set directionCode with the specified DirectionReferenceCodeMod::DirectionReferenceCode.
void assocNatureFromBin(EndianIStream &eis)
FieldRow(FieldTable &table)
Create a FieldRow.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void setFieldName(std::string fieldName)
Set fieldName with the specified std::string.
void codeFromBin(EndianIStream &eis)
FieldRow * getFieldUsingAssocFieldId()
assocFieldId pointer to the row in the Field table having Field.assocFieldId == assocFieldId ...
bool isSourceIdExists() const
===&gt; Attribute sourceId, which is optional
void timeFromBin(EndianIStream &eis)
bool timeExists
===&gt; Attribute time, which is optional
Definition: FieldRow.h:969
void clearAssocNature()
Mark assocNature, which is an optional field, as non-existent.
std::string assocNature
Definition: FieldRow.h:1024
std::string fieldName
===&gt; Attribute fieldName
Definition: FieldRow.h:915
The FieldRow class is a row of a FieldTable.
Definition: FieldRow.h:127
void directionEquinoxFromBin(EndianIStream &eis)
void setNumPoly(int numPoly)
Set numPoly with the specified int.
void fieldNameFromText(const std::string &s)
void setCode(std::string code)
Set code with the specified std::string.
void fieldIdFromBin(EndianIStream &eis)
bool ephemerisIdExists
===&gt; Attribute ephemerisId, which is optional
Definition: FieldRow.h:1051
void clearEphemerisId()
Mark ephemerisId, which is an optional field, as non-existent.
void clearAssocFieldId()
Mark assocFieldId, which is an optional field, as non-existent.
void setDelayDir(std::vector< std::vector< Angle > > delayDir)
Set delayDir with the specified std::vector&lt;std::vector&lt;Angle &gt; &gt;.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: FieldRow.h:848
bool isAssocNatureExists() const
===&gt; Attribute assocNature, which is optional
FieldTable & getTable() const
Return the table to which this row belongs.
Tag getAssocFieldId() const
Get assocFieldId, which is optional.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void setEphemerisId(int ephemerisId)
Set ephemerisId with the specified int.
std::vector< std::vector< Angle > > phaseDir
===&gt; Attribute phaseDir
Definition: FieldRow.h:948
void clearCode()
Mark code, which is an optional field, as non-existent.
ArrayTime directionEquinox
Definition: FieldRow.h:1011
DirectionReferenceCodeMod::DirectionReferenceCode directionCode
Definition: FieldRow.h:998
bool isDirectionEquinoxExists() const
===&gt; Attribute directionEquinox, which is optional
std::vector< std::vector< Angle > > delayDir
===&gt; Attribute delayDir
Definition: FieldRow.h:937
void directionEquinoxFromText(const std::string &s)
*text deserialization material std::map< std::string, FieldAttributeFromText > fromTextMethods
Definition: FieldRow.h:1123