create log in session; put some include from header to cpp

This commit is contained in:
floty
2010-12-20 20:30:12 +00:00
parent c88fe3220d
commit 29e16e3489
6 changed files with 27 additions and 22 deletions
+11 -5
View File
@@ -18,6 +18,12 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <sqlite3.h>
#include <iostream>
#include <dirent.h>
#include <boost/lexical_cast.hpp>
#include "configfile.h"
#include "game_defs.h"
#include "log.h"
using namespace std;
@@ -150,7 +156,7 @@ Log::~Log()
}
void
Log::logNewGameMsg(int gameID, Game *currentGame) {
Log::logNewGameMsg(int gameID, int startCash, int startSmallBlind, unsigned dealerPosition, PlayerList seatsList) {
if(SQLITE_LOG) {
@@ -175,11 +181,11 @@ Log::logNewGameMsg(int gameID, Game *currentGame) {
}
sql += ") VALUES (";
sql += boost::lexical_cast<string>(gameID);
sql += "," + boost::lexical_cast<string>(currentGame->getStartCash());
sql += "," + boost::lexical_cast<string>(currentGame->getStartSmallBlind());
sql += "," + boost::lexical_cast<string>(currentGame->getDealerPosition());
sql += "," + boost::lexical_cast<string>(startCash);
sql += "," + boost::lexical_cast<string>(startSmallBlind);
sql += "," + boost::lexical_cast<string>(dealerPosition);
for(it_c = currentGame->getCurrentHand()->getSeatsList()->begin();it_c!=currentGame->getCurrentHand()->getSeatsList()->end();it_c++) {
for(it_c = seatsList->begin();it_c!=seatsList->end();it_c++) {
if((*it_c)->getMyActiveStatus()) {
sql += ",\"" + (*it_c)->getMyName() +"\"";
} else {