casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProcessorRow.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 ProcessorRow.h
32  */
33 
34 #ifndef ProcessorRow_CLASS
35 #define ProcessorRow_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 Processor.h
79  \brief Generated from model's revision "-1", branch ""
80 */
81 
82 namespace asdm {
83 
84 //class asdm::ProcessorTable;
85 
86 
87 
88 class ProcessorRow;
90 typedef void (ProcessorRow::*ProcessorAttributeFromText) (const std::string& s);
91 
98 class ProcessorRow {
99 friend class asdm::ProcessorTable;
101 //friend class asdm::TableStreamReader<ProcessorTable, ProcessorRow>;
102 
103 public:
104 
105  virtual ~ProcessorRow();
106 
110  ProcessorTable &getTable() const;
111 
116  bool isAdded() const;
117 
119  // Intrinsic Table Attributes //
121 
122 
123  // ===> Attribute processorId
124 
125 
126 
127 
128 
133  Tag getProcessorId() const;
134 
135 
136 
137 
138 
139 
140 
141 
142 
143  // ===> Attribute modeId
144 
145 
146 
147 
148 
153  Tag getModeId() const;
154 
155 
156 
157 
165  void setModeId (Tag modeId);
166 
167 
168 
169 
170 
171 
172 
173  // ===> Attribute processorType
174 
175 
176 
177 
178 
183  ProcessorTypeMod::ProcessorType getProcessorType() const;
184 
185 
186 
187 
195  void setProcessorType (ProcessorTypeMod::ProcessorType processorType);
196 
197 
198 
199 
200 
201 
202 
203  // ===> Attribute processorSubType
204 
205 
206 
207 
208 
213  ProcessorSubTypeMod::ProcessorSubType getProcessorSubType() const;
214 
215 
216 
217 
225  void setProcessorSubType (ProcessorSubTypeMod::ProcessorSubType processorSubType);
226 
227 
228 
229 
230 
231 
233  // Extrinsic Table Attributes //
235 
237  // Links //
239 
240 
241 
242 
254  bool compareNoAutoInc(Tag modeId, ProcessorTypeMod::ProcessorType processorType, ProcessorSubTypeMod::ProcessorSubType processorSubType);
255 
256 
257 
258 
270  bool compareRequiredValue(Tag modeId, ProcessorTypeMod::ProcessorType processorType, ProcessorSubTypeMod::ProcessorSubType processorSubType);
271 
272 
282 
283 #ifndef WITHOUT_ACS
284 
288  asdmIDL::ProcessorRowIDL *toIDL() const;
289 
297  void toIDL(asdmIDL::ProcessorRowIDL& x) const;
298 #endif
299 
300 #ifndef WITHOUT_ACS
301 
306  void setFromIDL (asdmIDL::ProcessorRowIDL 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, ProcessorAttributeFromBin> fromBinMethods;
330 void modeIdFromBin( EndianIStream& eis);
333 
334 
335 
343  static ProcessorRow* fromBin(EndianIStream& eis, ProcessorTable& 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 processorId
403 
404 
405 
406  Tag processorId;
407 
408 
409 
410 
420  void setProcessorId (Tag processorId);
421 
422 
423 
424 
425  // ===> Attribute modeId
426 
427 
428 
430 
431 
432 
433 
434 
435 
436  // ===> Attribute processorType
437 
438 
439 
440  ProcessorTypeMod::ProcessorType processorType;
441 
442 
443 
444 
445 
446 
447  // ===> Attribute processorSubType
448 
449 
450 
451  ProcessorSubTypeMod::ProcessorSubType processorSubType;
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, ProcessorAttributeFromBin> fromBinMethods;
471 void processorIdFromBin( EndianIStream& eis);
472 void modeIdFromBin( EndianIStream& eis);
473 void processorTypeFromBin( EndianIStream& eis);
474 void processorSubTypeFromBin( EndianIStream& eis);
475 
476 
477 */
478 
480  // text-deserialization material //
482  std::map<std::string, ProcessorAttributeFromText> fromTextMethods;
483 
484 void processorIdFromText (const std::string & s);
485 
486 
487 void modeIdFromText (const std::string & s);
488 
489 
490 void processorTypeFromText (const std::string & s);
491 
492 
493 void processorSubTypeFromText (const std::string & s);
494 
495 
496 
497 
502  void toBin(EndianOSStream& eoss);
503 
513 };
514 
515 } // End namespace asdm
516 
517 #endif /* Processor_CLASS */
ProcessorSubTypeMod::ProcessorSubType processorSubType
===&gt; Attribute processorSubType
Definition: ProcessorRow.h:451
void processorIdFromBin(EndianIStream &eis)
ProcessorSubTypeMod::ProcessorSubType getProcessorSubType() const
===&gt; Attribute processorSubType
void setProcessorType(ProcessorTypeMod::ProcessorType processorType)
Set processorType with the specified ProcessorTypeMod::ProcessorType.
ProcessorTypeMod::ProcessorType getProcessorType() const
===&gt; Attribute processorType
ProcessorTypeMod::ProcessorType processorType
===&gt; Attribute processorType
Definition: ProcessorRow.h:440
bool equalByRequiredValue(ProcessorRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
bool compareRequiredValue(Tag modeId, ProcessorTypeMod::ProcessorType processorType, ProcessorSubTypeMod::ProcessorSubType processorSubType)
Compare each mandatory value (i.e.
void setModeId(Tag modeId)
Set modeId with the specified Tag.
Tag modeId
===&gt; Attribute modeId
Definition: ProcessorRow.h:429
void processorSubTypeFromText(const std::string &s)
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: ProcessorRow.h:362
void modeIdFromText(const std::string &s)
bool isAdded() const
Has this row been added to its table ?
void setFromIDL(asdmIDL::ProcessorRowIDL x)
Fill the values of this row from the IDL struct ProcessorRowIDL.
void(ProcessorRow::* ProcessorAttributeFromText)(const std::string &s)
Definition: ProcessorRow.h:90
ProcessorTable & getTable() const
Return the table to which this row belongs.
void processorTypeFromText(const std::string &s)
The ProcessorTable class is an Alma table.
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
ProcessorRow(ProcessorTable &table)
Create a ProcessorRow.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void(ProcessorRow::* ProcessorAttributeFromBin)(EndianIStream &eis)
Definition: ProcessorRow.h:89
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
void setProcessorSubType(ProcessorSubTypeMod::ProcessorSubType processorSubType)
Set processorSubType with the specified ProcessorSubTypeMod::ProcessorSubType.
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, ProcessorAttributeFromBin > fromBinMethods
Definition: ProcessorRow.h:470
std::string toXML() const
Return this row in the form of an XML string.
Extrinsic Table Attributes Links *bool compareNoAutoInc(Tag modeId, ProcessorTypeMod::ProcessorType processorType, ProcessorSubTypeMod::ProcessorSubType processorSubType)
Compare each mandatory attribute except the autoincrementable one of this ProcessorRow with the corre...
virtual ~ProcessorRow()
friend class asdm::TableStreamReader&lt;ProcessorTable, ProcessorRow&gt;;
asdmIDL::ProcessorRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void processorTypeFromBin(EndianIStream &eis)
Tag getModeId() const
===&gt; Attribute modeId
void setProcessorId(Tag processorId)
Set processorId with the specified Tag value.
void processorSubTypeFromBin(EndianIStream &eis)
ProcessorTable & table
The table to which this row belongs.
Definition: ProcessorRow.h:358
void modeIdFromBin(EndianIStream &eis)
The ProcessorRow class is a row of a ProcessorTable.
Definition: ProcessorRow.h:98
void processorIdFromText(const std::string &s)
*text deserialization material std::map< std::string, ProcessorAttributeFromText > fromTextMethods
Definition: ProcessorRow.h:482