]> git.donarmstrong.com Git - mothur.git/blob - mothurout.h
added compile time default path
[mothur.git] / mothurout.h
1 #ifndef MOTHUROUT_H
2 #define MOTHUROUT_H
3
4 /*
5  *  mothurOut.h
6  *  Mothur
7  *
8  *  Created by westcott on 2/25/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14
15 /***********************************************/
16
17 class MothurOut {
18         
19         public:
20                 static MothurOut* getInstance();
21                 void setFileName(string);
22                 
23                 void mothurOut(string);
24                 void mothurOutEndLine();
25                 void mothurOutJustToLog(string);
26                 void errorOut(exception&, string, string);
27                 void closeLog();
28                 string getDefaultPath() { return defaultPath; }
29                 void setDefaultPath(string);
30
31                 int control_pressed;
32                 bool executing;
33                 
34
35         private:
36                 static MothurOut* _uniqueInstance;
37                 MothurOut( const MothurOut& ); // Disable copy constructor
38                 void operator=( const MothurOut& ); // Disable assignment operator
39                 MothurOut() { control_pressed = false; defaultPath=""; };
40                 ~MothurOut();
41
42                 string logFileName;
43                 string defaultPath;
44                 ofstream out;
45                 
46                 int mem_usage(double&, double&);
47
48 };
49 /***********************************************/
50
51 #endif
52