TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | Static Public Member Functions | List of all members
cherrypi::OpenBwProcess Class Reference

Launches and manages an OpenBW process. More...

#include <openbwprocess.h>

Public Member Functions

 OpenBwProcess (std::vector< EnvVar > const &vars)
 
 OpenBwProcess (std::string, std::vector< EnvVar > const &vars)
 
 ~OpenBwProcess ()
 
bool connect (torchcraft::Client *client, int timeoutMs=-1)
 Connect a TorchCraft client to this instance. More...
 

Static Public Member Functions

static void preventFurtherProcesses ()
 No further forks will be started, and subsequent OpenBwProcess constructors will throw. More...
 

Detailed Description

Launches and manages an OpenBW process.

Constructor & Destructor Documentation

cherrypi::OpenBwProcess::OpenBwProcess ( std::vector< EnvVar > const &  vars)
cherrypi::OpenBwProcess::OpenBwProcess ( std::string  bot,
std::vector< EnvVar > const &  vars 
)
cherrypi::OpenBwProcess::~OpenBwProcess ( )

Member Function Documentation

bool cherrypi::OpenBwProcess::connect ( torchcraft::Client client,
int  timeoutMs = -1 
)

Connect a TorchCraft client to this instance.

The timeout is passed to the client and the future to wait on openbw, and it is executed in sequence, so the total timeout might be 2 * timeout Returns whether the client connected successfully connected.

void cherrypi::OpenBwProcess::preventFurtherProcesses ( )
static

No further forks will be started, and subsequent OpenBwProcess constructors will throw.


The documentation for this class was generated from the following files: