Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

FuegoMain.cpp File Reference


Detailed Description

Main function for Fuego.

Definition in file FuegoMain.cpp.

#include "SgSystem.h"
#include <iostream>
#include <boost/filesystem/path.hpp>
#include "FuegoMainEngine.h"
#include "FuegoMainUtil.h"
#include "GoInit.h"
#include "SgDebug.h"
#include "SgException.h"
#include "SgInit.h"
#include <boost/utility.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/cmdline.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options/parsers.hpp>

Go to the source code of this file.

Settings from command line options

bool g_noHandicap = false
bool g_noBook = false
bool g_quiet = false
int g_fixedBoardSize
int g_maxGames
string g_config
path g_programDir
const char * g_programPath
int g_srand

Functions

path GetProgramDir (const char *programPath)
 Get program directory from program path.
void MainLoop ()
void Help (po::options_description &desc)
void ParseOptions (int argc, char **argv)
void PrintStartupMessage ()
int main (int argc, char **argv)


Function Documentation

path @0::GetProgramDir ( const char *  programPath  )  [static]

Get program directory from program path.

Parameters:
programPath Program path taken from argv[0] in main. According to ANSI C, this can be 0.

Definition at line 59 of file FuegoMain.cpp.

Referenced by main().

void @0::Help ( po::options_description &  desc  )  [static]

Definition at line 82 of file FuegoMain.cpp.

Referenced by ParseOptions().

int main ( int  argc,
char **  argv 
)

Definition at line 140 of file FuegoMain.cpp.

References g_programDir, g_programPath, g_quiet, g_srand, GetProgramDir(), GoFini(), GoInit(), MainLoop(), ParseOptions(), PrintStartupMessage(), GtpFailure::Response(), SgRandom::SetSeed(), SgDebug(), SgDebugToNull(), SgFini(), SgInit(), and SgException::what().

void @0::MainLoop (  )  [static]

Definition at line 66 of file FuegoMain.cpp.

References GoGtpEngine::Book(), GoGtpEngine::ExecuteFile(), g_config, g_fixedBoardSize, g_maxGames, g_noBook, g_noHandicap, g_programDir, g_programPath, FuegoMainUtil::LoadBook(), GoGtpEngine::MainLoop(), and GoGtpEngine::SetMaxClearBoard().

Referenced by main().

void @0::ParseOptions ( int  argc,
char **  argv 
) [static]

Definition at line 88 of file FuegoMain.cpp.

References g_config, g_fixedBoardSize, g_maxGames, g_noBook, g_noHandicap, g_quiet, g_srand, and Help().

Referenced by main().

void @0::PrintStartupMessage (  )  [static]

Definition at line 126 of file FuegoMain.cpp.

References SgDebug(), and FuegoMainUtil::Version().

Referenced by main().


Variable Documentation

string g_config [static]

Definition at line 45 of file FuegoMain.cpp.

Referenced by MainLoop(), and ParseOptions().

int g_fixedBoardSize [static]

Definition at line 41 of file FuegoMain.cpp.

Referenced by MainLoop(), and ParseOptions().

int g_maxGames [static]

Definition at line 43 of file FuegoMain.cpp.

Referenced by MainLoop(), and ParseOptions().

bool g_noBook = false [static]

Definition at line 37 of file FuegoMain.cpp.

Referenced by MainLoop(), and ParseOptions().

bool g_noHandicap = false [static]

Definition at line 35 of file FuegoMain.cpp.

Referenced by MainLoop(), and ParseOptions().

path g_programDir [static]

Definition at line 47 of file FuegoMain.cpp.

Referenced by main(), and MainLoop().

const char* g_programPath [static]

Definition at line 49 of file FuegoMain.cpp.

Referenced by main(), and MainLoop().

bool g_quiet = false [static]

Definition at line 39 of file FuegoMain.cpp.

Referenced by main(), and ParseOptions().

int g_srand [static]

Definition at line 51 of file FuegoMain.cpp.

Referenced by main(), and ParseOptions().


17 Jun 2010 Doxygen 1.4.7