casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HistoryRow.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 HistoryRow.h
32  */
33 
34 #ifndef HistoryRow_CLASS
35 #define HistoryRow_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/ArrayTime.h>
52 
53 
54 
55 #include <alma/ASDM/Tag.h>
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
80 #include <alma/ASDM/NoSuchRow.h>
82 
84 //#include <alma/ASDM/TableStreamReader.h>
85 
86 /*\file History.h
87  \brief Generated from model's revision "-1", branch ""
88 */
89 
90 namespace asdm {
91 
92 //class asdm::HistoryTable;
93 
94 
95 // class asdm::ExecBlockRow;
96 class ExecBlockRow;
97 
98 
99 class HistoryRow;
101 typedef void (HistoryRow::*HistoryAttributeFromText) (const std::string& s);
102 
109 class HistoryRow {
110 friend class asdm::HistoryTable;
112 //friend class asdm::TableStreamReader<HistoryTable, HistoryRow>;
113 
114 public:
115 
116  virtual ~HistoryRow();
117 
121  HistoryTable &getTable() const;
122 
127  bool isAdded() const;
128 
130  // Intrinsic Table Attributes //
132 
133 
134  // ===> Attribute time
135 
136 
137 
138 
139 
144  ArrayTime getTime() const;
145 
146 
147 
148 
158  void setTime (ArrayTime time);
159 
160 
161 
162 
163 
164 
165 
166  // ===> Attribute message
167 
168 
169 
170 
171 
176  std::string getMessage() const;
177 
178 
179 
180 
188  void setMessage (std::string message);
189 
190 
191 
192 
193 
194 
195 
196  // ===> Attribute priority
197 
198 
199 
200 
201 
206  std::string getPriority() const;
207 
208 
209 
210 
218  void setPriority (std::string priority);
219 
220 
221 
222 
223 
224 
225 
226  // ===> Attribute origin
227 
228 
229 
230 
231 
236  std::string getOrigin() const;
237 
238 
239 
240 
248  void setOrigin (std::string origin);
249 
250 
251 
252 
253 
254 
255 
256  // ===> Attribute objectId
257 
258 
259 
260 
261 
266  std::string getObjectId() const;
267 
268 
269 
270 
278  void setObjectId (std::string objectId);
279 
280 
281 
282 
283 
284 
285 
286  // ===> Attribute application
287 
288 
289 
290 
291 
296  std::string getApplication() const;
297 
298 
299 
300 
308  void setApplication (std::string application);
309 
310 
311 
312 
313 
314 
315 
316  // ===> Attribute cliCommand
317 
318 
319 
320 
321 
326  std::string getCliCommand() const;
327 
328 
329 
330 
338  void setCliCommand (std::string cliCommand);
339 
340 
341 
342 
343 
344 
345 
346  // ===> Attribute appParms
347 
348 
349 
350 
351 
356  std::string getAppParms() const;
357 
358 
359 
360 
368  void setAppParms (std::string appParms);
369 
370 
371 
372 
373 
374 
376  // Extrinsic Table Attributes //
378 
379 
380  // ===> Attribute execBlockId
381 
382 
383 
384 
385 
390  Tag getExecBlockId() const;
391 
392 
393 
394 
404  void setExecBlockId (Tag execBlockId);
405 
406 
407 
408 
409 
410 
412  // Links //
414 
415 
416 
417 
418 
426 
427 
428 
429 
430 
431 
432 
456  bool compareNoAutoInc(Tag execBlockId, ArrayTime time, std::string message, std::string priority, std::string origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms);
457 
458 
459 
460 
480  bool compareRequiredValue(std::string message, std::string priority, std::string origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms);
481 
482 
492 
493 #ifndef WITHOUT_ACS
494 
498  asdmIDL::HistoryRowIDL *toIDL() const;
499 
507  void toIDL(asdmIDL::HistoryRowIDL& x) const;
508 #endif
509 
510 #ifndef WITHOUT_ACS
511 
516  void setFromIDL (asdmIDL::HistoryRowIDL x) ;
517 #endif
518 
523  std::string toXML() const;
524 
531  void setFromXML (std::string rowDoc) ;
532 
535  // binary-deserialization material from an EndianIStream //
537 
538  std::map<std::string, HistoryAttributeFromBin> fromBinMethods;
540 void timeFromBin( EndianIStream& eis);
541 void messageFromBin( EndianIStream& eis);
542 void priorityFromBin( EndianIStream& eis);
543 void originFromBin( EndianIStream& eis);
544 void objectIdFromBin( EndianIStream& eis);
546 void cliCommandFromBin( EndianIStream& eis);
547 void appParmsFromBin( EndianIStream& eis);
548 
549 
550 
558  static HistoryRow* fromBin(EndianIStream& eis, HistoryTable& table, const std::vector<std::string>& attributesSeq);
559 
566  void fromText(const std::string& attributeName, const std::string& t);
568 
569 private:
578 
579  // This method is used by the Table class when this row is added to the table.
580  void isAdded(bool added);
581 
582 
592 
611 
613  // Intrinsic Table Attributes //
615 
616 
617  // ===> Attribute time
618 
619 
620 
621  ArrayTime time;
622 
623 
624 
625 
626 
627 
628  // ===> Attribute message
629 
630 
631 
632  std::string message;
633 
634 
635 
636 
637 
638 
639  // ===> Attribute priority
640 
641 
642 
643  std::string priority;
644 
645 
646 
647 
648 
649 
650  // ===> Attribute origin
651 
652 
653 
654  std::string origin;
655 
656 
657 
658 
659 
660 
661  // ===> Attribute objectId
662 
663 
664 
665  std::string objectId;
666 
667 
668 
669 
670 
671 
672  // ===> Attribute application
673 
674 
675 
676  std::string application;
677 
678 
679 
680 
681 
682 
683  // ===> Attribute cliCommand
684 
685 
686 
687  std::string cliCommand;
688 
689 
690 
691 
692 
693 
694  // ===> Attribute appParms
695 
696 
697 
698  std::string appParms;
699 
700 
701 
702 
703 
705  // Extrinsic Table Attributes //
707 
708 
709  // ===> Attribute execBlockId
710 
711 
712 
713  Tag execBlockId;
714 
715 
716 
717 
718 
720  // Links //
722 
723 
724 
725 
726 
727 
728 
729 
730 
731 /*
733  // binary-deserialization material from an EndianIStream //
735  std::map<std::string, HistoryAttributeFromBin> fromBinMethods;
736 void execBlockIdFromBin( EndianIStream& eis);
737 void timeFromBin( EndianIStream& eis);
738 void messageFromBin( EndianIStream& eis);
739 void priorityFromBin( EndianIStream& eis);
740 void originFromBin( EndianIStream& eis);
741 void objectIdFromBin( EndianIStream& eis);
742 void applicationFromBin( EndianIStream& eis);
743 void cliCommandFromBin( EndianIStream& eis);
744 void appParmsFromBin( EndianIStream& eis);
745 
746 
747 */
748 
750  // text-deserialization material //
752  std::map<std::string, HistoryAttributeFromText> fromTextMethods;
753 
754 void execBlockIdFromText (const std::string & s);
755 
756 
757 void timeFromText (const std::string & s);
758 
759 
760 void messageFromText (const std::string & s);
761 
762 
763 void priorityFromText (const std::string & s);
764 
765 
766 void originFromText (const std::string & s);
767 
768 
769 void objectIdFromText (const std::string & s);
770 
771 
772 void applicationFromText (const std::string & s);
773 
774 
775 void cliCommandFromText (const std::string & s);
776 
777 
778 void appParmsFromText (const std::string & s);
779 
780 
781 
782 
787  void toBin(EndianOSStream& eoss);
788 
798 };
799 
800 } // End namespace asdm
801 
802 #endif /* History_CLASS */
HistoryTable & table
The table to which this row belongs.
Definition: HistoryRow.h:573
void messageFromText(const std::string &s)
void(HistoryRow::* HistoryAttributeFromText)(const std::string &s)
Definition: HistoryRow.h:101
void setApplication(std::string application)
Set application with the specified std::string.
std::string getPriority() const
===&gt; Attribute priority
std::string appParms
===&gt; Attribute appParms
Definition: HistoryRow.h:698
std::string application
===&gt; Attribute application
Definition: HistoryRow.h:676
void timeFromText(const std::string &s)
std::string origin
===&gt; Attribute origin
Definition: HistoryRow.h:654
*text deserialization material std::map< std::string, HistoryAttributeFromText > fromTextMethods
Definition: HistoryRow.h:752
void originFromBin(EndianIStream &eis)
std::string priority
===&gt; Attribute priority
Definition: HistoryRow.h:643
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
Definition: PlotTool.h:43
std::string toXML() const
Return this row in the form of an XML string.
void priorityFromBin(EndianIStream &eis)
The ExecBlockRow class is a row of a ExecBlockTable.
Definition: ExecBlockRow.h:163
Links *binary deserialization material from an EndianIStream std::map< std::string, HistoryAttributeFromBin > fromBinMethods
Definition: HistoryRow.h:735
std::string getOrigin() const
===&gt; Attribute origin
virtual ~HistoryRow()
friend class asdm::TableStreamReader&lt;HistoryTable, HistoryRow&gt;;
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: HistoryRow.h:577
std::string getCliCommand() const
===&gt; Attribute cliCommand
void applicationFromText(const std::string &s)
Links *ExecBlockRow * getExecBlockUsingExecBlockId()
execBlockId pointer to the row in the ExecBlock table having ExecBlock.execBlockId == execBlockId ...
void cliCommandFromBin(EndianIStream &eis)
void setObjectId(std::string objectId)
Set objectId with the specified std::string.
bool isAdded() const
Has this row been added to its table ?
std::string message
===&gt; Attribute message
Definition: HistoryRow.h:632
void objectIdFromBin(EndianIStream &eis)
bool compareNoAutoInc(Tag execBlockId, ArrayTime time, std::string message, std::string priority, std::string origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms)
Compare each mandatory attribute except the autoincrementable one of this HistoryRow with the corresp...
void objectIdFromText(const std::string &s)
void(HistoryRow::* HistoryAttributeFromBin)(EndianIStream &eis)
Definition: HistoryRow.h:100
void cliCommandFromText(const std::string &s)
std::string getApplication() const
===&gt; Attribute application
void appParmsFromBin(EndianIStream &eis)
void setFromIDL(asdmIDL::HistoryRowIDL x)
Fill the values of this row from the IDL struct HistoryRowIDL.
void setExecBlockId(Tag execBlockId)
Set execBlockId with the specified Tag.
void setAppParms(std::string appParms)
Set appParms with the specified std::string.
std::string getMessage() const
===&gt; Attribute message
The HistoryRow class is a row of a HistoryTable.
Definition: HistoryRow.h:109
std::string getObjectId() const
===&gt; Attribute objectId
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
Definition: ArrayTime.h:89
bool equalByRequiredValue(HistoryRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void timeFromBin(EndianIStream &eis)
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
HistoryTable & getTable() const
Return the table to which this row belongs.
std::string getAppParms() const
===&gt; Attribute appParms
void execBlockIdFromText(const std::string &s)
std::string objectId
===&gt; Attribute objectId
Definition: HistoryRow.h:665
std::string cliCommand
===&gt; Attribute cliCommand
Definition: HistoryRow.h:687
bool compareRequiredValue(std::string message, std::string priority, std::string origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms)
Compare each mandatory value (i.e.
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
void appParmsFromText(const std::string &s)
void applicationFromBin(EndianIStream &eis)
The HistoryTable class is an Alma table.
Definition: HistoryTable.h:185
void setOrigin(std::string origin)
Set origin with the specified std::string.
void execBlockIdFromBin(EndianIStream &eis)
void setMessage(std::string message)
Set message with the specified std::string.
void setCliCommand(std::string cliCommand)
Set cliCommand with the specified std::string.
void setPriority(std::string priority)
Set priority with the specified std::string.
void messageFromBin(EndianIStream &eis)
void setTime(ArrayTime time)
Set time with the specified ArrayTime.
void priorityFromText(const std::string &s)
HistoryRow(HistoryTable &table)
Create a HistoryRow.
asdmIDL::HistoryRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void originFromText(const std::string &s)
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.