casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReceiverRow.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 ReceiverRow.h
32  */
33 
34 #ifndef ReceiverRow_CLASS
35 #define ReceiverRow_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 
52 
53 
54 
55 #include <alma/ASDM/Frequency.h>
56 
57 
58 
59 #include <alma/ASDM/Tag.h>
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
75 
76 
77 
78 
79 
81 
82 
83 
85 
86 
87 
88 
90 #include <alma/ASDM/NoSuchRow.h>
92 
94 //#include <alma/ASDM/TableStreamReader.h>
95 
96 /*\file Receiver.h
97  \brief Generated from model's revision "-1", branch ""
98 */
99 
100 namespace asdm {
101 
102 //class asdm::ReceiverTable;
103 
104 
105 // class asdm::SpectralWindowRow;
106 class SpectralWindowRow;
107 
108 
109 class ReceiverRow;
111 typedef void (ReceiverRow::*ReceiverAttributeFromText) (const std::string& s);
112 
119 class ReceiverRow {
120 friend class asdm::ReceiverTable;
122 //friend class asdm::TableStreamReader<ReceiverTable, ReceiverRow>;
123 
124 public:
125 
126  virtual ~ReceiverRow();
127 
131  ReceiverTable &getTable() const;
132 
137  bool isAdded() const;
138 
140  // Intrinsic Table Attributes //
142 
143 
144  // ===> Attribute receiverId
145 
146 
147 
148 
149 
154  int getReceiverId() const;
155 
156 
157 
158 
159 
160 
161 
162 
163 
164  // ===> Attribute timeInterval
165 
166 
167 
168 
169 
175 
176 
177 
178 
189 
190 
191 
192 
193 
194 
195 
196  // ===> Attribute name
197 
198 
199 
200 
201 
206  std::string getName() const;
207 
208 
209 
210 
218  void setName (std::string name);
219 
220 
221 
222 
223 
224 
225 
226  // ===> Attribute numLO
227 
228 
229 
230 
231 
236  int getNumLO() const;
237 
238 
239 
240 
248  void setNumLO (int numLO);
249 
250 
251 
252 
253 
254 
255 
256  // ===> Attribute frequencyBand
257 
258 
259 
260 
261 
266  ReceiverBandMod::ReceiverBand getFrequencyBand() const;
267 
268 
269 
270 
278  void setFrequencyBand (ReceiverBandMod::ReceiverBand frequencyBand);
279 
280 
281 
282 
283 
284 
285 
286  // ===> Attribute freqLO
287 
288 
289 
290 
291 
296  std::vector<Frequency > getFreqLO() const;
297 
298 
299 
300 
308  void setFreqLO (std::vector<Frequency > freqLO);
309 
310 
311 
312 
313 
314 
315 
316  // ===> Attribute receiverSideband
317 
318 
319 
320 
321 
326  ReceiverSidebandMod::ReceiverSideband getReceiverSideband() const;
327 
328 
329 
330 
338  void setReceiverSideband (ReceiverSidebandMod::ReceiverSideband receiverSideband);
339 
340 
341 
342 
343 
344 
345 
346  // ===> Attribute sidebandLO
347 
348 
349 
350 
351 
356  std::vector<NetSidebandMod::NetSideband > getSidebandLO() const;
357 
358 
359 
360 
368  void setSidebandLO (std::vector<NetSidebandMod::NetSideband > sidebandLO);
369 
370 
371 
372 
373 
374 
376  // Extrinsic Table Attributes //
378 
379 
380  // ===> Attribute spectralWindowId
381 
382 
383 
384 
385 
390  Tag getSpectralWindowId() const;
391 
392 
393 
394 
404  void setSpectralWindowId (Tag spectralWindowId);
405 
406 
407 
408 
409 
410 
412  // Links //
414 
415 
416 
417 
418 
426 
427 
428 
429 
430 
431 
432 
454  bool compareNoAutoInc(Tag spectralWindowId, ArrayTimeInterval timeInterval, std::string name, int numLO, ReceiverBandMod::ReceiverBand frequencyBand, std::vector<Frequency > freqLO, ReceiverSidebandMod::ReceiverSideband receiverSideband, std::vector<NetSidebandMod::NetSideband > sidebandLO);
455 
456 
457 
458 
476  bool compareRequiredValue(std::string name, int numLO, ReceiverBandMod::ReceiverBand frequencyBand, std::vector<Frequency > freqLO, ReceiverSidebandMod::ReceiverSideband receiverSideband, std::vector<NetSidebandMod::NetSideband > sidebandLO);
477 
478 
488 
489 #ifndef WITHOUT_ACS
490 
494  asdmIDL::ReceiverRowIDL *toIDL() const;
495 
503  void toIDL(asdmIDL::ReceiverRowIDL& x) const;
504 #endif
505 
506 #ifndef WITHOUT_ACS
507 
512  void setFromIDL (asdmIDL::ReceiverRowIDL x) ;
513 #endif
514 
519  std::string toXML() const;
520 
527  void setFromXML (std::string rowDoc) ;
528 
531  // binary-deserialization material from an EndianIStream //
533 
534  std::map<std::string, ReceiverAttributeFromBin> fromBinMethods;
535 void receiverIdFromBin( EndianIStream& eis);
538 void nameFromBin( EndianIStream& eis);
539 void numLOFromBin( EndianIStream& eis);
541 void freqLOFromBin( EndianIStream& eis);
543 void sidebandLOFromBin( EndianIStream& eis);
544 
545 
546 
554  static ReceiverRow* fromBin(EndianIStream& eis, ReceiverTable& table, const std::vector<std::string>& attributesSeq);
555 
562  void fromText(const std::string& attributeName, const std::string& t);
564 
565 private:
574 
575  // This method is used by the Table class when this row is added to the table.
576  void isAdded(bool added);
577 
578 
588 
607 
609  // Intrinsic Table Attributes //
611 
612 
613  // ===> Attribute receiverId
614 
615 
616 
617  int receiverId;
618 
619 
620 
621 
631  void setReceiverId (int receiverId);
632 
633 
634 
635 
636  // ===> Attribute timeInterval
637 
638 
639 
641 
642 
643 
644 
645 
646 
647  // ===> Attribute name
648 
649 
650 
651  std::string name;
652 
653 
654 
655 
656 
657 
658  // ===> Attribute numLO
659 
660 
661 
662  int numLO;
663 
664 
665 
666 
667 
668 
669  // ===> Attribute frequencyBand
670 
671 
672 
673  ReceiverBandMod::ReceiverBand frequencyBand;
674 
675 
676 
677 
678 
679 
680  // ===> Attribute freqLO
681 
682 
683 
684  std::vector<Frequency > freqLO;
685 
686 
687 
688 
689 
690 
691  // ===> Attribute receiverSideband
692 
693 
694 
695  ReceiverSidebandMod::ReceiverSideband receiverSideband;
696 
697 
698 
699 
700 
701 
702  // ===> Attribute sidebandLO
703 
704 
705 
706  std::vector<NetSidebandMod::NetSideband > sidebandLO;
707 
708 
709 
710 
711 
713  // Extrinsic Table Attributes //
715 
716 
717  // ===> Attribute spectralWindowId
718 
719 
720 
721  Tag spectralWindowId;
722 
723 
724 
725 
726 
728  // Links //
730 
731 
732 
733 
734 
735 
736 
737 
738 
739 /*
741  // binary-deserialization material from an EndianIStream //
743  std::map<std::string, ReceiverAttributeFromBin> fromBinMethods;
744 void receiverIdFromBin( EndianIStream& eis);
745 void spectralWindowIdFromBin( EndianIStream& eis);
746 void timeIntervalFromBin( EndianIStream& eis);
747 void nameFromBin( EndianIStream& eis);
748 void numLOFromBin( EndianIStream& eis);
749 void frequencyBandFromBin( EndianIStream& eis);
750 void freqLOFromBin( EndianIStream& eis);
751 void receiverSidebandFromBin( EndianIStream& eis);
752 void sidebandLOFromBin( EndianIStream& eis);
753 
754 
755 */
756 
758  // text-deserialization material //
760  std::map<std::string, ReceiverAttributeFromText> fromTextMethods;
761 
762 void receiverIdFromText (const std::string & s);
763 
764 
765 void spectralWindowIdFromText (const std::string & s);
766 
767 
768 void timeIntervalFromText (const std::string & s);
769 
770 
771 void nameFromText (const std::string & s);
772 
773 
774 void numLOFromText (const std::string & s);
775 
776 
777 void frequencyBandFromText (const std::string & s);
778 
779 
780 void freqLOFromText (const std::string & s);
781 
782 
783 void receiverSidebandFromText (const std::string & s);
784 
785 
786 void sidebandLOFromText (const std::string & s);
787 
788 
789 
790 
795  void toBin(EndianOSStream& eoss);
796 
806 };
807 
808 } // End namespace asdm
809 
810 #endif /* Receiver_CLASS */
bool compareNoAutoInc(Tag spectralWindowId, ArrayTimeInterval timeInterval, std::string name, int numLO, ReceiverBandMod::ReceiverBand frequencyBand, std::vector< Frequency > freqLO, ReceiverSidebandMod::ReceiverSideband receiverSideband, std::vector< NetSidebandMod::NetSideband > sidebandLO)
Compare each mandatory attribute except the autoincrementable one of this ReceiverRow with the corres...
void numLOFromText(const std::string &s)
The ReceiverRow class is a row of a ReceiverTable.
Definition: ReceiverRow.h:119
void sidebandLOFromText(const std::string &s)
int numLO
===&gt; Attribute numLO
Definition: ReceiverRow.h:662
void spectralWindowIdFromText(const std::string &s)
ReceiverRow(ReceiverTable &table)
Create a ReceiverRow.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
asdmIDL::ReceiverRowIDL * toIDL() const
Return this row in the form of an IDL struct.
std::vector< NetSidebandMod::NetSideband > sidebandLO
===&gt; Attribute sidebandLO
Definition: ReceiverRow.h:706
void receiverIdFromText(const std::string &s)
void setFreqLO(std::vector< Frequency > freqLO)
Set freqLO with the specified std::vector&lt;Frequency &gt;.
void frequencyBandFromText(const std::string &s)
ReceiverSidebandMod::ReceiverSideband getReceiverSideband() const
===&gt; Attribute receiverSideband
void setName(std::string name)
Set name with the specified std::string.
ReceiverTable & table
The table to which this row belongs.
Definition: ReceiverRow.h:569
int getNumLO() const
===&gt; Attribute numLO
void freqLOFromText(const std::string &s)
void setSidebandLO(std::vector< NetSidebandMod::NetSideband > sidebandLO)
Set sidebandLO with the specified std::vector&lt;NetSidebandMod::NetSideband &gt;.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void setFromIDL(asdmIDL::ReceiverRowIDL x)
Fill the values of this row from the IDL struct ReceiverRowIDL.
std::string name
===&gt; Attribute name
Definition: ReceiverRow.h:651
std::vector< NetSidebandMod::NetSideband > getSidebandLO() const
===&gt; Attribute sidebandLO
void freqLOFromBin(EndianIStream &eis)
virtual ~ReceiverRow()
friend class asdm::TableStreamReader&lt;ReceiverTable, ReceiverRow&gt;;
ReceiverBandMod::ReceiverBand getFrequencyBand() const
===&gt; Attribute frequencyBand
void(ReceiverRow::* ReceiverAttributeFromBin)(EndianIStream &eis)
Definition: ReceiverRow.h:110
std::vector< Frequency > getFreqLO() const
===&gt; Attribute freqLO
ReceiverSidebandMod::ReceiverSideband receiverSideband
===&gt; Attribute receiverSideband
Definition: ReceiverRow.h:695
void receiverSidebandFromBin(EndianIStream &eis)
The ReceiverTable class is an Alma table.
void nameFromText(const std::string &s)
void setReceiverSideband(ReceiverSidebandMod::ReceiverSideband receiverSideband)
Set receiverSideband with the specified ReceiverSidebandMod::ReceiverSideband.
ReceiverBandMod::ReceiverBand frequencyBand
===&gt; Attribute frequencyBand
Definition: ReceiverRow.h:673
ReceiverTable & getTable() const
Return the table to which this row belongs.
void numLOFromBin(EndianIStream &eis)
void spectralWindowIdFromBin(EndianIStream &eis)
void(ReceiverRow::* ReceiverAttributeFromText)(const std::string &s)
Definition: ReceiverRow.h:111
*text deserialization material std::map< std::string, ReceiverAttributeFromText > fromTextMethods
Definition: ReceiverRow.h:760
void setNumLO(int numLO)
Set numLO with the specified int.
ArrayTimeInterval timeInterval
===&gt; Attribute timeInterval
Definition: ReceiverRow.h:640
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void receiverSidebandFromText(const std::string &s)
bool compareRequiredValue(std::string name, int numLO, ReceiverBandMod::ReceiverBand frequencyBand, std::vector< Frequency > freqLO, ReceiverSidebandMod::ReceiverSideband receiverSideband, std::vector< NetSidebandMod::NetSideband > sidebandLO)
Compare each mandatory value (i.e.
Links *SpectralWindowRow * getSpectralWindowUsingSpectralWindowId()
spectralWindowId pointer to the row in the SpectralWindow table having SpectralWindow.spectralWindowId == spectralWindowId
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: ReceiverRow.h:573
void timeIntervalFromText(const std::string &s)
void nameFromBin(EndianIStream &eis)
Links *binary deserialization material from an EndianIStream std::map< std::string, ReceiverAttributeFromBin > fromBinMethods
Definition: ReceiverRow.h:743
void receiverIdFromBin(EndianIStream &eis)
bool isAdded() const
Has this row been added to its table ?
void setTimeInterval(ArrayTimeInterval timeInterval)
Set timeInterval with the specified ArrayTimeInterval.
ArrayTimeInterval getTimeInterval() const
===&gt; Attribute timeInterval
void sidebandLOFromBin(EndianIStream &eis)
void setSpectralWindowId(Tag spectralWindowId)
Set spectralWindowId with the specified Tag.
The SpectralWindowRow class is a row of a SpectralWindowTable.
std::string getName() const
===&gt; Attribute name
void setReceiverId(int receiverId)
Set receiverId with the specified int value.
void setFrequencyBand(ReceiverBandMod::ReceiverBand frequencyBand)
Set frequencyBand with the specified ReceiverBandMod::ReceiverBand.
std::vector< Frequency > freqLO
===&gt; Attribute freqLO
Definition: ReceiverRow.h:684
std::string toXML() const
Return this row in the form of an XML string.
void frequencyBandFromBin(EndianIStream &eis)
bool equalByRequiredValue(ReceiverRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void timeIntervalFromBin(EndianIStream &eis)