Code::Blocks  SVN r11506
compileroptions.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef COMPILEROPTIONS_H
7 #define COMPILEROPTIONS_H
8 
9 #include <wx/dynarray.h>
10 #include <wx/intl.h>
11 #include <wx/string.h>
12 #include "settings.h"
13 
14 struct CompOption
15 {
16  // following comments are an example of an option
17  wxString name; // "Profile code"
18  wxString option; // "-pg"
20  bool enabled; // true/false
21  wxString category; // "Profiling"
22  wxString checkAgainst; // "-O -O1 -O2 -O3 -Os" (will check for these options and if any of them is found, will display the following message)
23  wxString checkMessage; // "You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."
24  wxString supersedes; // "-O -O1 -O2" (will check for these options and disable any of them that are found)
25  bool exclusive; // true/false (will ensure that only one item in this category is ever selected)
26 };
27 
28 WX_DEFINE_ARRAY(CompOption*, OptionsArray);
29 
31 {
32  public:
34  CompilerOptions(const CompilerOptions& other);
35  CompilerOptions& operator=(const CompilerOptions& other);
36  ~CompilerOptions();
37  void ClearOptions();
38  void AddOption(CompOption* coption, int index = -1);
39  void AddOption(const wxString& name,
40  const wxString& option,
41  const wxString& category = _("General"),
46  bool exclusive = false,
47  int index = -1);
48  void RemoveOption(int index);
49  unsigned int GetCount() const { return m_Options.GetCount(); }
50  CompOption* GetOption(int index){ return m_Options[index]; }
51  CompOption* GetOptionByName(const wxString& name);
52  CompOption* GetOptionByOption(const wxString& option);
53  CompOption* GetOptionByAdditionalLibs(const wxString& libs);
54  protected:
55  private:
56  OptionsArray m_Options;
57 };
58 
59 #endif // COMPILEROPTIONS_H
wxString additionalLibs
wxString supersedes
CompOption * GetOption(int index)
OptionsArray m_Options
wxString name
wxString option
#define DLLIMPORT
Definition: settings.h:16
unsigned int GetCount() const
wxString wxEmptyString
const wxString & _(const wxString &string)
wxString category
wxString checkMessage
wxString checkAgainst
WX_DEFINE_ARRAY(CompOption *, OptionsArray)