Isis 3 Programmer Reference
SessionLog.h
Go to the documentation of this file.
1 #ifndef SessionLog_h
2 #define SessionLog_h
3 
25 #include <string>
26 #include "Pvl.h"
27 #include "IException.h"
28 
29 namespace Isis {
40  class SessionLog : private Isis::Pvl {
41  public:
42  static SessionLog &TheLog(bool restart = false);
43  static bool HasLog() {
44  return p_log != NULL;
45  };
46 
47  // Add the Results group
48  void AddResults(Isis::PvlGroup &results);
49 
50  // Write the log to the screen and/or file
51  void Write();
52 
53  // Add an Error to the log
54  void AddError(Isis::Pvl &e);
55 
56  // Will we be logging to the terminal?
57  bool TerminalOutput() {
58  return p_termOutput;
59  };
60 
61  private:
62  SessionLog();
63  ~SessionLog();
64 
65  PvlObject *p_root;
66  bool p_errorAdded;
67 
68  bool p_termOutput;
69  bool p_fileOutput;
70  QString p_outputFile;
71  QString p_access;
72 
73  static SessionLog *p_log;
74 
75  bool p_acctAdded;
76  void AddAccounting();
77  friend std::ostream &operator<<(std::ostream &os, Isis::SessionLog &log);
78  static void Shutdown();
79  };
80 };
81 
82 #endif
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
Container for cube-like labels.
Definition: Pvl.h:135
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74