casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SwitchCycleRow.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 SwitchCycleRow.h
32  */
33 
34 #ifndef SwitchCycleRow_CLASS
35 #define SwitchCycleRow_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/Frequency.h>
60 
61 
62 
63 #include <alma/ASDM/Tag.h>
64 
65 
66 
67 #include <alma/ASDM/Interval.h>
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
87 
88 
89 
90 
91 
92 
94 #include <alma/ASDM/NoSuchRow.h>
96 
98 //#include <alma/ASDM/TableStreamReader.h>
99 
100 /*\file SwitchCycle.h
101  \brief Generated from model's revision "-1", branch ""
102 */
103 
104 namespace asdm {
105 
106 //class asdm::SwitchCycleTable;
107 
108 
109 
110 class SwitchCycleRow;
112 typedef void (SwitchCycleRow::*SwitchCycleAttributeFromText) (const std::string& s);
113 
123 //friend class asdm::TableStreamReader<SwitchCycleTable, SwitchCycleRow>;
124 
125 public:
126 
127  virtual ~SwitchCycleRow();
128 
132  SwitchCycleTable &getTable() const;
133 
138  bool isAdded() const;
139 
141  // Intrinsic Table Attributes //
143 
144 
145  // ===> Attribute switchCycleId
146 
147 
148 
149 
150 
155  Tag getSwitchCycleId() const;
156 
157 
158 
159 
160 
161 
162 
163 
164 
165  // ===> Attribute numStep
166 
167 
168 
169 
170 
175  int getNumStep() const;
176 
177 
178 
179 
187  void setNumStep (int numStep);
188 
189 
190 
191 
192 
193 
194 
195  // ===> Attribute weightArray
196 
197 
198 
199 
200 
205  std::vector<float > getWeightArray() const;
206 
207 
208 
209 
217  void setWeightArray (std::vector<float > weightArray);
218 
219 
220 
221 
222 
223 
224 
225  // ===> Attribute dirOffsetArray
226 
227 
228 
229 
230 
235  std::vector<std::vector<Angle > > getDirOffsetArray() const;
236 
237 
238 
239 
247  void setDirOffsetArray (std::vector<std::vector<Angle > > dirOffsetArray);
248 
249 
250 
251 
252 
253 
254 
255  // ===> Attribute freqOffsetArray
256 
257 
258 
259 
260 
265  std::vector<Frequency > getFreqOffsetArray() const;
266 
267 
268 
269 
277  void setFreqOffsetArray (std::vector<Frequency > freqOffsetArray);
278 
279 
280 
281 
282 
283 
284 
285  // ===> Attribute stepDurationArray
286 
287 
288 
289 
290 
295  std::vector<Interval > getStepDurationArray() const;
296 
297 
298 
299 
307  void setStepDurationArray (std::vector<Interval > stepDurationArray);
308 
309 
310 
311 
312 
313 
314 
315  // ===> Attribute directionCode, which is optional
316 
317 
318 
323  bool isDirectionCodeExists() const;
324 
325 
326 
332  DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const;
333 
334 
335 
336 
343  void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode);
344 
345 
346 
347 
351  void clearDirectionCode ();
352 
353 
354 
355 
356  // ===> Attribute directionEquinox, which is optional
357 
358 
359 
364  bool isDirectionEquinoxExists() const;
365 
366 
367 
374 
375 
376 
377 
385 
386 
387 
388 
392  void clearDirectionEquinox ();
393 
394 
395 
397  // Extrinsic Table Attributes //
399 
401  // Links //
403 
404 
405 
406 
422  bool compareNoAutoInc(int numStep, std::vector<float > weightArray, std::vector<std::vector<Angle > > dirOffsetArray, std::vector<Frequency > freqOffsetArray, std::vector<Interval > stepDurationArray);
423 
424 
425 
426 
442  bool compareRequiredValue(int numStep, std::vector<float > weightArray, std::vector<std::vector<Angle > > dirOffsetArray, std::vector<Frequency > freqOffsetArray, std::vector<Interval > stepDurationArray);
443 
444 
454 
455 #ifndef WITHOUT_ACS
456 
460  asdmIDL::SwitchCycleRowIDL *toIDL() const;
461 
469  void toIDL(asdmIDL::SwitchCycleRowIDL& x) const;
470 #endif
471 
472 #ifndef WITHOUT_ACS
473 
478  void setFromIDL (asdmIDL::SwitchCycleRowIDL x) ;
479 #endif
480 
485  std::string toXML() const;
486 
493  void setFromXML (std::string rowDoc) ;
494 
497  // binary-deserialization material from an EndianIStream //
499 
500  std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods;
502 void numStepFromBin( EndianIStream& eis);
507 
510 
511 
519  static SwitchCycleRow* fromBin(EndianIStream& eis, SwitchCycleTable& table, const std::vector<std::string>& attributesSeq);
520 
527  void fromText(const std::string& attributeName, const std::string& t);
529 
530 private:
539 
540  // This method is used by the Table class when this row is added to the table.
541  void isAdded(bool added);
542 
543 
553 
572 
574  // Intrinsic Table Attributes //
576 
577 
578  // ===> Attribute switchCycleId
579 
580 
581 
582  Tag switchCycleId;
583 
584 
585 
586 
596  void setSwitchCycleId (Tag switchCycleId);
597 
598 
599 
600 
601  // ===> Attribute numStep
602 
603 
604 
605  int numStep;
606 
607 
608 
609 
610 
611 
612  // ===> Attribute weightArray
613 
614 
615 
616  std::vector<float > weightArray;
617 
618 
619 
620 
621 
622 
623  // ===> Attribute dirOffsetArray
624 
625 
626 
627  std::vector<std::vector<Angle > > dirOffsetArray;
628 
629 
630 
631 
632 
633 
634  // ===> Attribute freqOffsetArray
635 
636 
637 
638  std::vector<Frequency > freqOffsetArray;
639 
640 
641 
642 
643 
644 
645  // ===> Attribute stepDurationArray
646 
647 
648 
649  std::vector<Interval > stepDurationArray;
650 
651 
652 
653 
654 
655 
656  // ===> Attribute directionCode, which is optional
657 
658 
660 
661 
662  DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
663 
664 
665 
666 
667 
668 
669  // ===> Attribute directionEquinox, which is optional
670 
671 
673 
674 
676 
677 
678 
679 
680 
682  // Extrinsic Table Attributes //
684 
686  // Links //
688 
689 
690 /*
692  // binary-deserialization material from an EndianIStream //
694  std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods;
695 void switchCycleIdFromBin( EndianIStream& eis);
696 void numStepFromBin( EndianIStream& eis);
697 void weightArrayFromBin( EndianIStream& eis);
698 void dirOffsetArrayFromBin( EndianIStream& eis);
699 void freqOffsetArrayFromBin( EndianIStream& eis);
700 void stepDurationArrayFromBin( EndianIStream& eis);
701 
702 void directionCodeFromBin( EndianIStream& eis);
703 void directionEquinoxFromBin( EndianIStream& eis);
704 
705 */
706 
708  // text-deserialization material //
710  std::map<std::string, SwitchCycleAttributeFromText> fromTextMethods;
711 
712 void switchCycleIdFromText (const std::string & s);
713 
714 
715 void numStepFromText (const std::string & s);
716 
717 
718 void weightArrayFromText (const std::string & s);
719 
720 
721 void dirOffsetArrayFromText (const std::string & s);
722 
723 
724 void freqOffsetArrayFromText (const std::string & s);
725 
726 
727 void stepDurationArrayFromText (const std::string & s);
728 
729 
730 
731 void directionCodeFromText (const std::string & s);
732 
733 
734 void directionEquinoxFromText (const std::string & s);
735 
736 
737 
742  void toBin(EndianOSStream& eoss);
743 
753 };
754 
755 } // End namespace asdm
756 
757 #endif /* SwitchCycle_CLASS */
ArrayTime getDirectionEquinox() const
Get directionEquinox, which is optional.
void clearDirectionCode()
Mark directionCode, which is an optional field, as non-existent.
void(SwitchCycleRow::* SwitchCycleAttributeFromText)(const std::string &s)
bool compareRequiredValue(int numStep, std::vector< float > weightArray, std::vector< std::vector< Angle > > dirOffsetArray, std::vector< Frequency > freqOffsetArray, std::vector< Interval > stepDurationArray)
Compare each mandatory value (i.e.
virtual ~SwitchCycleRow()
friend class asdm::TableStreamReader&lt;SwitchCycleTable, SwitchCycleRow&gt;;
void weightArrayFromText(const std::string &s)
std::vector< Interval > stepDurationArray
===&gt; Attribute stepDurationArray
asdmIDL::SwitchCycleRowIDL * toIDL() const
Return this row in the form of an IDL struct.
bool isAdded() const
Has this row been added to its table ?
void directionCodeFromText(const std::string &s)
std::vector< float > getWeightArray() const
===&gt; Attribute weightArray
void setSwitchCycleId(Tag switchCycleId)
Set switchCycleId with the specified Tag value.
void weightArrayFromBin(EndianIStream &eis)
void directionEquinoxFromBin(EndianIStream &eis)
void switchCycleIdFromBin(EndianIStream &eis)
void setStepDurationArray(std::vector< Interval > stepDurationArray)
Set stepDurationArray with the specified std::vector&lt;Interval &gt;.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void switchCycleIdFromText(const std::string &s)
void numStepFromText(const std::string &s)
void dirOffsetArrayFromText(const std::string &s)
void numStepFromBin(EndianIStream &eis)
std::string toXML() const
Return this row in the form of an XML string.
The SwitchCycleRow class is a row of a SwitchCycleTable.
std::vector< Interval > getStepDurationArray() const
===&gt; Attribute stepDurationArray
SwitchCycleTable & table
The table to which this row belongs.
SwitchCycleRow(SwitchCycleTable &table)
Create a SwitchCycleRow.
int getNumStep() const
===&gt; Attribute numStep
*text deserialization material std::map< std::string, SwitchCycleAttributeFromText > fromTextMethods
bool isDirectionCodeExists() const
===&gt; Attribute directionCode, which is optional
void setDirOffsetArray(std::vector< std::vector< Angle > > dirOffsetArray)
Set dirOffsetArray with the specified std::vector&lt;std::vector&lt;Angle &gt; &gt;.
The SwitchCycleTable class is an Alma table.
bool hasBeenAdded
Whether this row has been added to the table or not.
void clearDirectionEquinox()
Mark directionEquinox, which is an optional field, as non-existent.
void(SwitchCycleRow::* SwitchCycleAttributeFromBin)(EndianIStream &eis)
bool directionEquinoxExists
===&gt; Attribute directionEquinox, which is optional
void setDirectionCode(DirectionReferenceCodeMod::DirectionReferenceCode directionCode)
Set directionCode with the specified DirectionReferenceCodeMod::DirectionReferenceCode.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
int numStep
===&gt; Attribute numStep
void directionEquinoxFromText(const std::string &s)
void dirOffsetArrayFromBin(EndianIStream &eis)
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void setDirectionEquinox(ArrayTime directionEquinox)
Set directionEquinox with the specified ArrayTime.
std::vector< float > weightArray
===&gt; Attribute weightArray
bool equalByRequiredValue(SwitchCycleRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
SwitchCycleTable & getTable() const
Return the table to which this row belongs.
void setNumStep(int numStep)
Set numStep with the specified int.
void directionCodeFromBin(EndianIStream &eis)
void stepDurationArrayFromText(const std::string &s)
bool directionCodeExists
===&gt; Attribute directionCode, which is optional
Extrinsic Table Attributes Links *bool compareNoAutoInc(int numStep, std::vector< float > weightArray, std::vector< std::vector< Angle > > dirOffsetArray, std::vector< Frequency > freqOffsetArray, std::vector< Interval > stepDurationArray)
Compare each mandatory attribute except the autoincrementable one of this SwitchCycleRow with the cor...
bool isDirectionEquinoxExists() const
===&gt; Attribute directionEquinox, which is optional
std::vector< std::vector< Angle > > getDirOffsetArray() const
===&gt; Attribute dirOffsetArray
void setFromIDL(asdmIDL::SwitchCycleRowIDL x)
Fill the values of this row from the IDL struct SwitchCycleRowIDL.
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, SwitchCycleAttributeFromBin > fromBinMethods
DirectionReferenceCodeMod::DirectionReferenceCode directionCode
DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const
Get directionCode, which is optional.
std::vector< Frequency > getFreqOffsetArray() const
===&gt; Attribute freqOffsetArray
std::vector< std::vector< Angle > > dirOffsetArray
===&gt; Attribute dirOffsetArray
void setWeightArray(std::vector< float > weightArray)
Set weightArray with the specified std::vector&lt;float &gt;.
void freqOffsetArrayFromBin(EndianIStream &eis)
void setFreqOffsetArray(std::vector< Frequency > freqOffsetArray)
Set freqOffsetArray with the specified std::vector&lt;Frequency &gt;.
void stepDurationArrayFromBin(EndianIStream &eis)
void freqOffsetArrayFromText(const std::string &s)
std::vector< Frequency > freqOffsetArray
===&gt; Attribute freqOffsetArray