casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AntennaRow.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 AntennaRow.h
32  */
33 
34 #ifndef AntennaRow_CLASS
35 #define AntennaRow_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/Length.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 
71 
72 
73 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
88 #include <alma/ASDM/NoSuchRow.h>
90 
92 //#include <alma/ASDM/TableStreamReader.h>
93 
94 /*\file Antenna.h
95  \brief Generated from model's revision "-1", branch ""
96 */
97 
98 namespace asdm {
99 
100 //class asdm::AntennaTable;
101 
102 
103 // class asdm::AntennaRow;
104 class AntennaRow;
105 
106 // class asdm::StationRow;
107 class StationRow;
108 
109 
110 class AntennaRow;
112 typedef void (AntennaRow::*AntennaAttributeFromText) (const std::string& s);
113 
120 class AntennaRow {
121 friend class asdm::AntennaTable;
123 //friend class asdm::TableStreamReader<AntennaTable, AntennaRow>;
124 
125 public:
126 
127  virtual ~AntennaRow();
128 
132  AntennaTable &getTable() const;
133 
138  bool isAdded() const;
139 
141  // Intrinsic Table Attributes //
143 
144 
145  // ===> Attribute antennaId
146 
147 
148 
149 
150 
155  Tag getAntennaId() const;
156 
157 
158 
159 
160 
161 
162 
163 
164 
165  // ===> Attribute name
166 
167 
168 
169 
170 
175  std::string getName() const;
176 
177 
178 
179 
187  void setName (std::string name);
188 
189 
190 
191 
192 
193 
194 
195  // ===> Attribute antennaMake
196 
197 
198 
199 
200 
205  AntennaMakeMod::AntennaMake getAntennaMake() const;
206 
207 
208 
209 
217  void setAntennaMake (AntennaMakeMod::AntennaMake antennaMake);
218 
219 
220 
221 
222 
223 
224 
225  // ===> Attribute antennaType
226 
227 
228 
229 
230 
235  AntennaTypeMod::AntennaType getAntennaType() const;
236 
237 
238 
239 
247  void setAntennaType (AntennaTypeMod::AntennaType antennaType);
248 
249 
250 
251 
252 
253 
254 
255  // ===> Attribute dishDiameter
256 
257 
258 
259 
260 
265  Length getDishDiameter() const;
266 
267 
268 
269 
278 
279 
280 
281 
282 
283 
284 
285  // ===> Attribute position
286 
287 
288 
289 
290 
295  std::vector<Length > getPosition() const;
296 
297 
298 
299 
307  void setPosition (std::vector<Length > position);
308 
309 
310 
311 
312 
313 
314 
315  // ===> Attribute offset
316 
317 
318 
319 
320 
325  std::vector<Length > getOffset() const;
326 
327 
328 
329 
337  void setOffset (std::vector<Length > offset);
338 
339 
340 
341 
342 
343 
344 
345  // ===> Attribute time
346 
347 
348 
349 
350 
355  ArrayTime getTime() const;
356 
357 
358 
359 
367  void setTime (ArrayTime time);
368 
369 
370 
371 
372 
373 
375  // Extrinsic Table Attributes //
377 
378 
379  // ===> Attribute assocAntennaId, which is optional
380 
381 
382 
387  bool isAssocAntennaIdExists() const;
388 
389 
390 
396  Tag getAssocAntennaId() const;
397 
398 
399 
400 
408 
409 
410 
411 
415  void clearAssocAntennaId ();
416 
417 
418 
419 
420  // ===> Attribute stationId
421 
422 
423 
424 
425 
430  Tag getStationId() const;
431 
432 
433 
434 
442  void setStationId (Tag stationId);
443 
444 
445 
446 
447 
448 
450  // Links //
452 
453 
454 
455 
456 
457 
458 
459  // ===> Optional link from a row of Antenna table to a row of Antenna table.
460 
465  bool isAssociatedAntennaExists() const;
466 
473 
478 
479 
480 
481 
482 
483 
484 
485 
486 
487 
495 
496 
497 
498 
499 
500 
501 
523  bool compareNoAutoInc(std::string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, std::vector<Length > position, std::vector<Length > offset, ArrayTime time, Tag stationId);
524 
525 
526 
527 
549  bool compareRequiredValue(std::string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, std::vector<Length > position, std::vector<Length > offset, ArrayTime time, Tag stationId);
550 
551 
561 
562 #ifndef WITHOUT_ACS
563 
567  asdmIDL::AntennaRowIDL *toIDL() const;
568 
576  void toIDL(asdmIDL::AntennaRowIDL& x) const;
577 #endif
578 
579 #ifndef WITHOUT_ACS
580 
585  void setFromIDL (asdmIDL::AntennaRowIDL x) ;
586 #endif
587 
592  std::string toXML() const;
593 
600  void setFromXML (std::string rowDoc) ;
601 
604  // binary-deserialization material from an EndianIStream //
606 
607  std::map<std::string, AntennaAttributeFromBin> fromBinMethods;
608 void antennaIdFromBin( EndianIStream& eis);
609 void nameFromBin( EndianIStream& eis);
613 void positionFromBin( EndianIStream& eis);
614 void offsetFromBin( EndianIStream& eis);
615 void timeFromBin( EndianIStream& eis);
616 void stationIdFromBin( EndianIStream& eis);
617 
619 
620 
628  static AntennaRow* fromBin(EndianIStream& eis, AntennaTable& table, const std::vector<std::string>& attributesSeq);
629 
636  void fromText(const std::string& attributeName, const std::string& t);
638 
639 private:
648 
649  // This method is used by the Table class when this row is added to the table.
650  void isAdded(bool added);
651 
652 
662 
681 
683  // Intrinsic Table Attributes //
685 
686 
687  // ===> Attribute antennaId
688 
689 
690 
691  Tag antennaId;
692 
693 
694 
695 
705  void setAntennaId (Tag antennaId);
706 
707 
708 
709 
710  // ===> Attribute name
711 
712 
713 
714  std::string name;
715 
716 
717 
718 
719 
720 
721  // ===> Attribute antennaMake
722 
723 
724 
725  AntennaMakeMod::AntennaMake antennaMake;
726 
727 
728 
729 
730 
731 
732  // ===> Attribute antennaType
733 
734 
735 
736  AntennaTypeMod::AntennaType antennaType;
737 
738 
739 
740 
741 
742 
743  // ===> Attribute dishDiameter
744 
745 
746 
748 
749 
750 
751 
752 
753 
754  // ===> Attribute position
755 
756 
757 
758  std::vector<Length > position;
759 
760 
761 
762 
763 
764 
765  // ===> Attribute offset
766 
767 
768 
769  std::vector<Length > offset;
770 
771 
772 
773 
774 
775 
776  // ===> Attribute time
777 
778 
779 
781 
782 
783 
784 
785 
787  // Extrinsic Table Attributes //
789 
790 
791  // ===> Attribute assocAntennaId, which is optional
792 
793 
794  bool assocAntennaIdExists;
795 
796 
798 
799 
800 
801 
802 
803 
804  // ===> Attribute stationId
805 
806 
807 
809 
810 
811 
812 
813 
815  // Links //
817 
818 
819 
820 
821 
822 
823 
824 
825 
826 
827 
828 
829 
830 /*
832  // binary-deserialization material from an EndianIStream //
834  std::map<std::string, AntennaAttributeFromBin> fromBinMethods;
835 void antennaIdFromBin( EndianIStream& eis);
836 void nameFromBin( EndianIStream& eis);
837 void antennaMakeFromBin( EndianIStream& eis);
838 void antennaTypeFromBin( EndianIStream& eis);
839 void dishDiameterFromBin( EndianIStream& eis);
840 void positionFromBin( EndianIStream& eis);
841 void offsetFromBin( EndianIStream& eis);
842 void timeFromBin( EndianIStream& eis);
843 void stationIdFromBin( EndianIStream& eis);
844 
845 void assocAntennaIdFromBin( EndianIStream& eis);
846 
847 */
848 
850  // text-deserialization material //
852  std::map<std::string, AntennaAttributeFromText> fromTextMethods;
853 
854 void antennaIdFromText (const std::string & s);
855 
856 
857 void nameFromText (const std::string & s);
858 
859 
860 void antennaMakeFromText (const std::string & s);
861 
862 
863 void antennaTypeFromText (const std::string & s);
864 
865 
866 void dishDiameterFromText (const std::string & s);
867 
868 
869 void positionFromText (const std::string & s);
870 
871 
872 void offsetFromText (const std::string & s);
873 
874 
875 void timeFromText (const std::string & s);
876 
877 
878 void stationIdFromText (const std::string & s);
879 
880 
881 
882 void assocAntennaIdFromText (const std::string & s);
883 
884 
885 
890  void toBin(EndianOSStream& eoss);
891 
901 };
902 
903 } // End namespace asdm
904 
905 #endif /* Antenna_CLASS */
void timeFromText(const std::string &s)
void antennaTypeFromText(const std::string &s)
bool equalByRequiredValue(AntennaRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void assocAntennaIdFromText(const std::string &s)
void setDishDiameter(Length dishDiameter)
Set dishDiameter with the specified Length.
void setFromIDL(asdmIDL::AntennaRowIDL x)
Fill the values of this row from the IDL struct AntennaRowIDL.
AntennaTable & table
The table to which this row belongs.
Definition: AntennaRow.h:643
AntennaRow(AntennaTable &table)
Create a AntennaRow.
Tag getAssocAntennaId() const
Get assocAntennaId, which is optional.
std::string getName() const
===&gt; Attribute name
void antennaTypeFromBin(EndianIStream &eis)
void nameFromBin(EndianIStream &eis)
void setName(std::string name)
Set name with the specified std::string.
void setOffset(std::vector< Length > offset)
Set offset with the specified std::vector&lt;Length &gt;.
void antennaMakeFromBin(EndianIStream &eis)
std::vector< Length > offset
===&gt; Attribute offset
Definition: AntennaRow.h:769
void antennaIdFromText(const std::string &s)
void setAssocAntennaId(Tag assocAntennaId)
Set assocAntennaId with the specified Tag.
void setPosition(std::vector< Length > position)
Set position with the specified std::vector&lt;Length &gt;.
std::vector< Length > getOffset() const
===&gt; Attribute offset
void offsetFromText(const std::string &s)
void setAntennaId(Tag antennaId)
Set antennaId with the specified Tag value.
void(AntennaRow::* AntennaAttributeFromText)(const std::string &s)
Definition: AntennaRow.h:112
void setStationId(Tag stationId)
Set stationId with the specified Tag.
void assocAntennaIdFromBin(EndianIStream &eis)
std::vector< Length > position
===&gt; Attribute position
Definition: AntennaRow.h:758
void dishDiameterFromText(const std::string &s)
bool compareNoAutoInc(std::string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, std::vector< Length > position, std::vector< Length > offset, ArrayTime time, Tag stationId)
Compare each mandatory attribute except the autoincrementable one of this AntennaRow with the corresp...
void positionFromText(const std::string &s)
void setAntennaMake(AntennaMakeMod::AntennaMake antennaMake)
Set antennaMake with the specified AntennaMakeMod::AntennaMake.
void dishDiameterFromBin(EndianIStream &eis)
void positionFromBin(EndianIStream &eis)
void nameFromText(const std::string &s)
AntennaMakeMod::AntennaMake antennaMake
===&gt; Attribute antennaMake
Definition: AntennaRow.h:725
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
The AntennaRow class is a row of a AntennaTable.
Definition: AntennaRow.h:120
Tag getStationId() const
===&gt; Attribute stationId
StationRow * getStationUsingStationId()
stationId pointer to the row in the Station table having Station.stationId == stationId ...
void antennaIdFromBin(EndianIStream &eis)
AntennaRow * getAssociatedAntenna() const
Get the optional row in table Antenna by traversing the defined link to that table.
The Length class implements a quantity of length in meters.
Definition: Length.h:53
Tag stationId
===&gt; Attribute stationId
Definition: AntennaRow.h:808
The AntennaTable class is an Alma table.
Definition: AntennaTable.h:201
asdmIDL::AntennaRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
AntennaTable & getTable() const
Return the table to which this row belongs.
std::string toXML() const
Return this row in the form of an XML string.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
ArrayTime getTime() const
===&gt; Attribute time
*text deserialization material std::map< std::string, AntennaAttributeFromText > fromTextMethods
Definition: AntennaRow.h:852
ArrayTime time
===&gt; Attribute time
Definition: AntennaRow.h:780
AntennaTypeMod::AntennaType getAntennaType() const
===&gt; Attribute antennaType
bool compareRequiredValue(std::string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, std::vector< Length > position, std::vector< Length > offset, ArrayTime time, Tag stationId)
Compare each mandatory value (i.e.
bool isAdded() const
Has this row been added to its table ?
Length dishDiameter
===&gt; Attribute dishDiameter
Definition: AntennaRow.h:747
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void setAssociatedAntennaLink(Tag assocAntennaId)
Set the values of the link attributes needed to link this row to a row in table Antenna.
Length getDishDiameter() const
===&gt; Attribute dishDiameter
std::string name
===&gt; Attribute name
Definition: AntennaRow.h:714
void stationIdFromText(const std::string &s)
void timeFromBin(EndianIStream &eis)
void stationIdFromBin(EndianIStream &eis)
Links *binary deserialization material from an EndianIStream std::map< std::string, AntennaAttributeFromBin > fromBinMethods
Definition: AntennaRow.h:834
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: AntennaRow.h:647
void clearAssocAntennaId()
Mark assocAntennaId, which is an optional field, as non-existent.
void setAntennaType(AntennaTypeMod::AntennaType antennaType)
Set antennaType with the specified AntennaTypeMod::AntennaType.
void(AntennaRow::* AntennaAttributeFromBin)(EndianIStream &eis)
Definition: AntennaRow.h:111
AntennaTypeMod::AntennaType antennaType
===&gt; Attribute antennaType
Definition: AntennaRow.h:736
virtual ~AntennaRow()
friend class asdm::TableStreamReader&lt;AntennaTable, AntennaRow&gt;;
The StationRow class is a row of a StationTable.
Definition: StationRow.h:106
AntennaMakeMod::AntennaMake getAntennaMake() const
===&gt; Attribute antennaMake
void setTime(ArrayTime time)
Set time with the specified ArrayTime.
void offsetFromBin(EndianIStream &eis)
std::vector< Length > getPosition() const
===&gt; Attribute position
void antennaMakeFromText(const std::string &s)