sqlite-logging: include log in pokerth_lib; new function for game-logging

This commit is contained in:
floty
2010-12-28 23:01:39 +00:00
parent 05cae76aee
commit 121575caa5
6 changed files with 15 additions and 5 deletions
+1
View File
@@ -25,6 +25,7 @@
#include "configfile.h"
#include "game_defs.h"
#include "log.h"
#include "playerinterface.h"
using namespace std;
+8 -2
View File
@@ -20,10 +20,16 @@
#ifndef LOG_H
#define LOG_H
#include "playerinterface.h"
#include <boost/shared_ptr.hpp>
#include <list>
struct sqlite3;
class ConfigFile;
class PlayerInterface;
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
typedef std::list<boost::shared_ptr<PlayerInterface> >::const_iterator PlayerListConstIterator;
class Log
{
@@ -33,7 +39,7 @@ public:
~Log();
void logNewGameMsg(int, int, int, unsigned, PlayerList);
void logNewGameMsg(int gameID, int startCash, int startSmallBlind, unsigned dealerPosition, PlayerList seatsList);
// void closeLogDbAtExit();
+2 -1
View File
@@ -21,6 +21,7 @@
#include <enginefactory.h>
#include <guiinterface.h>
#include "log.h"
#include "localexception.h"
#include "engine_msg.h"
@@ -109,7 +110,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
currentBoard->setPlayerLists(seatsList, activePlayerList, runningPlayerList);
// log game data
// myLog->logNewGameMsg(myGameID, startCash, startSmallBlind, dealerPosition, seatsList);
myLog->logNewGameMsg(myGameID, startCash, startSmallBlind, dealerPosition, seatsList);
//start timer
blindsTimer.reset();
-1
View File
@@ -23,7 +23,6 @@
#include <boost/shared_ptr.hpp>
#include "gamedata.h"
#include "playerdata.h"
#include "log.h"
#include <third_party/boost/timers.hpp>
+1
View File
@@ -46,6 +46,7 @@ Session::Session(GuiInterface *g, ConfigFile *c)
: currentGameNum(0), myGui(g), myConfig(c), myLog(0), myGameType(GAME_TYPE_NONE)
{
myQtToolsInterface = CreateQtToolsWrapper();
myLog = new Log(myConfig);
}