more polymorphie steps for BeRo
This commit is contained in:
@@ -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 "riverinterface.h"
|
||||
#include "berointerface.h"
|
||||
#include "berofactoryinterface.h"
|
||||
|
||||
#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 RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
||||
virtual BeRoInterface* createBeRo() =0;
|
||||
virtual BeRoFactoryInterface* createBeRoFactory() =0;
|
||||
};
|
||||
|
||||
#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 "localriver.h"
|
||||
#include "localbero.h"
|
||||
#include "localberofactory.h"
|
||||
|
||||
#include <configfile.h>
|
||||
|
||||
@@ -56,4 +57,7 @@ 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); }
|
||||
|
||||
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 <riverinterface.h>
|
||||
#include <berointerface.h>
|
||||
#include <berofactoryinterface.h>
|
||||
|
||||
class ConfigFile;
|
||||
|
||||
@@ -47,6 +48,7 @@ public:
|
||||
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
BeRoInterface* createBeRo();
|
||||
BeRoFactoryInterface* createBeRoFactory();
|
||||
|
||||
private:
|
||||
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 "clientriver.h"
|
||||
#include "clientbero.h"
|
||||
#include "clientberofactory.h"
|
||||
|
||||
|
||||
|
||||
@@ -78,3 +79,8 @@ BeRoInterface* ClientEngineFactory::createBeRo()
|
||||
{
|
||||
return new ClientBeRo();
|
||||
}
|
||||
|
||||
BeRoFactoryInterface* ClientEngineFactory::createBeRoFactory()
|
||||
{
|
||||
return new ClientBeRoFactory();
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <turninterface.h>
|
||||
#include <riverinterface.h>
|
||||
#include <berointerface.h>
|
||||
#include <berofactoryinterface.h>
|
||||
|
||||
|
||||
class ConfigFile;
|
||||
@@ -47,6 +48,7 @@ public:
|
||||
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
BeRoInterface* createBeRo();
|
||||
BeRoFactoryInterface* createBeRoFactory();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user