Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FCCommandLineArguments Class Reference

Handles all command line arguments.

#include <FCCommandLineArguments.h>

Inheritance diagram for FCCommandLineArguments:

TestCommandLineArguments List of all members.

Public Member Functions

 FCCommandLineArguments ()
 Constructor.
virtual ~FCCommandLineArguments ()
 Destructor.
bool Parse (int argc, char **argv)
 Parse the command line.
bool Verify ()
 Verify the validity of the command line arguments.
int GetMaxDepth ()
 Get the max depth parameter.
int GetMaxNumberOfIterations ()
 Get the max number of iterations parameter.
int GetNumberOfTests ()
 Get the number of tests for the solver.
char GetTestOrderNumber (int Number)
 Get test number.
int GetNumberOfFreecells ()
 Get the number of freecells used for the game.
int GetNumberOfStacks ()
 Get the number of stacks used for the game.
int GetNumberOfDecks ()
 Get the number of decks used for the game.
int GetSeed ()
 Get the randomize seed initializer (used for random-DFS).
int GetMaxStoredStates ()
 Get the maximum number of stored states.
BuildSequenceByEnum GetSequenceBuildType ()
 Get the sequence by which the cards are build for the game.
bool GetIsSequenceMoveUnlimited ()
 Get flag determining whether sequence moves are unlimited in size.
FCEmptyStacksFillType GetEmptyStacksFill ()
 Get how empty stacks are filled in a game.
char * GetGameName ()
 Get the name of the game being played.
char * GetAStarWeights ()
 Get a string of the a-star weights.
double GetAStarWeightValues (int Number)
 Get a specific a-star weight value.
FCStateType GetStateType ()
 Get the state type used in the game.
FCStorageType GetStateStorageType ()
 Get the type of storage used for the states in the game.
FCStorageType GetStackStorageType ()
 Get the type of storage used for the stacks in the game.
FCSTalonType GetTalonType ()
 Get the talon type of the game.
FCSolvingMethodType GetSolvingMethodType ()
 Get the solving method used to solve the game.
bool GetOptimizeSolution ()
 Get flag determining if a solved solution should be optimized.
FCSStateWithLocationsGetInitialState ()
 Get the initial state of the game to solve.
FCSDebugDisplayInfoGetDebugDisplayInfo ()
 Get the debug display parameters.

Protected Attributes

bool m_DisplayHelp
 Flag determining if command line help should be displayed.
int m_NumberOfFreecells
 Number of freecells in the game.
int m_NumberOfStacks
 Number of stacks in the game.
int m_NumberOfDecks
 Number of decks in the game.
char m_SequencesBuiltBy [FC_SIZE_OF_SEQUENCE_BUILT_BY]
 String holding command line parameter determining how sequences are built.
BuildSequenceByEnum m_SequencesBuiltByType
 Sequence build type for the game.
char m_SequenceMoveUnlimited [FC_SIZE_OF_SEQUENCE_MOVE]
 String holding command line parameter determining if sequence moves are unlimited.
bool m_IsSequenceMoveUnlimited
 Flag determining if sequence moves are unlimited.
char m_EmptyStacksFilledBy [FC_SIZE_OF_EMPTY_STACK_FILLED_BY]
 String holding command line parameter determining how empty stacks are filled.
FCEmptyStacksFillType m_EmptyStacksFilledByType
 How empty stacks are filled in the game.
char m_GameName [FC_SIZE_OF_GAME_NAME]
 Name of the game being played.
int m_MaxNumberOfIterations
 The maximum number of states that will be checked by the solving algorithm.
int m_MaxDepth
 Maximum depth the solving algorithm will explore.
char m_TempTestOrder [FCS_TESTS_NUM *3+1]
 String holding command line parameter determining the test order.
int m_TestOrder [FCS_TESTS_NUM]
 The order the tests will be performed.
int m_NumberOfTests
 The number of tests being performed (per state).
char m_SolvingMethod [FC_SIZE_OF_SOLVING_METHOD]
 String holding command line parameter determining the solving method.
FCSolvingMethodType m_SolvingMethodType
 The solving method used.
char m_AStarWeights [FC_SIZE_OF_ASTAR_WEIGHT_ARRAY]
double m_AStarWeightValues [FC_NUMBER_OF_ASTAR_WEIGHTS]
 The values of a-star weights.
