more polymorphie steps for BeRo
This commit is contained in:
@@ -80,6 +80,7 @@ HEADERS += src/game.h \
|
|||||||
src/engine/riverinterface.h \
|
src/engine/riverinterface.h \
|
||||||
src/engine/turninterface.h \
|
src/engine/turninterface.h \
|
||||||
src/engine/berointerface.h \
|
src/engine/berointerface.h \
|
||||||
|
src/engine/berofactoryinterface.h \
|
||||||
src/gui/guiinterface.h \
|
src/gui/guiinterface.h \
|
||||||
src/net/clientcallback.h \
|
src/net/clientcallback.h \
|
||||||
src/net/clientcontext.h \
|
src/net/clientcontext.h \
|
||||||
@@ -107,6 +108,7 @@ HEADERS += src/game.h \
|
|||||||
src/engine/local_engine/localturn.h \
|
src/engine/local_engine/localturn.h \
|
||||||
src/engine/local_engine/tools.h \
|
src/engine/local_engine/tools.h \
|
||||||
src/engine/local_engine/localbero.h \
|
src/engine/local_engine/localbero.h \
|
||||||
|
src/engine/local_engine/localberofactory.h \
|
||||||
src/engine/network_engine/clientboard.h \
|
src/engine/network_engine/clientboard.h \
|
||||||
src/engine/network_engine/clientenginefactory.h \
|
src/engine/network_engine/clientenginefactory.h \
|
||||||
src/engine/network_engine/clientflop.h \
|
src/engine/network_engine/clientflop.h \
|
||||||
@@ -116,6 +118,7 @@ HEADERS += src/game.h \
|
|||||||
src/engine/network_engine/clientriver.h \
|
src/engine/network_engine/clientriver.h \
|
||||||
src/engine/network_engine/clientturn.h \
|
src/engine/network_engine/clientturn.h \
|
||||||
src/engine/network_engine/clientbero.h \
|
src/engine/network_engine/clientbero.h \
|
||||||
|
src/engine/network_engine/clientberofactory.h \
|
||||||
src/gui/qt/sound/sdlplayer.h \
|
src/gui/qt/sound/sdlplayer.h \
|
||||||
src/gui/qt/mainwindow/mainwindowimpl.h \
|
src/gui/qt/mainwindow/mainwindowimpl.h \
|
||||||
src/gui/qt/mainwindow/mycardspixmaplabel.h \
|
src/gui/qt/mainwindow/mycardspixmaplabel.h \
|
||||||
@@ -168,6 +171,7 @@ SOURCES += src/game.cpp \
|
|||||||
src/engine/riverinterface.cpp \
|
src/engine/riverinterface.cpp \
|
||||||
src/engine/turninterface.cpp \
|
src/engine/turninterface.cpp \
|
||||||
src/engine/berointerface.cpp \
|
src/engine/berointerface.cpp \
|
||||||
|
src/engine/berofactoryinterface.cpp \
|
||||||
src/gui/guiinterface.cpp \
|
src/gui/guiinterface.cpp \
|
||||||
src/core/common/thread.cpp \
|
src/core/common/thread.cpp \
|
||||||
src/core/tinyxml/tinystr.cpp \
|
src/core/tinyxml/tinystr.cpp \
|
||||||
@@ -185,6 +189,7 @@ SOURCES += src/game.cpp \
|
|||||||
src/engine/local_engine/localturn.cpp \
|
src/engine/local_engine/localturn.cpp \
|
||||||
src/engine/local_engine/tools.cpp \
|
src/engine/local_engine/tools.cpp \
|
||||||
src/engine/local_engine/localbero.cpp \
|
src/engine/local_engine/localbero.cpp \
|
||||||
|
src/engine/local_engine/localberofactory.cpp \
|
||||||
src/engine/network_engine/clientboard.cpp \
|
src/engine/network_engine/clientboard.cpp \
|
||||||
src/engine/network_engine/clientenginefactory.cpp \
|
src/engine/network_engine/clientenginefactory.cpp \
|
||||||
src/engine/network_engine/clientflop.cpp \
|
src/engine/network_engine/clientflop.cpp \
|
||||||
@@ -194,6 +199,7 @@ SOURCES += src/game.cpp \
|
|||||||
src/engine/network_engine/clientriver.cpp \
|
src/engine/network_engine/clientriver.cpp \
|
||||||
src/engine/network_engine/clientturn.cpp \
|
src/engine/network_engine/clientturn.cpp \
|
||||||
src/engine/network_engine/clientbero.cpp \
|
src/engine/network_engine/clientbero.cpp \
|
||||||
|
src/engine/network_engine/clientberofactory.cpp \
|
||||||
src/net/common/connectdata.cpp \
|
src/net/common/connectdata.cpp \
|
||||||
src/net/common/clientcallback.cpp \
|
src/net/common/clientcallback.cpp \
|
||||||
src/net/common/clientcontext.cpp \
|
src/net/common/clientcontext.cpp \
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// C++ Implementation: berofactoryinterface
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#include "berofactoryinterface.h"
|
||||||
|
|
||||||
|
BeRoFactoryInterface::BeRoFactoryInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BeRoFactoryInterface::~BeRoFactoryInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// C++ Interface: berofactoryinterface
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#ifndef BEROFACTORYINTERFACE_H
|
||||||
|
#define BEROFACTORYINTERFACE_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author FThauer FHammer <webmaster@pokerth.net>
|
||||||
|
*/
|
||||||
|
class BeRoFactoryInterface{
|
||||||
|
public:
|
||||||
|
BeRoFactoryInterface();
|
||||||
|
|
||||||
|
~BeRoFactoryInterface();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "turninterface.h"
|
#include "turninterface.h"
|
||||||
#include "riverinterface.h"
|
#include "riverinterface.h"
|
||||||
#include "berointerface.h"
|
#include "berointerface.h"
|
||||||
|
#include "berofactoryinterface.h"
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
@@ -45,6 +46,7 @@ public:
|
|||||||
virtual TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
virtual TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
||||||
virtual RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
virtual RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
||||||
virtual BeRoInterface* createBeRo() =0;
|
virtual BeRoInterface* createBeRo() =0;
|
||||||
|
virtual BeRoFactoryInterface* createBeRoFactory() =0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// C++ Implementation: localberofactory
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#include "localberofactory.h"
|
||||||
|
|
||||||
|
LocalBeRoFactory::LocalBeRoFactory()
|
||||||
|
: BeRoFactoryInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LocalBeRoFactory::~LocalBeRoFactory()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// C++ Interface: localberofactory
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#ifndef LOCALBEROFACTORY_H
|
||||||
|
#define LOCALBEROFACTORY_H
|
||||||
|
|
||||||
|
#include <berofactoryinterface.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author FThauer FHammer <webmaster@pokerth.net>
|
||||||
|
*/
|
||||||
|
class LocalBeRoFactory : public BeRoFactoryInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LocalBeRoFactory();
|
||||||
|
|
||||||
|
~LocalBeRoFactory();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "localturn.h"
|
#include "localturn.h"
|
||||||
#include "localriver.h"
|
#include "localriver.h"
|
||||||
#include "localbero.h"
|
#include "localbero.h"
|
||||||
|
#include "localberofactory.h"
|
||||||
|
|
||||||
#include <configfile.h>
|
#include <configfile.h>
|
||||||
|
|
||||||
@@ -57,3 +58,6 @@ TurnInterface* LocalEngineFactory::createTurn(HandInterface* hi, int id, int aP,
|
|||||||
RiverInterface* LocalEngineFactory::createRiver(HandInterface* hi, int id, int aP, int dP, int sB) { return new LocalRiver(hi, id, aP, dP, sB); }
|
RiverInterface* LocalEngineFactory::createRiver(HandInterface* hi, int id, int aP, int dP, int sB) { return new LocalRiver(hi, id, aP, dP, sB); }
|
||||||
|
|
||||||
BeRoInterface* LocalEngineFactory::createBeRo() { return new LocalBeRo(); }
|
BeRoInterface* LocalEngineFactory::createBeRo() { return new LocalBeRo(); }
|
||||||
|
|
||||||
|
BeRoFactoryInterface* LocalEngineFactory::createBeRoFactory() { return new LocalBeRoFactory(); }
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <turninterface.h>
|
#include <turninterface.h>
|
||||||
#include <riverinterface.h>
|
#include <riverinterface.h>
|
||||||
#include <berointerface.h>
|
#include <berointerface.h>
|
||||||
|
#include <berofactoryinterface.h>
|
||||||
|
|
||||||
class ConfigFile;
|
class ConfigFile;
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ public:
|
|||||||
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||||
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||||
BeRoInterface* createBeRo();
|
BeRoInterface* createBeRo();
|
||||||
|
BeRoFactoryInterface* createBeRoFactory();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// C++ Implementation: clientberofactory
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#include "clientberofactory.h"
|
||||||
|
|
||||||
|
ClientBeRoFactory::ClientBeRoFactory()
|
||||||
|
: BeRoFactoryInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ClientBeRoFactory::~ClientBeRoFactory()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// C++ Interface: clientberofactory
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#ifndef CLIENTBEROFACTORY_H
|
||||||
|
#define CLIENTBEROFACTORY_H
|
||||||
|
|
||||||
|
#include <berofactoryinterface.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author FThauer FHammer <webmaster@pokerth.net>
|
||||||
|
*/
|
||||||
|
class ClientBeRoFactory : public BeRoFactoryInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ClientBeRoFactory();
|
||||||
|
|
||||||
|
~ClientBeRoFactory();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
#include "clientturn.h"
|
#include "clientturn.h"
|
||||||
#include "clientriver.h"
|
#include "clientriver.h"
|
||||||
#include "clientbero.h"
|
#include "clientbero.h"
|
||||||
|
#include "clientberofactory.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -78,3 +79,8 @@ BeRoInterface* ClientEngineFactory::createBeRo()
|
|||||||
{
|
{
|
||||||
return new ClientBeRo();
|
return new ClientBeRo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BeRoFactoryInterface* ClientEngineFactory::createBeRoFactory()
|
||||||
|
{
|
||||||
|
return new ClientBeRoFactory();
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <turninterface.h>
|
#include <turninterface.h>
|
||||||
#include <riverinterface.h>
|
#include <riverinterface.h>
|
||||||
#include <berointerface.h>
|
#include <berointerface.h>
|
||||||
|
#include <berofactoryinterface.h>
|
||||||
|
|
||||||
|
|
||||||
class ConfigFile;
|
class ConfigFile;
|
||||||
@@ -47,6 +48,7 @@ public:
|
|||||||
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||||
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||||
BeRoInterface* createBeRo();
|
BeRoInterface* createBeRo();
|
||||||
|
BeRoFactoryInterface* createBeRoFactory();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user