Added more debugging and option to disable new streflop usage.

This commit is contained in:
Mark Vejvoda
2010-05-01 20:14:25 +00:00
parent 2417f37e21
commit 04bb6659ce
28 changed files with 447 additions and 112 deletions

View File

@@ -1,7 +1,7 @@
// ==============================================================
// This file is part of Glest Shared Library (www.glest.org)
//
// Copyright (C) 2001-2008 Marti<EFBFBD>o Figueroa
// Copyright (C) 2001-2008 Martio Figueroa
//
// You can redistribute this code and/or modify it under
// the terms of the GNU General Public License as published

View File

@@ -15,10 +15,10 @@
#include <string>
#include <fstream>
#include <map>
#include "thread.h"
//#include "thread.h"
using std::string;
using namespace Shared::Platform;
//using namespace Shared::Platform;
namespace Shared{ namespace Util{
@@ -45,7 +45,7 @@ public:
this->fileStream = NULL;
this->debugLogFileName = "";
this->fileStreamOwner = false;
this->mutex = NULL;
//this->mutex = NULL;
}
SystemFlagsType(DebugType debugType) {
this->debugType = debugType;
@@ -53,7 +53,7 @@ public:
this->fileStream = NULL;
this->debugLogFileName = "";
this->fileStreamOwner = false;
this->mutex = NULL;
//this->mutex = NULL;
}
SystemFlagsType(DebugType debugType,bool enabled,
std::ofstream *fileStream,std::string debugLogFileName) {
@@ -62,14 +62,14 @@ public:
this->fileStream = fileStream;
this->debugLogFileName = debugLogFileName;
this->fileStreamOwner = false;
this->mutex = mutex;
//this->mutex = mutex;
}
bool enabled;
std::ofstream *fileStream;
std::string debugLogFileName;
bool fileStreamOwner;
Mutex *mutex;
//Mutex *mutex;
};
protected:
@@ -122,6 +122,7 @@ template<typename T>
void deleteMapValues(T beginIt, T endIt){
for(T it= beginIt; it!=endIt; ++it){
delete it->second;
it->second = NULL;
}
}