int m_Seed
 Randomize seed initializer.
int m_MaxStoredStates
 Maximum number of stored states.
bool m_OptimizeSolution
 Flag to optimize a solved solution.
char m_StateTypeArray [FC_SIZE_OF_STATE_TYPE_ARRAY]
 String holding command line parameter determining the state type used.
FCStateType m_StateType
 State type (debug, compact, indirect).
char m_StateStorage [FC_SIZE_OF_STATE_STORAGE]
 String holding command line parameter determining the type of storage for states.
char m_StackStorage [FC_SIZE_OF_STACK_STORAGE]
 String holding command line parameter determining the type of storage for stacks.
char m_Talon [FC_SIZE_OF_TALON]
 String holding command line parameter determining the type of talon.
FCSTalonType m_TalonType
 Talon type used for the game.
FCStorageType m_StateStorageType
 How the states are stored.
FCStorageType m_StackStorageType
 How the stacks are stored.
char m_UserState [FC_SIZE_OF_INPUT_USER_STATE]
 String representing a string version of the start state of the game.
FCSStateWithLocationsm_InitialState
 The initial state in the game.
FCSDebugDisplayInfom_DebugDisplayInfo
 Debug display parameters.

Detailed Description

Definition at line 43 of file FCCommandLineArguments.h.


Member Function Documentation

char * FCCommandLineArguments::GetAStarWeights  ) 
 

Returns:
A string of all the a-star weight values

Definition at line 872 of file FCCommandLineArguments.cpp.

References m_AStarWeights.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::FCSAStarSolvingAlgorithm().

double FCCommandLineArguments::GetAStarWeightValues int  Number  ) 
 

Parameters:
Number is the weight requested
Returns:
Weight value requested

Definition at line 877 of file FCCommandLineArguments.cpp.

References m_AStarWeightValues.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::FCSAStarSolvingAlgorithm().

FCSDebugDisplayInfo * FCCommandLineArguments::GetDebugDisplayInfo  ) 
 

Returns:
A pointer to the debug display parameters

Definition at line 917 of file FCCommandLineArguments.cpp.

References m_DebugDisplayInfo.

Referenced by FCSFreecellData::FCSFreecellData().

FCEmptyStacksFillType FCCommandLineArguments::GetEmptyStacksFill  ) 
 

Returns:
Empty stack fill type

Definition at line 862 of file FCCommandLineArguments.cpp.

References m_EmptyStacksFilledByType.

Referenced by FCSFreecellData::FCSFreecellData().

char * FCCommandLineArguments::GetGameName  ) 
 

Returns:
A string of the name of the game

Definition at line 867 of file FCCommandLineArguments.cpp.

References m_GameName.

Referenced by main(), and TestEachGame().

FCSStateWithLocations * FCCommandLineArguments::GetInitialState  ) 
 

Returns:
A pointer to the initial state

Definition at line 912 of file FCCommandLineArguments.cpp.

References m_InitialState.

Referenced by main(), and TestEachGame().

bool FCCommandLineArguments::GetIsSequenceMoveUnlimited  ) 
 

Returns:
Unlimited sequence moves flag

Definition at line 857 of file FCCommandLineArguments.cpp.

References m_IsSequenceMoveUnlimited.

Referenced by FCSFreecellData::FCSFreecellData().

int FCCommandLineArguments::GetMaxDepth  ) 
 

Returns:
Max depth

Definition at line 807 of file FCCommandLineArguments.cpp.

References m_MaxDepth.

Referenced by FCSFreecellData::FCSFreecellData().

int FCCommandLineArguments::GetMaxNumberOfIterations  ) 
 

Returns:
Max number of interations

Definition at line 812 of file FCCommandLineArguments.cpp.

References m_MaxNumberOfIterations.

Referenced by FCSFreecellData::FCSFreecellData().

int FCCommandLineArguments::GetMaxStoredStates  ) 
 

Returns:
Maximum number of stored states

Definition at line 842 of file FCCommandLineArguments.cpp.

References m_MaxStoredStates.

Referenced by FCSFreecellData::FCSFreecellData().

int FCCommandLineArguments::GetNumberOfDecks  ) 
 

Returns:
Number of decks in the games

Definition at line 837 of file FCCommandLineArguments.cpp.

References m_NumberOfDecks.

Referenced by FCSFreecellData::FCSFreecellData().

int FCCommandLineArguments::GetNumberOfFreecells  ) 
 

Returns:
Number of freecells in the games

Definition at line 827 of file FCCommandLineArguments.cpp.

References m_NumberOfFreecells.

Referenced by FCSFreecellData::FCSFreecellData(), main(), and TestEachGame().

int FCCommandLineArguments::GetNumberOfStacks  ) 
 

Returns:
Number of stacks in the games

Definition at line 832 of file FCCommandLineArguments.cpp.

References m_NumberOfStacks.

Referenced by FCSFreecellData::FCSFreecellData(), main(), and TestEachGame().

int FCCommandLineArguments::GetNumberOfTests  ) 
 

Returns:
Number of tests

Definition at line 817 of file FCCommandLineArguments.cpp.

References m_NumberOfTests.

Referenced by FCSFreecellData::FCSFreecellData().

bool FCCommandLineArguments::GetOptimizeSolution  ) 
 

Returns:
Optimization flag

Definition at line 907 of file FCCommandLineArguments.cpp.

References m_OptimizeSolution.

Referenced by FCSFreecellData::FCSFreecellData(), main(), and TestEachGame().

int FCCommandLineArguments::GetSeed  ) 
 

Returns:
Seed initializer

Definition at line 847 of file FCCommandLineArguments.cpp.

References m_Seed.

Referenced by FCSRandomDFSSolvingAlgorithm< SolvingAlgorithmType >::FCSRandomDFSSolvingAlgorithm().

BuildSequenceByEnum FCCommandLineArguments::GetSequenceBuildType  ) 
 

Returns:
Build sequence

Definition at line 852 of file FCCommandLineArguments.cpp.

References m_SequencesBuiltByType.

Referenced by FCSFreecellData::FCSFreecellData().

FCSolvingMethodType FCCommandLineArguments::GetSolvingMethodType  ) 
 

Returns:
Solving method

Definition at line 882 of file FCCommandLineArguments.cpp.

References m_SolvingMethodType.

Referenced by FCSTalonSolvingAlgorithm::Create(), FCSSimpleSimonSolvingAlgorithm::Create(), and FCSFreecellSolvingAlgorithm::Create().

FCStorageType FCCommandLineArguments::GetStackStorageType  ) 
 

Returns:
Storage type for stacks

Definition at line 897 of file FCCommandLineArguments.cpp.

References m_StackStorageType.

Referenced by FCSFreecellData::FCSFreecellData().

FCStorageType FCCommandLineArguments::GetStateStorageType  ) 
 

Returns:
Storage type for states

Definition at line 892 of file FCCommandLineArguments.cpp.

References m_StateStorageType.

Referenced by FCSFreecellData::FCSFreecellData().

FCStateType FCCommandLineArguments::GetStateType  ) 
 

Returns:
State type

Definition at line 887 of file FCCommandLineArguments.cpp.

References m_StateType.

Referenced by FCSFreecellData::FCSFreecellData().

FCSTalonType FCCommandLineArguments::GetTalonType  ) 
 

Returns:
Talon type

Definition at line 902 of file FCCommandLineArguments.cpp.

References m_TalonType.

Referenced by FCSTalonSolvingAlgorithm::FCSTalonSolvingAlgorithm().

char FCCommandLineArguments::GetTestOrderNumber int  Number  ) 
 

Parameters:
Number is the order number of the test
Returns:
Test number at that order position

Definition at line 822 of file FCCommandLineArguments.cpp.

References m_TestOrder.

Referenced by FCSFreecellData::FCSFreecellData().

bool FCCommandLineArguments::Parse int  argc,
char **  argv
 

Parameters:
argc is the number of arguments
argv is an array of null-terminated strings
Returns:
Return true for successful parse, false otherwise

Definition at line 64 of file FCCommandLineArguments.cpp.

