CommandLineInfo.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*=========================================================================
  2. Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Author: Jorgen Bodde
  8. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  9. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  10. This software is distributed WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE. See the above copyright notices for more information.
  13. =========================================================================*/
  14. #if !defined(CMAKECOMMANDLINEINFO_H)
  15. #define CMAKECOMMANDLINEINFO_H
  16. #include "cmStandardIncludes.h"
  17. ///////////////////////////////////////////////////////////////
  18. // cmCommandLineInfo:
  19. // See cmCommandLineInfo.cxx for the implementation of this class
  20. //
  21. class cmCommandLineInfo
  22. {
  23. // Construction
  24. public:
  25. cmCommandLineInfo();
  26. virtual ~cmCommandLineInfo();
  27. // Parse the command line
  28. bool ParseCommandLine(int argc, char* argv[]);
  29. // Retrieve the path of executable
  30. wxString GetPathToExecutable() { return this->m_ExecutablePath; }
  31. // Attributes
  32. public:
  33. wxString m_WhereSource;
  34. wxString m_WhereBuild;
  35. bool m_AdvancedValues;
  36. wxString m_GeneratorChoiceString;
  37. wxString m_LastUnknownParameter;
  38. wxString m_ExecutablePath;
  39. bool m_ExitAfterLoad;
  40. private:
  41. // Parse one argument
  42. bool ParseArgument(const wxString& sParam);
  43. // Return boolean value of the string
  44. static int GetBoolValue(const wxString&);
  45. // on windows the argument with spaces SUCKS! So we need to
  46. // incorporate it with quotes.
  47. wxString GetStringParam(const wxString &str);
  48. wxString m_ValidArguments;
  49. };
  50. #endif // !defined(CMAKECOMMANDLINEINFO_H)