casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ScaleRow.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 ScaleRow.h
32  */
33 
34 #ifndef ScaleRow_CLASS
35 #define ScaleRow_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 
61 
62 
63 
65 
66 
67 
69 
70 
71 
73 
74 
75 
76 
78 #include <alma/ASDM/NoSuchRow.h>
80 
82 //#include <alma/ASDM/TableStreamReader.h>
83 
84 /*\file Scale.h
85  \brief Generated from model's revision "-1", branch ""
86 */
87 
88 namespace asdm {
89 
90 //class asdm::ScaleTable;
91 
92 
93 
94 class ScaleRow;
96 typedef void (ScaleRow::*ScaleAttributeFromText) (const std::string& s);
97 
104 class ScaleRow {
105 friend class asdm::ScaleTable;
107 //friend class asdm::TableStreamReader<ScaleTable, ScaleRow>;
108 
109 public:
110 
111  virtual ~ScaleRow();
112 
116  ScaleTable &getTable() const;
117 
122  bool isAdded() const;
123 
125  // Intrinsic Table Attributes //
127 
128 
129  // ===> Attribute scaleId
130 
131 
132 
133 
134 
139  Tag getScaleId() const;
140 
141 
142 
143 
144 
145 
146 
147 
148 
149  // ===> Attribute timeScale
150 
151 
152 
153 
154 
159  TimeScaleMod::TimeScale getTimeScale() const;
160 
161 
162 
163 
171  void setTimeScale (TimeScaleMod::TimeScale timeScale);
172 
173 
174 
175 
176 
177 
178 
179  // ===> Attribute crossDataScale
180 
181 
182 
183 
184 
189  DataScaleMod::DataScale getCrossDataScale() const;
190 
191 
192 
193 
201  void setCrossDataScale (DataScaleMod::DataScale crossDataScale);
202 
203 
204 
205 
206 
207 
208 
209  // ===> Attribute autoDataScale
210 
211 
212 
213 
214 
219  DataScaleMod::DataScale getAutoDataScale() const;
220 
221 
222 
223 
231  void setAutoDataScale (DataScaleMod::DataScale autoDataScale);
232 
233 
234 
235 
236 
237 
238 
239  // ===> Attribute weightType
240 
241 
242 
243 
244 
249  WeightTypeMod::WeightType getWeightType() const;
250 
251 
252 
253 
261  void setWeightType (WeightTypeMod::WeightType weightType);
262 
263 
264 
265 
266 
267 
269  // Extrinsic Table Attributes //
271 
273  // Links //
275 
276 
277 
278 
292  bool compareNoAutoInc(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType);
293 
294 
295 
296 
310  bool compareRequiredValue(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType);
311 
312 
321  bool equalByRequiredValue(ScaleRow* x) ;
322 
323 #ifndef WITHOUT_ACS
324 
328  asdmIDL::ScaleRowIDL *toIDL() const;
329 
337  void toIDL(asdmIDL::ScaleRowIDL& x) const;
338 #endif
339 
340 #ifndef WITHOUT_ACS
341 
346  void setFromIDL (asdmIDL::ScaleRowIDL x) ;
347 #endif
348 
353  std::string toXML() const;
354 
361  void setFromXML (std::string rowDoc) ;
362 
365  // binary-deserialization material from an EndianIStream //
367 
368  std::map<std::string, ScaleAttributeFromBin> fromBinMethods;
369 void scaleIdFromBin( EndianIStream& eis);
370 void timeScaleFromBin( EndianIStream& eis);
373 void weightTypeFromBin( EndianIStream& eis);
374 
375 
376 
384  static ScaleRow* fromBin(EndianIStream& eis, ScaleTable& table, const std::vector<std::string>& attributesSeq);
385 
392  void fromText(const std::string& attributeName, const std::string& t);
394 
395 private:
404 
405  // This method is used by the Table class when this row is added to the table.
406  void isAdded(bool added);
407 
408 
418 
437 
439  // Intrinsic Table Attributes //
441 
442 
443  // ===> Attribute scaleId
444 
445 
446 
447  Tag scaleId;
448 
449 
450 
451 
461  void setScaleId (Tag scaleId);
462 
463 
464 
465 
466  // ===> Attribute timeScale
467 
468 
469 
470  TimeScaleMod::TimeScale timeScale;
471 
472 
473 
474 
475 
476 
477  // ===> Attribute crossDataScale
478 
479 
480 
481  DataScaleMod::DataScale crossDataScale;
482 
483 
484 
485 
486 
487 
488  // ===> Attribute autoDataScale
489 
490 
491 
492  DataScaleMod::DataScale autoDataScale;
493 
494 
495 
496 
497 
498 
499  // ===> Attribute weightType
500 
501 
502 
503  WeightTypeMod::WeightType weightType;
504 
505 
506 
507 
508 
510  // Extrinsic Table Attributes //
512 
514  // Links //
516 
517 
518 /*
520  // binary-deserialization material from an EndianIStream //
522  std::map<std::string, ScaleAttributeFromBin> fromBinMethods;
523 void scaleIdFromBin( EndianIStream& eis);
524 void timeScaleFromBin( EndianIStream& eis);
525 void crossDataScaleFromBin( EndianIStream& eis);
526 void autoDataScaleFromBin( EndianIStream& eis);
527 void weightTypeFromBin( EndianIStream& eis);
528 
529 
530 */
531 
533  // text-deserialization material //
535  std::map<std::string, ScaleAttributeFromText> fromTextMethods;
536 
537 void scaleIdFromText (const std::string & s);
538 
539 
540 void timeScaleFromText (const std::string & s);
541 
542 
543 void crossDataScaleFromText (const std::string & s);
544 
545 
546 void autoDataScaleFromText (const std::string & s);
547 
548 
549 void weightTypeFromText (const std::string & s);
550 
551 
552 
553 
558  void toBin(EndianOSStream& eoss);
559 
569 };
570 
571 } // End namespace asdm
572 
573 #endif /* Scale_CLASS */
void weightTypeFromBin(EndianIStream &eis)
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
bool equalByRequiredValue(ScaleRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void(ScaleRow::* ScaleAttributeFromBin)(EndianIStream &eis)
Definition: ScaleRow.h:95
ScaleTable & table
The table to which this row belongs.
Definition: ScaleRow.h:399
void timeScaleFromBin(EndianIStream &eis)
WeightTypeMod::WeightType weightType
===&gt; Attribute weightType
Definition: ScaleRow.h:503
DataScaleMod::DataScale crossDataScale
===&gt; Attribute crossDataScale
Definition: ScaleRow.h:481
virtual ~ScaleRow()
friend class asdm::TableStreamReader&lt;ScaleTable, ScaleRow&gt;;
asdmIDL::ScaleRowIDL * toIDL() const
Return this row in the form of an IDL struct.
std::string toXML() const
Return this row in the form of an XML string.
void timeScaleFromText(const std::string &s)
ScaleTable & getTable() const
Return the table to which this row belongs.
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, ScaleAttributeFromBin > fromBinMethods
Definition: ScaleRow.h:522
The ScaleTable class is an Alma table.
Definition: ScaleTable.h:153
The ScaleRow class is a row of a ScaleTable.
Definition: ScaleRow.h:104
DataScaleMod::DataScale getCrossDataScale() const
===&gt; Attribute crossDataScale
void(ScaleRow::* ScaleAttributeFromText)(const std::string &s)
Definition: ScaleRow.h:96
*text deserialization material std::map< std::string, ScaleAttributeFromText > fromTextMethods
Definition: ScaleRow.h:535
Extrinsic Table Attributes Links *bool compareNoAutoInc(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType)
Compare each mandatory attribute except the autoincrementable one of this ScaleRow with the correspon...
void autoDataScaleFromText(const std::string &s)
void autoDataScaleFromBin(EndianIStream &eis)
void setFromIDL(asdmIDL::ScaleRowIDL x)
Fill the values of this row from the IDL struct ScaleRowIDL.
void setTimeScale(TimeScaleMod::TimeScale timeScale)
Set timeScale with the specified TimeScaleMod::TimeScale.
void crossDataScaleFromBin(EndianIStream &eis)
bool isAdded() const
Has this row been added to its table ?
void setCrossDataScale(DataScaleMod::DataScale crossDataScale)
Set crossDataScale with the specified DataScaleMod::DataScale.
void weightTypeFromText(const std::string &s)
TimeScaleMod::TimeScale timeScale
===&gt; Attribute timeScale
Definition: ScaleRow.h:470
void crossDataScaleFromText(const std::string &s)
void setScaleId(Tag scaleId)
Set scaleId with the specified Tag value.
void setAutoDataScale(DataScaleMod::DataScale autoDataScale)
Set autoDataScale with the specified DataScaleMod::DataScale.
void scaleIdFromText(const std::string &s)
DataScaleMod::DataScale getAutoDataScale() const
===&gt; Attribute autoDataScale
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
WeightTypeMod::WeightType getWeightType() const
===&gt; Attribute weightType
bool compareRequiredValue(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType)
Compare each mandatory value (i.e.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: ScaleRow.h:403
ScaleRow(ScaleTable &table)
Create a ScaleRow.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
TimeScaleMod::TimeScale getTimeScale() const
===&gt; Attribute timeScale
void setWeightType(WeightTypeMod::WeightType weightType)
Set weightType with the specified WeightTypeMod::WeightType.
void scaleIdFromBin(EndianIStream &eis)
DataScaleMod::DataScale autoDataScale
===&gt; Attribute autoDataScale
Definition: ScaleRow.h:492