casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PolarizationRow.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 PolarizationRow.h
32  */
33 
34 #ifndef PolarizationRow_CLASS
35 #define PolarizationRow_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 
61 
63 
64 
65 
67 
68 
69 
70 
72 #include <alma/ASDM/NoSuchRow.h>
74 
76 //#include <alma/ASDM/TableStreamReader.h>
77 
78 /*\file Polarization.h
79  \brief Generated from model's revision "-1", branch ""
80 */
81 
82 namespace asdm {
83 
84 //class asdm::PolarizationTable;
85 
86 
87 
88 class PolarizationRow;
90 typedef void (PolarizationRow::*PolarizationAttributeFromText) (const std::string& s);
91 
101 //friend class asdm::TableStreamReader<PolarizationTable, PolarizationRow>;
102 
103 public:
104 
105  virtual ~PolarizationRow();
106 
110  PolarizationTable &getTable() const;
111 
116  bool isAdded() const;
117 
119  // Intrinsic Table Attributes //
121 
122 
123  // ===> Attribute polarizationId
124 
125 
126 
127 
128 
133  Tag getPolarizationId() const;
134 
135 
136 
137 
138 
139 
140 
141 
142 
143  // ===> Attribute numCorr
144 
145 
146 
147 
148 
153  int getNumCorr() const;
154 
155 
156 
157 
165  void setNumCorr (int numCorr);
166 
167 
168 
169 
170 
171 
172 
173  // ===> Attribute corrType
174 
175 
176 
177 
178 
183  std::vector<StokesParameterMod::StokesParameter > getCorrType() const;
184 
185 
186 
187 
195  void setCorrType (std::vector<StokesParameterMod::StokesParameter > corrType);
196 
197 
198 
199 
200 
201 
202 
203  // ===> Attribute corrProduct
204 
205 
206 
207 
208 
213  std::vector<std::vector<PolarizationTypeMod::PolarizationType > > getCorrProduct() const;
214 
215 
216 
217 
225  void setCorrProduct (std::vector<std::vector<PolarizationTypeMod::PolarizationType > > corrProduct);
226 
227 
228 
229 
230 
231 
233  // Extrinsic Table Attributes //
235 
237  // Links //
239 
240 
241 
242 
254  bool compareNoAutoInc(int numCorr, std::vector<StokesParameterMod::StokesParameter > corrType, std::vector<std::vector<PolarizationTypeMod::PolarizationType > > corrProduct);
255 
256 
257 
258 
270  bool compareRequiredValue(int numCorr, std::vector<StokesParameterMod::StokesParameter > corrType, std::vector<std::vector<PolarizationTypeMod::PolarizationType > > corrProduct);
271 
272 
282 
283 #ifndef WITHOUT_ACS
284 
288  asdmIDL::PolarizationRowIDL *toIDL() const;
289 
297  void toIDL(asdmIDL::PolarizationRowIDL& x) const;
298 #endif
299 
300 #ifndef WITHOUT_ACS
301 
306  void setFromIDL (asdmIDL::PolarizationRowIDL x) ;
307 #endif
308 
313  std::string toXML() const;
314 
321  void setFromXML (std::string rowDoc) ;
322 
325  // binary-deserialization material from an EndianIStream //
327 
328  std::map<std::string, PolarizationAttributeFromBin> fromBinMethods;
330 void numCorrFromBin( EndianIStream& eis);
331 void corrTypeFromBin( EndianIStream& eis);
333 
334 
335 
343  static PolarizationRow* fromBin(EndianIStream& eis, PolarizationTable& table, const std::vector<std::string>& attributesSeq);
344 
351  void fromText(const std::string& attributeName, const std::string& t);
353 
354 private:
363 
364  // This method is used by the Table class when this row is added to the table.
365  void isAdded(bool added);
366 
367 
377 
396 
398  // Intrinsic Table Attributes //
400 
401 
402  // ===> Attribute polarizationId
403 
404 
405 
406  Tag polarizationId;
407 
408 
409 
410 
420  void setPolarizationId (Tag polarizationId);
421 
422 
423 
424 
425  // ===> Attribute numCorr
426 
427 
428 
429  int numCorr;
430 
431 
432 
433 
434 
435 
436  // ===> Attribute corrType
437 
438 
439 
440  std::vector<StokesParameterMod::StokesParameter > corrType;
441 
442 
443 
444 
445 
446 
447  // ===> Attribute corrProduct
448 
449 
450 
451  std::vector<std::vector<PolarizationTypeMod::PolarizationType > > corrProduct;
452 
453 
454 
455 
456 
458  // Extrinsic Table Attributes //
460 
462  // Links //
464 
465 
466 /*
468  // binary-deserialization material from an EndianIStream //
470  std::map<std::string, PolarizationAttributeFromBin> fromBinMethods;
471 void polarizationIdFromBin( EndianIStream& eis);
472 void numCorrFromBin( EndianIStream& eis);
473 void corrTypeFromBin( EndianIStream& eis);
474 void corrProductFromBin( EndianIStream& eis);
475 
476 
477 */
478 
480  // text-deserialization material //
482  std::map<std::string, PolarizationAttributeFromText> fromTextMethods;
483 
484 void polarizationIdFromText (const std::string & s);
485 
486 
487 void numCorrFromText (const std::string & s);
488 
489 
490 void corrTypeFromText (const std::string & s);
491 
492 
493 void corrProductFromText (const std::string & s);
494 
495 
496 
497 
502  void toBin(EndianOSStream& eoss);
503 
513 };
514 
515 } // End namespace asdm
516 
517 #endif /* Polarization_CLASS */
void(PolarizationRow::* PolarizationAttributeFromText)(const std::string &s)
bool hasBeenAdded
Whether this row has been added to the table or not.
void corrTypeFromText(const std::string &s)
void setNumCorr(int numCorr)
Set numCorr with the specified int.
void setCorrProduct(std::vector< std::vector< PolarizationTypeMod::PolarizationType > > corrProduct)
Set corrProduct with the specified std::vector&lt;std::vector&lt;PolarizationTypeMod::PolarizationType &gt; &gt;...
std::string toXML() const
Return this row in the form of an XML string.
void(PolarizationRow::* PolarizationAttributeFromBin)(EndianIStream &eis)
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void setFromIDL(asdmIDL::PolarizationRowIDL x)
Fill the values of this row from the IDL struct PolarizationRowIDL.
std::vector< std::vector< PolarizationTypeMod::PolarizationType > > corrProduct
===&gt; Attribute corrProduct
void corrTypeFromBin(EndianIStream &eis)
std::vector< StokesParameterMod::StokesParameter > getCorrType() const
===&gt; Attribute corrType
virtual ~PolarizationRow()
friend class asdm::TableStreamReader&lt;PolarizationTable, PolarizationRow&gt;;
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void corrProductFromBin(EndianIStream &eis)
void polarizationIdFromBin(EndianIStream &eis)
void corrProductFromText(const std::string &s)
std::vector< StokesParameterMod::StokesParameter > corrType
===&gt; Attribute corrType
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, PolarizationAttributeFromBin > fromBinMethods
int numCorr
===&gt; Attribute numCorr
std::vector< std::vector< PolarizationTypeMod::PolarizationType > > getCorrProduct() const
===&gt; Attribute corrProduct
int getNumCorr() const
===&gt; Attribute numCorr
void polarizationIdFromText(const std::string &s)
void numCorrFromBin(EndianIStream &eis)
PolarizationRow(PolarizationTable &table)
Create a PolarizationRow.
asdmIDL::PolarizationRowIDL * toIDL() const
Return this row in the form of an IDL struct.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void setPolarizationId(Tag polarizationId)
Set polarizationId with the specified Tag value.
void setCorrType(std::vector< StokesParameterMod::StokesParameter > corrType)
Set corrType with the specified std::vector&lt;StokesParameterMod::StokesParameter &gt;.
PolarizationTable & getTable() const
Return the table to which this row belongs.
PolarizationTable & table
The table to which this row belongs.
Extrinsic Table Attributes Links *bool compareNoAutoInc(int numCorr, std::vector< StokesParameterMod::StokesParameter > corrType, std::vector< std::vector< PolarizationTypeMod::PolarizationType > > corrProduct)
Compare each mandatory attribute except the autoincrementable one of this PolarizationRow with the co...
*text deserialization material std::map< std::string, PolarizationAttributeFromText > fromTextMethods
The PolarizationTable class is an Alma table.
The PolarizationRow class is a row of a PolarizationTable.
bool isAdded() const
Has this row been added to its table ?
bool compareRequiredValue(int numCorr, std::vector< StokesParameterMod::StokesParameter > corrType, std::vector< std::vector< PolarizationTypeMod::PolarizationType > > corrProduct)
Compare each mandatory value (i.e.
bool equalByRequiredValue(PolarizationRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void numCorrFromText(const std::string &s)