00001 #ifndef MMANN_FCCOMMAND_LINE_ARGUMENTS_H 00002 #define MMANN_FCCOMMAND_LINE_ARGUMENTS_H 00003 00011 00012 #include "Config.h" 00013 #include "FCEnums.h" 00014 #include "FCState.h" 00015 #include "FCSDebugDisplayInfo.h" 00016 00018 #define FC_SIZE_OF_SEQUENCE_BUILT_BY 16 00019 00020 #define FC_SIZE_OF_SEQUENCE_MOVE 10 00021 00022 #define FC_SIZE_OF_EMPTY_STACK_FILLED_BY 6 00023 00024 #define FC_SIZE_OF_GAME_NAME 20 00025 00026 #define FC_SIZE_OF_SOLVING_METHOD 9 00027 00028 #define FC_SIZE_OF_ASTAR_WEIGHT_ARRAY 26 00029 00030 #define FC_NUMBER_OF_ASTAR_WEIGHTS 5 00031 00032 #define FC_SIZE_OF_STATE_TYPE_ARRAY 9 00033 00034 #define FC_SIZE_OF_STATE_STORAGE 10 00035 00036 #define FC_SIZE_OF_STACK_STORAGE 10 00037 00038 #define FC_SIZE_OF_TALON 9 00039 00040 #define FC_SIZE_OF_INPUT_USER_STATE 1024 00041 00043 class FCCommandLineArguments 00044 { 00045 public: 00047 FCCommandLineArguments(); 00048 00049 //The initial state will NOT be deleted here if it's valid 00051 virtual ~FCCommandLineArguments(); 00052 00058 bool Parse(int argc, char **argv); 00059 00063 bool Verify(); 00064 00068 int GetMaxDepth(); 00069 00073 int GetMaxNumberOfIterations(); 00074 00078 int GetNumberOfTests(); 00079 00084 char GetTestOrderNumber(int Number); 00085 00089 int GetNumberOfFreecells(); 00090 00094 int GetNumberOfStacks(); 00095 00099 int GetNumberOfDecks(); 00100 00104 int GetSeed(); 00105 00109 int GetMaxStoredStates(); 00110 00114 BuildSequenceByEnum GetSequenceBuildType(); 00115 00119 bool GetIsSequenceMoveUnlimited(); 00120 00124 FCEmptyStacksFillType GetEmptyStacksFill(); 00125 00129 char* GetGameName(); 00130 00134 char* GetAStarWeights(); 00135 00140 double GetAStarWeightValues(int Number); 00141 00145 FCStateType GetStateType(); 00146 00150 FCStorageType GetStateStorageType(); 00151 00155 FCStorageType GetStackStorageType(); 00156 00160 FCSTalonType GetTalonType(); 00161 00165 FCSolvingMethodType GetSolvingMethodType(); 00166 00170 bool GetOptimizeSolution(); 00171 00175 FCSStateWithLocations* GetInitialState(); 00176 00180 FCSDebugDisplayInfo* GetDebugDisplayInfo(); 00181 00182 protected: 00183 00185 bool m_DisplayHelp; 00186 00188 int m_NumberOfFreecells; 00189 00191 int m_NumberOfStacks; 00192 00194 int m_NumberOfDecks; 00195 00197 char m_SequencesBuiltBy[FC_SIZE_OF_SEQUENCE_BUILT_BY]; 00198 00200 BuildSequenceByEnum m_SequencesBuiltByType; 00201 00203 char m_SequenceMoveUnlimited[FC_SIZE_OF_SEQUENCE_MOVE]; 00204 00206 bool m_IsSequenceMoveUnlimited; 00207 00209 char m_EmptyStacksFilledBy[FC_SIZE_OF_EMPTY_STACK_FILLED_BY]; 00210 00212 FCEmptyStacksFillType m_EmptyStacksFilledByType; 00213 00215 char m_GameName[FC_SIZE_OF_GAME_NAME]; 00216 00218 int m_MaxNumberOfIterations; 00219 00221 int m_MaxDepth; 00222 00224 char m_TempTestOrder[FCS_TESTS_NUM*3+1]; 00225 00227 int m_TestOrder[FCS_TESTS_NUM]; 00228 00230 int m_NumberOfTests; 00231 00233 char m_SolvingMethod[FC_SIZE_OF_SOLVING_METHOD]; 00234 00236 FCSolvingMethodType m_SolvingMethodType; 00237 00240 char m_AStarWeights[FC_SIZE_OF_ASTAR_WEIGHT_ARRAY]; 00241 00243 double m_AStarWeightValues[FC_NUMBER_OF_ASTAR_WEIGHTS]; 00244 00246 int m_Seed; 00247 00249 int m_MaxStoredStates; 00250 00252 bool m_OptimizeSolution; 00253 00255 char m_StateTypeArray[FC_SIZE_OF_STATE_TYPE_ARRAY]; 00256 00258 FCStateType m_StateType; 00259 00261 char m_StateStorage[FC_SIZE_OF_STATE_STORAGE]; 00262 00264 char m_StackStorage[FC_SIZE_OF_STACK_STORAGE]; 00265 00267 char m_Talon[FC_SIZE_OF_TALON]; 00268 00270 FCSTalonType m_TalonType; 00271 00273 FCStorageType m_StateStorageType; 00274 00276 FCStorageType m_StackStorageType; 00277 00279 char m_UserState[FC_SIZE_OF_INPUT_USER_STATE]; 00280 00282 FCSStateWithLocations* m_InitialState; 00283 00285 FCSDebugDisplayInfo* m_DebugDisplayInfo; 00286 }; 00287 00288 #endif