casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MainRow.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 MainRow.h
32  */
33 
34 #ifndef MainRow_CLASS
35 #define MainRow_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 #include <stdint.h>
48 
49 
50 
51 
52 
53 #include <alma/ASDM/ArrayTime.h>
54 
55 
56 
57 #include <alma/ASDM/Tag.h>
58 
59 
60 
61 #include <alma/ASDM/EntityRef.h>
62 
63 
64 
65 #include <alma/ASDM/Interval.h>
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
94 #include <alma/ASDM/NoSuchRow.h>
96 
98 //#include <alma/ASDM/TableStreamReader.h>
99 
100 /*\file Main.h
101  \brief Generated from model's revision "-1", branch ""
102 */
103 
104 namespace asdm {
105 
106 //class asdm::MainTable;
107 
108 
109 // class asdm::ConfigDescriptionRow;
110 class ConfigDescriptionRow;
111 
112 // class asdm::FieldRow;
113 class FieldRow;
114 
115 // class asdm::StateRow;
116 class StateRow;
117 
118 // class asdm::ExecBlockRow;
119 class ExecBlockRow;
120 
121 
122 class MainRow;
124 typedef void (MainRow::*MainAttributeFromText) (const std::string& s);
125 
132 class MainRow {
133 friend class asdm::MainTable;
135 //friend class asdm::TableStreamReader<MainTable, MainRow>;
136 
137 public:
138 
139  virtual ~MainRow();
140 
144  MainTable &getTable() const;
145 
150  bool isAdded() const;
151 
153  // Intrinsic Table Attributes //
155 
156 
157  // ===> Attribute time
158 
159 
160 
161 
162 
167  ArrayTime getTime() const;
168 
169 
170 
171 
181  void setTime (ArrayTime time);
182 
183 
184 
185 
186 
187 
188 
189  // ===> Attribute numAntenna
190 
191 
192 
193 
194 
199  int getNumAntenna() const;
200 
201 
202 
203 
211  void setNumAntenna (int numAntenna);
212 
213 
214 
215 
216 
217 
218 
219  // ===> Attribute timeSampling
220 
221 
222 
223 
224 
229  TimeSamplingMod::TimeSampling getTimeSampling() const;
230 
231 
232 
233 
241  void setTimeSampling (TimeSamplingMod::TimeSampling timeSampling);
242 
243 
244 
245 
246 
247 
248 
249  // ===> Attribute interval
250 
251 
252 
253 
254 
259  Interval getInterval() const;
260 
261 
262 
263 
272 
273 
274 
275 
276 
277 
278 
279  // ===> Attribute numIntegration
280 
281 
282 
283 
284 
289  int getNumIntegration() const;
290 
291 
292 
293 
302 
303 
304 
305 
306 
307 
308 
309  // ===> Attribute scanNumber
310 
311 
312 
313 
314 
319  int getScanNumber() const;
320 
321 
322 
323 
331  void setScanNumber (int scanNumber);
332 
333 
334 
335 
336 
337 
338 
339  // ===> Attribute subscanNumber
340 
341 
342 
343 
344 
349  int getSubscanNumber() const;
350 
351 
352 
353 
361  void setSubscanNumber (int subscanNumber);
362 
363 
364 
365 
366 
367 
368 
369  // ===> Attribute dataSize
370 
371 
372 
373 
374 
379  int64_t getDataSize() const;
380 
381 
382 
383 
391  void setDataSize (int64_t dataSize);
392 
393 
394 
395 
396 
397 
398 
399  // ===> Attribute dataUID
400 
401 
402 
403 
404 
409  EntityRef getDataUID() const;
410 
411 
412 
413 
422 
423 
424 
425 
426 
427 
429  // Extrinsic Table Attributes //
431 
432 
433  // ===> Attribute configDescriptionId
434 
435 
436 
437 
438 
443  Tag getConfigDescriptionId() const;
444 
445 
446 
447 
457  void setConfigDescriptionId (Tag configDescriptionId);
458 
459 
460 
461 
462 
463 
464 
465  // ===> Attribute execBlockId
466 
467 
468 
469 
470 
475  Tag getExecBlockId() const;
476 
477 
478 
479 
488 
489 
490 
491 
492 
493 
494 
495  // ===> Attribute fieldId
496 
497 
498 
499 
500 
505  Tag getFieldId() const;
506 
507 
508 
509 
519  void setFieldId (Tag fieldId);
520 
521 
522 
523 
524 
525 
526 
527  // ===> Attribute stateId
528 
529 
530 
531 
532 
537  std::vector<Tag> getStateId() const;
538 
539 
540 
541 
549  void setStateId (std::vector<Tag> stateId);
550 
551 
552 
553 
554 
555 
557  // Links //
559 
560 
561 
562 
563 
571 
572 
573 
574 
575 
576 
577 
578 
586 
587 
588 
589 
590 
591 
599  void setStateId (int i, Tag stateId);
600 
601 
602 
603 
604 
609  void addStateId(Tag id);
610 
615  void addStateId(const std::vector<Tag> & id);
616 
617 
623  const Tag getStateId(int i);
624 
633 
638  std::vector<StateRow *> getStatesUsingStateId();
639 
640 
641 
642 
643 
644 
645 
646 
654 
655 
656 
657 
658 
659 
660 
692  bool compareNoAutoInc(ArrayTime time, Tag configDescriptionId, Tag fieldId, int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, std::vector<Tag> stateId, Tag execBlockId);
693 
694 
695 
696 
722  bool compareRequiredValue(int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, std::vector<Tag> stateId, Tag execBlockId);
723 
724 
733  bool equalByRequiredValue(MainRow* x) ;
734 
735 #ifndef WITHOUT_ACS
736 
740  asdmIDL::MainRowIDL *toIDL() const;
741 
749  void toIDL(asdmIDL::MainRowIDL& x) const;
750 #endif
751 
752 #ifndef WITHOUT_ACS
753 
758  void setFromIDL (asdmIDL::MainRowIDL x) ;
759 #endif
760 
765  std::string toXML() const;
766 
773  void setFromXML (std::string rowDoc) ;
774 
777  // binary-deserialization material from an EndianIStream //
779 
780  std::map<std::string, MainAttributeFromBin> fromBinMethods;
781 void timeFromBin( EndianIStream& eis);
783 void fieldIdFromBin( EndianIStream& eis);
784 void numAntennaFromBin( EndianIStream& eis);
786 void intervalFromBin( EndianIStream& eis);
788 void scanNumberFromBin( EndianIStream& eis);
790 void dataSizeFromBin( EndianIStream& eis);
791 void dataUIDFromBin( EndianIStream& eis);
792 void stateIdFromBin( EndianIStream& eis);
794 
795 
796 
804  static MainRow* fromBin(EndianIStream& eis, MainTable& table, const std::vector<std::string>& attributesSeq);
805 
812  void fromText(const std::string& attributeName, const std::string& t);
814 
815 private:
824 
825  // This method is used by the Table class when this row is added to the table.
826  void isAdded(bool added);
827 
828 
838 
856  MainRow (MainTable &table, MainRow *row);
857 
859  // Intrinsic Table Attributes //
861 
862 
863  // ===> Attribute time
864 
865 
866 
867  ArrayTime time;
868 
869 
870 
871 
872 
873 
874  // ===> Attribute numAntenna
875 
876 
877 
879 
880 
881 
882 
883 
884 
885  // ===> Attribute timeSampling
886 
887 
888 
889  TimeSamplingMod::TimeSampling timeSampling;
890 
891 
892 
893 
894 
895 
896  // ===> Attribute interval
897 
898 
899 
901 
902 
903 
904 
905 
906 
907  // ===> Attribute numIntegration
908 
909 
910 
912 
913 
914 
915 
916 
917 
918  // ===> Attribute scanNumber
919 
920 
921 
923 
924 
925 
926 
927 
928 
929  // ===> Attribute subscanNumber
930 
931 
932 
934 
935 
936 
937 
938 
939 
940  // ===> Attribute dataSize
941 
942 
943 
944  int64_t dataSize;
945 
946 
947 
948 
949 
950 
951  // ===> Attribute dataUID
952 
953 
954 
956 
957 
958 
959 
960 
962  // Extrinsic Table Attributes //
964 
965 
966  // ===> Attribute configDescriptionId
967 
968 
969 
970  Tag configDescriptionId;
971 
972 
973 
974 
975 
976 
977  // ===> Attribute execBlockId
978 
979 
980 
982 
983 
984 
985 
986 
987 
988  // ===> Attribute fieldId
989 
990 
991 
993 
994 
995 
996 
997 
998 
999  // ===> Attribute stateId
1000 
1001 
1002 
1003  std::vector<Tag> stateId;
1004 
1005 
1006 
1007 
1008 
1010  // Links //
1012 
1013 
1014 
1015 
1016 
1017 
1018 
1019 
1020 
1021 
1022 
1023 
1024 
1025 
1026 
1027 
1028 
1029 
1030 
1031 
1032 
1033 
1034 
1035 
1036 
1037 
1038 
1039 
1040 
1041 /*
1043  // binary-deserialization material from an EndianIStream //
1045  std::map<std::string, MainAttributeFromBin> fromBinMethods;
1046 void timeFromBin( EndianIStream& eis);
1047 void configDescriptionIdFromBin( EndianIStream& eis);
1048 void fieldIdFromBin( EndianIStream& eis);
1049 void numAntennaFromBin( EndianIStream& eis);
1050 void timeSamplingFromBin( EndianIStream& eis);
1051 void intervalFromBin( EndianIStream& eis);
1052 void numIntegrationFromBin( EndianIStream& eis);
1053 void scanNumberFromBin( EndianIStream& eis);
1054 void subscanNumberFromBin( EndianIStream& eis);
1055 void dataSizeFromBin( EndianIStream& eis);
1056 void dataUIDFromBin( EndianIStream& eis);
1057 void stateIdFromBin( EndianIStream& eis);
1058 void execBlockIdFromBin( EndianIStream& eis);
1059 
1060 
1061 */
1062 
1064  // text-deserialization material //
1066  std::map<std::string, MainAttributeFromText> fromTextMethods;
1067 
1068 void timeFromText (const std::string & s);
1069 
1070 
1071 void configDescriptionIdFromText (const std::string & s);
1072 
1073 
1074 void fieldIdFromText (const std::string & s);
1075 
1076 
1077 void numAntennaFromText (const std::string & s);
1078 
1079 
1080 void timeSamplingFromText (const std::string & s);
1081 
1082 
1083 void intervalFromText (const std::string & s);
1084 
1085 
1086 void numIntegrationFromText (const std::string & s);
1087 
1088 
1089 void scanNumberFromText (const std::string & s);
1090 
1091 
1092 void subscanNumberFromText (const std::string & s);
1093 
1094 
1095 void dataSizeFromText (const std::string & s);
1096 
1097 
1098 
1099 void stateIdFromText (const std::string & s);
1100 
1101 
1102 void execBlockIdFromText (const std::string & s);
1103 
1104 
1105 
1106 
1111  void toBin(EndianOSStream& eoss);
1112 
1122 };
1123 
1124 } // End namespace asdm
1125 
1126 #endif /* Main_CLASS */
EntityRef dataUID
===&gt; Attribute dataUID
Definition: MainRow.h:955
bool compareRequiredValue(int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, std::vector< Tag > stateId, Tag execBlockId)
Compare each mandatory value (i.e.
int numIntegration
===&gt; Attribute numIntegration
Definition: MainRow.h:911
MainRow(MainTable &table)
Create a MainRow.
void timeFromBin(EndianIStream &eis)
The Interval class implements an interval of time in units of nanoseconds.
Definition: Interval.h:58
void stateIdFromBin(EndianIStream &eis)
void setConfigDescriptionId(Tag configDescriptionId)
Set configDescriptionId with the specified Tag.
void execBlockIdFromText(const std::string &s)
void timeFromText(const std::string &s)
void setDataSize(int64_t dataSize)
Set dataSize with the specified int64_t.
std::string toXML() const
Return this row in the form of an XML string.
void addStateId(Tag id)
Append a Tag to stateId.
int getScanNumber() const
===&gt; Attribute scanNumber
EntityRef getDataUID() const
===&gt; Attribute dataUID
TimeSamplingMod::TimeSampling timeSampling
===&gt; Attribute timeSampling
Definition: MainRow.h:889
void numIntegrationFromBin(EndianIStream &eis)
std::vector< StateRow * > getStatesUsingStateId()
Returns the vector of StateRow* linked to this row via the Tags stored in stateId.
MainTable & table
The table to which this row belongs.
Definition: MainRow.h:819
StateRow * getStateUsingStateId(int i)
Returns the StateRow linked to this row via the tag stored in stateId at position i...
void setNumIntegration(int numIntegration)
Set numIntegration with the specified int.
*text deserialization material std::map< std::string, MainAttributeFromText > fromTextMethods
Definition: MainRow.h:1066
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void intervalFromText(const std::string &s)
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
Definition: PlotTool.h:43
void scanNumberFromBin(EndianIStream &eis)
int64_t dataSize
===&gt; Attribute dataSize
Definition: MainRow.h:944
The ExecBlockRow class is a row of a ExecBlockTable.
Definition: ExecBlockRow.h:163
TimeSamplingMod::TimeSampling getTimeSampling() const
===&gt; Attribute timeSampling
The StateRow class is a row of a StateTable.
Definition: StateRow.h:100
void setTimeSampling(TimeSamplingMod::TimeSampling timeSampling)
Set timeSampling with the specified TimeSamplingMod::TimeSampling.
void dataSizeFromBin(EndianIStream &eis)
void numAntennaFromText(const std::string &s)
void setDataUID(EntityRef dataUID)
Set dataUID with the specified EntityRef.
void scanNumberFromText(const std::string &s)
The EntityRef class is an identification of a persistant entity in the ALMA archive.
Definition: EntityRef.h:58
void setStateId(std::vector< Tag > stateId)
Set stateId with the specified std::vector&lt;Tag&gt; .
int getNumIntegration() const
===&gt; Attribute numIntegration
void numIntegrationFromText(const std::string &s)
Tag execBlockId
===&gt; Attribute execBlockId
Definition: MainRow.h:981
void setInterval(Interval interval)
Set interval with the specified Interval.
void numAntennaFromBin(EndianIStream &eis)
void subscanNumberFromText(const std::string &s)
void setFieldId(Tag fieldId)
Set fieldId with the specified Tag.
void setSubscanNumber(int subscanNumber)
Set subscanNumber with the specified int.
std::vector< Tag > getStateId() const
===&gt; Attribute stateId
void dataUIDFromBin(EndianIStream &eis)
void setExecBlockId(Tag execBlockId)
Set execBlockId with the specified Tag.
void timeSamplingFromText(const std::string &s)
int getNumAntenna() const
===&gt; Attribute numAntenna
void setNumAntenna(int numAntenna)
Set numAntenna with the specified int.
virtual ~MainRow()
friend class asdm::TableStreamReader&lt;MainTable, MainRow&gt;;
int scanNumber
===&gt; Attribute scanNumber
Definition: MainRow.h:922
FieldRow * getFieldUsingFieldId()
fieldId pointer to the row in the Field table having Field.fieldId == fieldId
The MainRow class is a row of a MainTable.
Definition: MainRow.h:132
Interval interval
===&gt; Attribute interval
Definition: MainRow.h:900
void configDescriptionIdFromBin(EndianIStream &eis)
void setFromIDL(asdmIDL::MainRowIDL x)
Fill the values of this row from the IDL struct MainRowIDL.
void dataSizeFromText(const std::string &s)
bool isAdded() const
Has this row been added to its table ?
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
void execBlockIdFromBin(EndianIStream &eis)
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: MainRow.h:823
void timeSamplingFromBin(EndianIStream &eis)
int64_t getDataSize() const
===&gt; Attribute dataSize
asdmIDL::MainRowIDL * toIDL() const
Return this row in the form of an IDL struct.
The FieldRow class is a row of a FieldTable.
Definition: FieldRow.h:127
void(MainRow::* MainAttributeFromBin)(EndianIStream &eis)
Definition: MainRow.h:123
void intervalFromBin(EndianIStream &eis)
int numAntenna
===&gt; Attribute numAntenna
Definition: MainRow.h:878
The ConfigDescriptionRow class is a row of a ConfigDescriptionTable.
Tag getFieldId() const
===&gt; Attribute fieldId
Tag fieldId
===&gt; Attribute fieldId
Definition: MainRow.h:992
Links *binary deserialization material from an EndianIStream std::map< std::string, MainAttributeFromBin > fromBinMethods
Definition: MainRow.h:1045
void(MainRow::* MainAttributeFromText)(const std::string &s)
Definition: MainRow.h:124
Tag getExecBlockId() const
===&gt; Attribute execBlockId
MainTable & getTable() const
Return the table to which this row belongs.
std::vector< Tag > stateId
===&gt; Attribute stateId
Definition: MainRow.h:1003
int getSubscanNumber() const
===&gt; Attribute subscanNumber
void subscanNumberFromBin(EndianIStream &eis)
void setTime(ArrayTime time)
Set time with the specified ArrayTime.
bool compareNoAutoInc(ArrayTime time, Tag configDescriptionId, Tag fieldId, int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, std::vector< Tag > stateId, Tag execBlockId)
Compare each mandatory attribute except the autoincrementable one of this MainRow with the correspond...
bool equalByRequiredValue(MainRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void stateIdFromText(const std::string &s)
The MainTable class is an Alma table.
Definition: MainTable.h:228
void configDescriptionIdFromText(const std::string &s)
Links *ConfigDescriptionRow * getConfigDescriptionUsingConfigDescriptionId()
configDescriptionId pointer to the row in the ConfigDescription table having ConfigDescription.configDescriptionId == configDescriptionId
Interval getInterval() const
===&gt; Attribute interval
void setScanNumber(int scanNumber)
Set scanNumber with the specified int.
ExecBlockRow * getExecBlockUsingExecBlockId()
execBlockId pointer to the row in the ExecBlock table having ExecBlock.execBlockId == execBlockId ...
void fieldIdFromText(const std::string &s)
int subscanNumber
===&gt; Attribute subscanNumber
Definition: MainRow.h:933
void fieldIdFromBin(EndianIStream &eis)