Skip to content
Snippets Groups Projects
Commit 0a339713 authored by Mark Woolrich's avatar Mark Woolrich
Browse files

*** empty log message ***

parent f56b83cd
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,9 @@
/* CCOPYRIGHT */
#if !defined(Log_h)
#define Log_h
#include <iostream>
#include <fstream>
#include <string>
......@@ -13,10 +16,10 @@
#include "newmatio.h"
using namespace NEWMAT;
namespace Utilities{
#if !defined(Log_h)
#define Log_h
template<class t> string tostring(const t obj);
class Log
{
......@@ -28,18 +31,18 @@ namespace Utilities{
keeps adding "+" to pdirname until unique directory is made: */
void makeDir(const string& pdirname, const string& plogfilename = "logfile");
/** Sets an existing directory to place results into: */
/** Sets an existing directory to place results into: */
void setDir(const string& pdirname, const string& plogfilename = "logfile");
const string& getDir() const { return dir; }
const string& getLogFileName() const { return logfilename; }
const string appendFileName(const string& filename) const { return dir + "/" + filename;}
const string appendDir(const string& filename) const { return dir + "/" + filename;}
void out(const string& p_fname, const Matrix& p_mat);
void out(const string& p_fname, const RowVector& p_mat);
void out(const string& p_fname, const ColumnVector& p_mat);
static int counter() { return count++; }
ofstream& str();
private:
......@@ -52,6 +55,7 @@ namespace Utilities{
string dir;
ofstream logfileout;
string logfilename;
static int count;
bool logEstablished;
};
......@@ -139,9 +143,8 @@ namespace Utilities{
return logfileout;
}
#endif
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment