Definition in file GtpEngine.cpp.
#include "GtpEngine.h"
#include <iomanip>
#include <cassert>
#include <cctype>
#include <fstream>
#include <boost/thread/barrier.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
Go to the source code of this file.
Functions | |
void | Trim (string &str) |
bool | IsCommandLine (const string &line) |
Check, if line contains a command. | |
string | ReplaceEmptyLines (const string &text) |
Replace empty lines in a multi-line string by lines containing a single space. | |
void | Trim (string &str) |
Remove leading and trailing whitespaces from a string. | |
void | Notify (mutex &aMutex, condition &aCondition) |
Variables | |
PonderThread & | m_ponderThread |
GtpEngine & | m_engine |
barrier | m_threadReady |
mutex | m_startPonderMutex |
mutex | m_ponderFinishedMutex |
condition | m_startPonder |
condition | m_ponderFinished |
mutex::scoped_lock | m_ponderFinishedLock |
boost::thread | m_thread |
The thread to run the ponder function. | |
ReadThread & | m_readThread |
GtpInputStream & | m_in |
GtpEngine & | m_engine |
string | m_line |
bool | m_isStreamGood |
barrier | m_threadReady |
mutex | m_waitCommandMutex |
condition | m_waitCommand |
mutex | m_commandReceivedMutex |
condition | m_commandReceived |
mutex::scoped_lock | m_commandReceivedLock |
boost::thread | m_thread |
The thread to run the read command function. |
bool @0::IsCommandLine | ( | const string & | line | ) | [static] |
Check, if line contains a command.
line | The line to check. |
Definition at line 50 of file GtpEngine.cpp.
References Trim().
Referenced by GtpEngine::ExecuteCommand(), and GtpEngine::ExecuteFile().
void @1::Notify | ( | mutex & | aMutex, | |
condition & | aCondition | |||
) | [static] |
Definition at line 125 of file GtpEngine.cpp.
string @0::ReplaceEmptyLines | ( | const string & | text | ) | [static] |
Replace empty lines in a multi-line string by lines containing a single space.
text | The input string. |
Definition at line 84 of file GtpEngine.cpp.
Referenced by GtpEngine::HandleCommand().
void @0::Trim | ( | string & | str | ) | [static] |
Remove leading and trailing whitespaces from a string.
Whitespaces are tab, carriage return and space.
str | The input string. |
Definition at line 107 of file GtpEngine.cpp.
void @0::Trim | ( | string & | str | ) | [static] |
Referenced by GtpCommand::ArgLine(), GtpCommand::Init(), IsCommandLine(), and GtpCommand::RemainingLine().
condition m_commandReceived |
Definition at line 297 of file GtpEngine.cpp.
mutex::scoped_lock m_commandReceivedLock |
Definition at line 299 of file GtpEngine.cpp.
mutex m_commandReceivedMutex |
Definition at line 295 of file GtpEngine.cpp.
Definition at line 283 of file GtpEngine.cpp.
Definition at line 171 of file GtpEngine.cpp.
Definition at line 281 of file GtpEngine.cpp.
bool m_isStreamGood |
Definition at line 287 of file GtpEngine.cpp.
string m_line |
Definition at line 285 of file GtpEngine.cpp.
condition m_ponderFinished |
Definition at line 181 of file GtpEngine.cpp.
mutex::scoped_lock m_ponderFinishedLock |
Definition at line 183 of file GtpEngine.cpp.
mutex m_ponderFinishedMutex |
Definition at line 177 of file GtpEngine.cpp.
PonderThread& m_ponderThread |
Definition at line 166 of file GtpEngine.cpp.
ReadThread& m_readThread |
Definition at line 274 of file GtpEngine.cpp.
condition m_startPonder |
Definition at line 179 of file GtpEngine.cpp.
mutex m_startPonderMutex |
Definition at line 175 of file GtpEngine.cpp.
boost::thread m_thread |
The thread to run the read command function.
Order dependency: must be constructed as the last member, because the constructor starts the thread.
Definition at line 305 of file GtpEngine.cpp.
boost::thread m_thread |
The thread to run the ponder function.
Order dependency: must be constructed as the last member, because the constructor starts the thread.
Definition at line 189 of file GtpEngine.cpp.
barrier m_threadReady |
Definition at line 289 of file GtpEngine.cpp.
barrier m_threadReady |
Definition at line 173 of file GtpEngine.cpp.
condition m_waitCommand |
Definition at line 293 of file GtpEngine.cpp.
mutex m_waitCommandMutex |
Definition at line 291 of file GtpEngine.cpp.