casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DopplerRow.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 DopplerRow.h
32  */
33 
34 #ifndef DopplerRow_CLASS
35 #define DopplerRow_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 
52 
53 
54 
55 
56 
57 
59 
60 
61 
62 
64 #include <alma/ASDM/NoSuchRow.h>
66 
68 //#include <alma/ASDM/TableStreamReader.h>
69 
70 /*\file Doppler.h
71  \brief Generated from model's revision "-1", branch ""
72 */
73 
74 namespace asdm {
75 
76 //class asdm::DopplerTable;
77 
78 
79 // class asdm::SourceRow;
80 class SourceRow;
81 
82 
83 class DopplerRow;
85 typedef void (DopplerRow::*DopplerAttributeFromText) (const std::string& s);
86 
93 class DopplerRow {
94 friend class asdm::DopplerTable;
96 //friend class asdm::TableStreamReader<DopplerTable, DopplerRow>;
97 
98 public:
99 
100  virtual ~DopplerRow();
101 
105  DopplerTable &getTable() const;
106 
111  bool isAdded() const;
112 
114  // Intrinsic Table Attributes //
116 
117 
118  // ===> Attribute dopplerId
119 
120 
121 
122 
123 
128  int getDopplerId() const;
129 
130 
131 
132 
133 
134 
135 
136 
137 
138  // ===> Attribute transitionIndex
139 
140 
141 
142 
143 
148  int getTransitionIndex() const;
149 
150 
151 
152 
161 
162 
163 
164 
165 
166 
167 
168  // ===> Attribute velDef
169 
170 
171 
172 
173 
178  DopplerReferenceCodeMod::DopplerReferenceCode getVelDef() const;
179 
180 
181 
182 
190  void setVelDef (DopplerReferenceCodeMod::DopplerReferenceCode velDef);
191 
192 
193 
194 
195 
196 
198  // Extrinsic Table Attributes //
200 
201 
202  // ===> Attribute sourceId
203 
204 
205 
206 
207 
212  int getSourceId() const;
213 
214 
215 
216 
226  void setSourceId (int sourceId);
227 
228 
229 
230 
231 
232 
234  // Links //
236 
237 
238 
239 
240 
241  // ===> Slice link from a row of Doppler table to a collection of row of Source table.
242 
248  std::vector <SourceRow *> getSources();
249 
250 
251 
252 
253 
254 
255 
256 
268  bool compareNoAutoInc(int sourceId, int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef);
269 
270 
271 
272 
282  bool compareRequiredValue(int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef);
283 
284 
294 
295 #ifndef WITHOUT_ACS
296 
300  asdmIDL::DopplerRowIDL *toIDL() const;
301 
309  void toIDL(asdmIDL::DopplerRowIDL& x) const;
310 #endif
311 
312 #ifndef WITHOUT_ACS
313 
318  void setFromIDL (asdmIDL::DopplerRowIDL x) ;
319 #endif
320 
325  std::string toXML() const;
326 
333  void setFromXML (std::string rowDoc) ;
334 
337  // binary-deserialization material from an EndianIStream //
339 
340  std::map<std::string, DopplerAttributeFromBin> fromBinMethods;
341 void dopplerIdFromBin( EndianIStream& eis);
342 void sourceIdFromBin( EndianIStream& eis);
344 void velDefFromBin( EndianIStream& eis);
345 
346 
347 
355  static DopplerRow* fromBin(EndianIStream& eis, DopplerTable& table, const std::vector<std::string>& attributesSeq);
356 
363  void fromText(const std::string& attributeName, const std::string& t);
365 
366 private:
375 
376  // This method is used by the Table class when this row is added to the table.
377  void isAdded(bool added);
378 
379 
389 
408 
410  // Intrinsic Table Attributes //
412 
413 
414  // ===> Attribute dopplerId
415 
416 
417 
418  int dopplerId;
419 
420 
421 
422 
432  void setDopplerId (int dopplerId);
433 
434 
435 
436 
437  // ===> Attribute transitionIndex
438 
439 
440 
442 
443 
444 
445 
446 
447 
448  // ===> Attribute velDef
449 
450 
451 
452  DopplerReferenceCodeMod::DopplerReferenceCode velDef;
453 
454 
455 
456 
457 
459  // Extrinsic Table Attributes //
461 
462 
463  // ===> Attribute sourceId
464 
465 
466 
467  int sourceId;
468 
469 
470 
471 
472 
474  // Links //
476 
477 
478 
479 
480 
481 
482 
483 
484 /*
486  // binary-deserialization material from an EndianIStream //
488  std::map<std::string, DopplerAttributeFromBin> fromBinMethods;
489 void dopplerIdFromBin( EndianIStream& eis);
490 void sourceIdFromBin( EndianIStream& eis);
491 void transitionIndexFromBin( EndianIStream& eis);
492 void velDefFromBin( EndianIStream& eis);
493 
494 
495 */
496 
498  // text-deserialization material //
500  std::map<std::string, DopplerAttributeFromText> fromTextMethods;
501 
502 void dopplerIdFromText (const std::string & s);
503 
504 
505 void sourceIdFromText (const std::string & s);
506 
507 
508 void transitionIndexFromText (const std::string & s);
509 
510 
511 void velDefFromText (const std::string & s);
512 
513 
514 
515 
520  void toBin(EndianOSStream& eoss);
521 
531 };
532 
533 } // End namespace asdm
534 
535 #endif /* Doppler_CLASS */
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void sourceIdFromBin(EndianIStream &eis)
asdmIDL::DopplerRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void dopplerIdFromBin(EndianIStream &eis)
DopplerRow(DopplerTable &table)
Create a DopplerRow.
DopplerTable & table
The table to which this row belongs.
Definition: DopplerRow.h:370
void setVelDef(DopplerReferenceCodeMod::DopplerReferenceCode velDef)
Set velDef with the specified DopplerReferenceCodeMod::DopplerReferenceCode.
The DopplerRow class is a row of a DopplerTable.
Definition: DopplerRow.h:93
bool compareNoAutoInc(int sourceId, int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef)
Compare each mandatory attribute except the autoincrementable one of this DopplerRow with the corresp...
void(DopplerRow::* DopplerAttributeFromText)(const std::string &s)
Definition: DopplerRow.h:85
void sourceIdFromText(const std::string &s)
void setSourceId(int sourceId)
Set sourceId with the specified int.
DopplerTable & getTable() const
Return the table to which this row belongs.
DopplerReferenceCodeMod::DopplerReferenceCode velDef
===&gt; Attribute velDef
Definition: DopplerRow.h:452
void setFromIDL(asdmIDL::DopplerRowIDL x)
Fill the values of this row from the IDL struct DopplerRowIDL.
void velDefFromText(const std::string &s)
int transitionIndex
===&gt; Attribute transitionIndex
Definition: DopplerRow.h:441
virtual ~DopplerRow()
friend class asdm::TableStreamReader&lt;DopplerTable, DopplerRow&gt;;
void setDopplerId(int dopplerId)
Set dopplerId with the specified int value.
DopplerReferenceCodeMod::DopplerReferenceCode getVelDef() const
===&gt; Attribute velDef
bool equalByRequiredValue(DopplerRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
bool compareRequiredValue(int transitionIndex, DopplerReferenceCodeMod::DopplerReferenceCode velDef)
Compare each mandatory value (i.e.
void transitionIndexFromText(const std::string &s)
Links *binary deserialization material from an EndianIStream std::map< std::string, DopplerAttributeFromBin > fromBinMethods
Definition: DopplerRow.h:488
void velDefFromBin(EndianIStream &eis)
void dopplerIdFromText(const std::string &s)
int getTransitionIndex() const
===&gt; Attribute transitionIndex
*text deserialization material std::map< std::string, DopplerAttributeFromText > fromTextMethods
Definition: DopplerRow.h:500
std::string toXML() const
Return this row in the form of an XML string.
void setTransitionIndex(int transitionIndex)
Set transitionIndex with the specified int.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: DopplerRow.h:374
The DopplerTable class is an Alma table.
Definition: DopplerTable.h:134
bool isAdded() const
Has this row been added to its table ?
void(DopplerRow::* DopplerAttributeFromBin)(EndianIStream &eis)
Definition: DopplerRow.h:84
void transitionIndexFromBin(EndianIStream &eis)