References DEBUG_CANONIZED_ORDER_OUTPUT, DEBUG_DISPLAY_10_AS_T, DEBUG_DISPLAY_MOVES, DEBUG_DISPLAY_PARENT_ITERATIONS, DEBUG_DISPLAY_STATES, DEBUG_IS_OUTPUT_PARSEABLE, DEBUG_ITERATIVE_STATE_OUTPUT, DEBUG_USE_STANDARD_NOTATION, m_AStarWeights, m_DebugDisplayInfo, FCSDebugDisplayInfo::m_DisplayDebug, FCSDebugDisplayInfo::m_DisplayDebugOptions, m_DisplayHelp, m_EmptyStacksFilledBy, m_GameName, m_MaxDepth, m_MaxNumberOfIterations, m_MaxStoredStates, m_NumberOfDecks, FCSDebugDisplayInfo::m_NumberOfDecks, m_NumberOfFreecells, FCSDebugDisplayInfo::m_NumberOfFreecells, m_NumberOfStacks, FCSDebugDisplayInfo::m_NumberOfStacks, m_OptimizeSolution, m_Seed, m_SequenceMoveUnlimited, m_SequencesBuiltBy, m_SolvingMethod, m_StackStorage, m_StateStorage, m_StateTypeArray, m_Talon, m_TempTestOrder, and m_UserState.

Referenced by main(), TestCommandLineArguments::TestDisplayDebugOptionsBool(), TestEachGame(), TestCommandLineArguments::TestParseBool(), TestCommandLineArguments::TestParseString(), and TestCommandLineArguments::TestParseValue().

bool FCCommandLineArguments::Verify  ) 
 

Returns:
Return true for successful verification, false otherwise

Definition at line 279 of file FCCommandLineArguments.cpp.

References FCSStateWithLocations::CheckStateValidity(), CreateInitialState(), DEBUG_DISPLAY_10_AS_T, DEBUG_DISPLAY_MOVES, DEBUG_USE_STANDARD_NOTATION, DisplayHelp(), FC_NUMBER_OF_ASTAR_WEIGHTS, FC_SIZE_OF_ASTAR_WEIGHT_ARRAY, FCSApplyTestOrder(), FCSPreset::GetPresetInfo(), GlobalStateType, m_AStarWeights, m_AStarWeightValues, m_DebugDisplayInfo, FCSDebugDisplayInfo::m_DisplayDebug, FCSDebugDisplayInfo::m_DisplayDebugOptions, m_DisplayHelp, FCSPreset::m_EmptyStacksFill, m_EmptyStacksFilledBy, m_EmptyStacksFilledByType, m_GameName, m_InitialState, m_IsSequenceMoveUnlimited, m_MaxDepth, m_MaxNumberOfIterations, FCSDebugDisplayInfo::m_NumberOfDecks, FCSPreset::m_NumberOfDecks, m_NumberOfDecks, FCSDebugDisplayInfo::m_NumberOfFreecells, FCSPreset::m_NumberOfFreecells, m_NumberOfFreecells, FCSDebugDisplayInfo::m_NumberOfStacks, FCSPreset::m_NumberOfStacks, m_NumberOfStacks, m_NumberOfTests, m_SequenceMoveUnlimited, FCSPreset::m_SequencesAreBuiltBy, m_SequencesBuiltBy, m_SequencesBuiltByType, m_SolvingMethod, m_SolvingMethodType, m_StackStorage, m_StackStorageType, m_StateStorage, m_StateStorageType, m_StateType, m_StateTypeArray, m_Talon, FCSPreset::m_TalonType, FCSDebugDisplayInfo::m_TalonType, m_TalonType, m_TempTestOrder, FCSPreset::m_TestOrder, m_TestOrder, FCSPreset::m_UnlimitedSequenceMove, m_UserState, and FCSCard::Perl2User().

Referenced by main(), and TestEachGame().


Member Data Documentation

char FCCommandLineArguments::m_AStarWeights[FC_SIZE_OF_ASTAR_WEIGHT_ARRAY] [protected]
 

String holding command line parameter determining the a-star weights when the a-star solving algorithm is used

Definition at line 240 of file FCCommandLineArguments.h.

Referenced by FCCommandLineArguments(), GetAStarWeights(), Parse(), TestCommandLineArguments::TestConstructor(), TestCommandLineArguments::TestParse(), and Verify().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 11:20:16 2005 for Cpp Freecell Solver by  doxygen 1.4.4