casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ObservationRow.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 ObservationRow.h
32  */
33 
34 #ifndef ObservationRow_CLASS
35 #define ObservationRow_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 Observation.h
69  \brief Generated from model's revision "-1", branch ""
70 */
71 
72 namespace asdm {
73 
74 //class asdm::ObservationTable;
75 
76 
77 
78 class ObservationRow;
80 typedef void (ObservationRow::*ObservationAttributeFromText) (const std::string& s);
81 
91 //friend class asdm::TableStreamReader<ObservationTable, ObservationRow>;
92 
93 public:
94 
95  virtual ~ObservationRow();
96 
100  ObservationTable &getTable() const;
101 
106  bool isAdded() const;
107 
109  // Intrinsic Table Attributes //
111 
112 
113  // ===> Attribute observationId
114 
115 
116 
117 
118 
123  Tag getObservationId() const;
124 
125 
126 
127 
128 
129 
130 
131 
133  // Extrinsic Table Attributes //
135 
137  // Links //
139 
140 
141 
142 
143 
144 
145 
155 
156 #ifndef WITHOUT_ACS
157 
161  asdmIDL::ObservationRowIDL *toIDL() const;
162 
170  void toIDL(asdmIDL::ObservationRowIDL& x) const;
171 #endif
172 
173 #ifndef WITHOUT_ACS
174 
179  void setFromIDL (asdmIDL::ObservationRowIDL x) ;
180 #endif
181 
186  std::string toXML() const;
187 
194  void setFromXML (std::string rowDoc) ;
195 
198  // binary-deserialization material from an EndianIStream //
200 
201  std::map<std::string, ObservationAttributeFromBin> fromBinMethods;
203 
204 
205 
213  static ObservationRow* fromBin(EndianIStream& eis, ObservationTable& table, const std::vector<std::string>& attributesSeq);
214 
221  void fromText(const std::string& attributeName, const std::string& t);
223 
224 private:
233 
234  // This method is used by the Table class when this row is added to the table.
235  void isAdded(bool added);
236 
237 
247 
266 
268  // Intrinsic Table Attributes //
270 
271 
272  // ===> Attribute observationId
273 
274 
275 
276  Tag observationId;
277 
278 
279 
280 
290  void setObservationId (Tag observationId);
291 
292 
293 
295  // Extrinsic Table Attributes //
297 
299  // Links //
301 
302 
303 /*
305  // binary-deserialization material from an EndianIStream //
307  std::map<std::string, ObservationAttributeFromBin> fromBinMethods;
308 void observationIdFromBin( EndianIStream& eis);
309 
310 
311 */
312 
314  // text-deserialization material //
316  std::map<std::string, ObservationAttributeFromText> fromTextMethods;
317 
318 void observationIdFromText (const std::string & s);
319 
320 
321 
322 
327  void toBin(EndianOSStream& eoss);
328 
338 };
339 
340 } // End namespace asdm
341 
342 #endif /* Observation_CLASS */
void(ObservationRow::* ObservationAttributeFromBin)(EndianIStream &eis)
*text deserialization material std::map< std::string, ObservationAttributeFromText > fromTextMethods
void setFromIDL(asdmIDL::ObservationRowIDL x)
Fill the values of this row from the IDL struct ObservationRowIDL.
void observationIdFromBin(EndianIStream &eis)
bool hasBeenAdded
Whether this row has been added to the table or not.
Extrinsic Table Attributes Links *bool equalByRequiredValue(ObservationRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
std::string toXML() const
Return this row in the form of an XML string.
void observationIdFromText(const std::string &s)
virtual ~ObservationRow()
friend class asdm::TableStreamReader&lt;ObservationTable, ObservationRow&gt;;
asdmIDL::ObservationRowIDL * toIDL() const
Return this row in the form of an IDL struct.
The ObservationTable class is an Alma table.
bool isAdded() const
Has this row been added to its table ?
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void setObservationId(Tag observationId)
Set observationId with the specified Tag value.
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.
ObservationRow(ObservationTable &table)
Create a ObservationRow.
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, ObservationAttributeFromBin > fromBinMethods
ObservationTable & getTable() const
Return the table to which this row belongs.
The ObservationRow class is a row of a ObservationTable.
void(ObservationRow::* ObservationAttributeFromText)(const std::string &s)
ObservationTable & table
The table to which this row belongs.