casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FlagCmdRow.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 FlagCmdRow.h
32  */
33 
34 #ifndef FlagCmdRow_CLASS
35 #define FlagCmdRow_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 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
74 #include <alma/ASDM/NoSuchRow.h>
76 
78 //#include <alma/ASDM/TableStreamReader.h>
79 
80 /*\file FlagCmd.h
81  \brief Generated from model's revision "-1", branch ""
82 */
83 
84 namespace asdm {
85 
86 //class asdm::FlagCmdTable;
87 
88 
89 
90 class FlagCmdRow;
92 typedef void (FlagCmdRow::*FlagCmdAttributeFromText) (const std::string& s);
93 
100 class FlagCmdRow {
101 friend class asdm::FlagCmdTable;
103 //friend class asdm::TableStreamReader<FlagCmdTable, FlagCmdRow>;
104 
105 public:
106 
107  virtual ~FlagCmdRow();
108 
112  FlagCmdTable &getTable() const;
113 
118  bool isAdded() const;
119 
121  // Intrinsic Table Attributes //
123 
124 
125  // ===> Attribute timeInterval
126 
127 
128 
129 
130 
135  ArrayTimeInterval getTimeInterval() const;
136 
137 
138 
139 
149  void setTimeInterval (ArrayTimeInterval timeInterval);
150 
151 
152 
153 
154 
155 
156 
157  // ===> Attribute type
158 
159 
160 
161 
162 
167  std::string getType() const;
168 
169 
170 
171 
179  void setType (std::string type);
180 
181 
182 
183 
184 
185 
186 
187  // ===> Attribute reason
188 
189 
190 
191 
192 
197  std::string getReason() const;
198 
199 
200 
201 
209  void setReason (std::string reason);
210 
211 
212 
213 
214 
215 
216 
217  // ===> Attribute level
218 
219 
220 
221 
222 
227  int getLevel() const;
228 
229 
230 
231 
239  void setLevel (int level);
240 
241 
242 
243 
244 
245 
246 
247  // ===> Attribute severity
248 
249 
250 
251 
252 
257  int getSeverity() const;
258 
259 
260 
261 
269  void setSeverity (int severity);
270 
271 
272 
273 
274 
275 
276 
277  // ===> Attribute applied
278 
279 
280 
281 
282 
287  bool getApplied() const;
288 
289 
290 
291 
299  void setApplied (bool applied);
300 
301 
302 
303 
304 
305 
306 
307  // ===> Attribute command
308 
309 
310 
311 
312 
317  std::string getCommand() const;
318 
319 
320 
321 
329  void setCommand (std::string command);
330 
331 
332 
333 
334 
335 
337  // Extrinsic Table Attributes //
339 
341  // Links //
343 
344 
345 
346 
366  bool compareNoAutoInc(ArrayTimeInterval timeInterval, std::string type, std::string reason, int level, int severity, bool applied, std::string command);
367 
368 
369 
370 
388  bool compareRequiredValue(std::string type, std::string reason, int level, int severity, bool applied, std::string command);
389 
390 
400 
401 #ifndef WITHOUT_ACS
402 
406  asdmIDL::FlagCmdRowIDL *toIDL() const;
407 
415  void toIDL(asdmIDL::FlagCmdRowIDL& x) const;
416 #endif
417 
418 #ifndef WITHOUT_ACS
419 
424  void setFromIDL (asdmIDL::FlagCmdRowIDL x) ;
425 #endif
426 
431  std::string toXML() const;
432 
439  void setFromXML (std::string rowDoc) ;
440 
443  // binary-deserialization material from an EndianIStream //
445 
446  std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods;
448 void typeFromBin( EndianIStream& eis);
449 void reasonFromBin( EndianIStream& eis);
450 void levelFromBin( EndianIStream& eis);
451 void severityFromBin( EndianIStream& eis);
452 void appliedFromBin( EndianIStream& eis);
453 void commandFromBin( EndianIStream& eis);
454 
455 
456 
464  static FlagCmdRow* fromBin(EndianIStream& eis, FlagCmdTable& table, const std::vector<std::string>& attributesSeq);
465 
472  void fromText(const std::string& attributeName, const std::string& t);
474 
475 private:
484 
485  // This method is used by the Table class when this row is added to the table.
486  void isAdded(bool added);
487 
488 
498 
517 
519  // Intrinsic Table Attributes //
521 
522 
523  // ===> Attribute timeInterval
524 
525 
526 
527  ArrayTimeInterval timeInterval;
528 
529 
530 
531 
532 
533 
534  // ===> Attribute type
535 
536 
537 
538  std::string type;
539 
540 
541 
542 
543 
544 
545  // ===> Attribute reason
546 
547 
548 
549  std::string reason;
550 
551 
552 
553 
554 
555 
556  // ===> Attribute level
557 
558 
559 
560  int level;
561 
562 
563 
564 
565 
566 
567  // ===> Attribute severity
568 
569 
570 
571  int severity;
572 
573 
574 
575 
576 
577 
578  // ===> Attribute applied
579 
580 
581 
582  bool applied;
583 
584 
585 
586 
587 
588 
589  // ===> Attribute command
590 
591 
592 
593  std::string command;
594 
595 
596 
597 
598 
600  // Extrinsic Table Attributes //
602 
604  // Links //
606 
607 
608 /*
610  // binary-deserialization material from an EndianIStream //
612  std::map<std::string, FlagCmdAttributeFromBin> fromBinMethods;
613 void timeIntervalFromBin( EndianIStream& eis);
614 void typeFromBin( EndianIStream& eis);
615 void reasonFromBin( EndianIStream& eis);
616 void levelFromBin( EndianIStream& eis);
617 void severityFromBin( EndianIStream& eis);
618 void appliedFromBin( EndianIStream& eis);
619 void commandFromBin( EndianIStream& eis);
620 
621 
622 */
623 
625  // text-deserialization material //
627  std::map<std::string, FlagCmdAttributeFromText> fromTextMethods;
628 
629 void timeIntervalFromText (const std::string & s);
630 
631 
632 void typeFromText (const std::string & s);
633 
634 
635 void reasonFromText (const std::string & s);
636 
637 
638 void levelFromText (const std::string & s);
639 
640 
641 void severityFromText (const std::string & s);
642 
643 
644 void appliedFromText (const std::string & s);
645 
646 
647 void commandFromText (const std::string & s);
648 
649 
650 
651 
656  void toBin(EndianOSStream& eoss);
657 
667 };
668 
669 } // End namespace asdm
670 
671 #endif /* FlagCmd_CLASS */
asdmIDL::FlagCmdRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void(FlagCmdRow::* FlagCmdAttributeFromBin)(EndianIStream &eis)
Definition: FlagCmdRow.h:91
bool compareRequiredValue(std::string type, std::string reason, int level, int severity, bool applied, std::string command)
Compare each mandatory value (i.e.
void setFromIDL(asdmIDL::FlagCmdRowIDL x)
Fill the values of this row from the IDL struct FlagCmdRowIDL.
FlagCmdTable & table
The table to which this row belongs.
Definition: FlagCmdRow.h:479
void levelFromBin(EndianIStream &eis)
void setLevel(int level)
Set level with the specified int.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: FlagCmdRow.h:483
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
std::string getReason() const
===&gt; Attribute reason
void(FlagCmdRow::* FlagCmdAttributeFromText)(const std::string &s)
Definition: FlagCmdRow.h:92
void setTimeInterval(ArrayTimeInterval timeInterval)
Set timeInterval with the specified ArrayTimeInterval.
bool isAdded() const
Has this row been added to its table ?
void setApplied(bool applied)
Set applied with the specified bool.
void typeFromText(const std::string &s)
The FlagCmdTable class is an Alma table.
Definition: FlagCmdTable.h:163
int getLevel() const
===&gt; Attribute level
void typeFromBin(EndianIStream &eis)
bool getApplied() const
===&gt; Attribute applied
std::string reason
===&gt; Attribute reason
Definition: FlagCmdRow.h:549
void setType(std::string type)
Set type with the specified std::string.
int level
===&gt; Attribute level
Definition: FlagCmdRow.h:560
void commandFromBin(EndianIStream &eis)
void levelFromText(const std::string &s)
bool equalByRequiredValue(FlagCmdRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
Extrinsic Table Attributes Links *binary deserialization material from an EndianIStream std::map< std::string, FlagCmdAttributeFromBin > fromBinMethods
Definition: FlagCmdRow.h:612
void timeIntervalFromBin(EndianIStream &eis)
std::string getType() const
===&gt; Attribute type
The FlagCmdRow class is a row of a FlagCmdTable.
Definition: FlagCmdRow.h:100
FlagCmdRow(FlagCmdTable &table)
Create a FlagCmdRow.
void commandFromText(const std::string &s)
void appliedFromBin(EndianIStream &eis)
void setCommand(std::string command)
Set command with the specified std::string.
void severityFromText(const std::string &s)
std::string command
===&gt; Attribute command
Definition: FlagCmdRow.h:593
bool applied
===&gt; Attribute applied
Definition: FlagCmdRow.h:582
Extrinsic Table Attributes Links *bool compareNoAutoInc(ArrayTimeInterval timeInterval, std::string type, std::string reason, int level, int severity, bool applied, std::string command)
Compare each mandatory attribute except the autoincrementable one of this FlagCmdRow with the corresp...
std::string type
===&gt; Attribute type
Definition: FlagCmdRow.h:538
void setReason(std::string reason)
Set reason with the specified std::string.
int getSeverity() const
===&gt; Attribute severity
*text deserialization material std::map< std::string, FlagCmdAttributeFromText > fromTextMethods
Definition: FlagCmdRow.h:627
void setSeverity(int severity)
Set severity with the specified int.
void reasonFromBin(EndianIStream &eis)
FlagCmdTable & getTable() const
Return the table to which this row belongs.
int severity
===&gt; Attribute severity
Definition: FlagCmdRow.h:571
std::string getCommand() const
===&gt; Attribute command
void severityFromBin(EndianIStream &eis)
void reasonFromText(const std::string &s)
std::string toXML() const
Return this row in the form of an XML string.
void appliedFromText(const std::string &s)
virtual ~FlagCmdRow()
friend class asdm::TableStreamReader&lt;FlagCmdTable, FlagCmdRow&gt;;
void timeIntervalFromText(const std::string &s)
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.