Code::Blocks
SVN r11506
include
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"
19
wxString
additionalLibs
;
// "-lgmon"
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
30
class
DLLIMPORT
CompilerOptions
31
{
32
public
:
33
CompilerOptions
();
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"
),
42
const
wxString
&
additionalLibs
=
wxEmptyString
,
43
const
wxString
&
checkAgainst
=
wxEmptyString
,
44
const
wxString
&
checkMessage
=
wxEmptyString
,
45
const
wxString
&
supersedes
=
wxEmptyString
,
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
CompOption::additionalLibs
wxString additionalLibs
Definition:
compileroptions.h:19
intl.h
CompOption
Definition:
compileroptions.h:14
string.h
CompOption::supersedes
wxString supersedes
Definition:
compileroptions.h:24
CompilerOptions::GetOption
CompOption * GetOption(int index)
Definition:
compileroptions.h:50
dynarray.h
CompilerOptions::m_Options
OptionsArray m_Options
Definition:
compileroptions.h:56
CompOption::name
wxString name
Definition:
compileroptions.h:17
CompOption::option
wxString option
Definition:
compileroptions.h:18
DLLIMPORT
#define DLLIMPORT
Definition:
settings.h:16
settings.h
wxString
CompilerOptions::GetCount
unsigned int GetCount() const
Definition:
compileroptions.h:49
CompilerOptions
Definition:
compileroptions.h:30
wxEmptyString
wxString wxEmptyString
_
const wxString & _(const wxString &string)
CompOption::category
wxString category
Definition:
compileroptions.h:21
CompOption::checkMessage
wxString checkMessage
Definition:
compileroptions.h:23
CompOption::exclusive
bool exclusive
Definition:
compileroptions.h:25
CompOption::checkAgainst
wxString checkAgainst
Definition:
compileroptions.h:22
CompOption::enabled
bool enabled
Definition:
compileroptions.h:20
WX_DEFINE_ARRAY
WX_DEFINE_ARRAY(CompOption *, OptionsArray)
Generated by
1.8.13