casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataDescriptionRow.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 DataDescriptionRow.h
32  */
33 
34 #ifndef DataDescriptionRow_CLASS
35 #define DataDescriptionRow_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/Tag.h>
52 
53 
54 
55 
56 
57 
58 
59 
60 
62 #include <alma/ASDM/NoSuchRow.h>
64 
66 //#include <alma/ASDM/TableStreamReader.h>
67 
68 /*\file DataDescription.h
69  \brief Generated from model's revision "1.62", branch "HEAD"
70 */
71 
72 namespace asdm {
73 
74 //class asdm::DataDescriptionTable;
75 
76 
77 // class asdm::PolarizationRow;
78 class PolarizationRow;
79 
80 // class asdm::HolographyRow;
81 class HolographyRow;
82 
83 // class asdm::SpectralWindowRow;
84 class SpectralWindowRow;
85 
86 // class asdm::PulsarRow;
87 class PulsarRow;
88 
89 class DataDescriptionRow;
91 typedef void (DataDescriptionRow::*DataDescriptionAttributeFromText) (const std::string& s);
92 
102 //friend class asdm::TableStreamReader<DataDescriptionTable, DataDescriptionRow>;
103 
104 public:
105 
106  virtual ~DataDescriptionRow();
107 
112 
117  bool isAdded() const;
118 
120  // Intrinsic Table Attributes //
122 
123 
124  // ===> Attribute dataDescriptionId
125 
126 
127 
128 
129 
134  Tag getDataDescriptionId() const;
135 
136 
137 
138 
139 
140 
141 
142 
144  // Extrinsic Table Attributes //
146 
147 
148  // ===> Attribute polOrHoloId
149 
150 
151 
152 
153 
158  Tag getPolOrHoloId() const;
159 
160 
161 
162 
170  void setPolOrHoloId (Tag polOrHoloId);
171 
172 
173 
174 
175 
176 
177 
178  // ===> Attribute spectralWindowId
179 
180 
181 
182 
183 
188  Tag getSpectralWindowId() const;
189 
190 
191 
192 
201 
202 
204  // Extrinsic Table Attributes //
206 
207 
208  // ===> Attribute pulsarId, which is optional
209 
214  bool isPulsarIdExists() const;
215 
216 
222  Tag getPulsarId() const;
223 
224 
229  void setPulsarId (Tag pulsarId);
230 
231 
235  void clearPulsarId ();
236 
237 
239  // Links //
241 
242 
243 
250 
257 
258 
265 
266 
274 
275 
276 
277 
287  bool compareNoAutoInc(Tag polOrHoloId, Tag spectralWindowId);
288 
289 
290 
291 
301  bool compareRequiredValue(Tag polOrHoloId, Tag spectralWindowId);
302 
303 
313 
314 #ifndef WITHOUT_ACS
315 
319  asdmIDL::DataDescriptionRowIDL *toIDL() const;
320 
328  void toIDL(asdmIDL::DataDescriptionRowIDL& x) const;
329 #endif
330 
331 #ifndef WITHOUT_ACS
332 
337  void setFromIDL (asdmIDL::DataDescriptionRowIDL x) ;
338 #endif
339 
344  std::string toXML() const;
345 
352  void setFromXML (std::string rowDoc) ;
353 
356  // binary-deserialization material from an EndianIStream //
358 
359  std::map<std::string, DataDescriptionAttributeFromBin> fromBinMethods;
363 void pulsarIdFromBin( EndianIStream& eis);
364 
365 
373  static DataDescriptionRow* fromBin(EndianIStream& eis, DataDescriptionTable& table, const std::vector<std::string>& attributesSeq);
374 
381  void fromText(const std::string& attributeName, const std::string& t);
383 
384 private:
393 
394  // This method is used by the Table class when this row is added to the table.
395  void isAdded(bool added);
396 
397 
407 
426 
428  // Intrinsic Table Attributes //
430 
431 
432  // ===> Attribute dataDescriptionId
433 
434 
435 
436  Tag dataDescriptionId;
437 
438 
439 
440 
450  void setDataDescriptionId (Tag dataDescriptionId);
451 
452 
453 
455  // Extrinsic Table Attributes //
457 
458 
459  // ===> Attribute polOrHoloId
460 
461 
462 
463  Tag polOrHoloId;
464 
465 
466 
467 
468 
469 
470  // ===> Attribute spectralWindowId
471 
472 
473 
475 
476 
477 
478 
479  // ===> Attribute pulsarId, which is optional
480 
481 
483 
485 
486 
488  // Links //
490 
491 
492 
493 
494 
495 
496 
497 
498 
499 
500 
501 
502 
503 
504 
505 
506 /*
508  // binary-deserialization material from an EndianIStream //
510  std::map<std::string, DataDescriptionAttributeFromBin> fromBinMethods;
511 void dataDescriptionIdFromBin( EndianIStream& eis);
512 void polOrHoloIdFromBin( EndianIStream& eis);
513 void spectralWindowIdFromBin( EndianIStream& eis);
514 void pulsarIdFromBin( EndianIStream& eis);
515 
516 
517 */
518 
520  // text-deserialization material //
522  std::map<std::string, DataDescriptionAttributeFromText> fromTextMethods;
523 
524 void dataDescriptionIdFromText (const std::string & s);
525 
526 
527 void polOrHoloIdFromText (const std::string & s);
528 
529 
530 void spectralWindowIdFromText (const std::string & s);
531 
532 void pulsarIdFromText (const std::string & s);
533 
534 
539  void toBin(EndianOSStream& eoss);
540 
550 };
551 
552 } // End namespace asdm
553 
554 #endif /* DataDescription_CLASS */
void setFromIDL(asdmIDL::DataDescriptionRowIDL x)
Fill the values of this row from the IDL struct DataDescriptionRowIDL.
*text deserialization material std::map< std::string, DataDescriptionAttributeFromText > fromTextMethods
bool hasBeenAdded
Whether this row has been added to the table or not.
void dataDescriptionIdFromBin(EndianIStream &eis)
Tag getSpectralWindowId() const
===&gt; Attribute spectralWindowId
Links *PolarizationRow * getPolarizationUsingPolOrHoloId()
Returns pointer to the row in the Polarization table having Polarization.polarizationId == polOrHoloI...
DataDescriptionRow(DataDescriptionTable &table)
Create a DataDescriptionRow.
void clearPulsarId()
Mark pulsarId, which is an optional field, as non-existent.
void polOrHoloIdFromBin(EndianIStream &eis)
void setPulsarId(Tag pulsarId)
Set pulsarId with the specified Tag.
The HolographyRow class is a row of a HolographyTable.
void pulsarIdFromText(const std::string &s)
Tag getPulsarId() const
Get pulsarId, which is optional.
DataDescriptionTable & getTable() const
Return the table to which this row belongs.
The DataDescriptionTable class is an Alma table.
PulsarRow * getPulsarUsingPulsarId()
pulsarId pointer to the row in the Pulsar table having Pulsar.pulsarId == pulsarId ...
void pulsarIdFromBin(EndianIStream &eis)
bool isAdded() const
Has this row been added to its table ?
void setPolOrHoloId(Tag polOrHoloId)
Set polOrHoloId with the specified Tag.
void(DataDescriptionRow::* DataDescriptionAttributeFromText)(const std::string &s)
bool compareRequiredValue(Tag polOrHoloId, Tag spectralWindowId)
Compare each mandatory value (i.e.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
Tag spectralWindowId
===&gt; Attribute spectralWindowId
void setDataDescriptionId(Tag dataDescriptionId)
Set dataDescriptionId with the specified Tag value.
asdmIDL::DataDescriptionRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void dataDescriptionIdFromText(const std::string &s)
void spectralWindowIdFromBin(EndianIStream &eis)
The PulsarRow class is a row of a PulsarTable.
Definition: PulsarRow.h:122
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
bool equalByRequiredValue(DataDescriptionRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
The DataDescriptionRow class is a row of a DataDescriptionTable.
bool compareNoAutoInc(Tag polOrHoloId, Tag spectralWindowId)
Compare each mandatory attribute except the autoincrementable one of this DataDescriptionRow with the...
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
SpectralWindowRow * getSpectralWindowUsingSpectralWindowId()
spectralWindowId pointer to the row in the SpectralWindow table having SpectralWindow.spectralWindowId == spectralWindowId
bool pulsarIdExists
===&gt; Attribute pulsarId, which is optional
The PolarizationRow class is a row of a PolarizationTable.
void polOrHoloIdFromText(const std::string &s)
void spectralWindowIdFromText(const std::string &s)
DataDescriptionTable & table
The table to which this row belongs.
The SpectralWindowRow class is a row of a SpectralWindowTable.
std::string toXML() const
Return this row in the form of an XML string.
Links *binary deserialization material from an EndianIStream std::map< std::string, DataDescriptionAttributeFromBin > fromBinMethods
virtual ~DataDescriptionRow()
friend class asdm::TableStreamReader&lt;DataDescriptionTable, DataDescriptionRow&gt;;
HolographyRow * getHolographyUsingPolOrHoloId()
Returns pointer to the row in the Holograpy table having Holography.holographyId == polOrHoloId...
void setSpectralWindowId(Tag spectralWindowId)
Set spectralWindowId with the specified Tag.
void(DataDescriptionRow::* DataDescriptionAttributeFromBin)(EndianIStream &eis)