summaryrefslogtreecommitdiffstats
path: root/Source/WXDialog/CommandLineInfo.h
blob: a904bbc1c351f3d536930c80bb897dc34f57b6c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*=========================================================================

  Program:   WXDialog - wxWidgets X-platform GUI Front-End for CMake
  Module:    $RCSfile$
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Author:    Jorgen Bodde

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#if !defined(CMAKECOMMANDLINEINFO_H)
#define CMAKECOMMANDLINEINFO_H

#include "cmStandardIncludes.h"

///////////////////////////////////////////////////////////////
// cmCommandLineInfo:
// See cmCommandLineInfo.cxx for the implementation of this class
//

class cmCommandLineInfo
{ 
  // Construction
public:
  cmCommandLineInfo(); 
  virtual ~cmCommandLineInfo();

  // Parse the command line
  void ParseCommandLine(int argc, char* argv[]);

  // Set the valid arguments
  void SetValidArguments(const std::string& va) { this->m_ValidArguments = va; }

  // Retrieve the path of executable
  std::string GetPathToExecutable() { return this->m_ExecutablePath; }

  // Attributes
public:
  std::string m_WhereSource;
  std::string m_WhereBuild;
  bool m_AdvancedValues;
  std::string m_GeneratorChoiceString;
  std::string m_LastUnknownParameter;
  std::string m_ExecutablePath;
  bool m_ExitAfterLoad;

protected:
  // Parse one argument
  void ParseParam(const std::string& parameter, bool know_about, bool last);

  // Return boolean value of the string
  static int GetBoolValue(const std::string&);

  std::string m_ValidArguments;
};

#endif // !defined(CMAKECOMMANDLINEINFO_H)