cbp2make
Makefile generation tool for Code::Blocks IDE
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
lib
stlgpm.h
Go to the documentation of this file.
1
/*
2
cbp2make : Makefile generation tool for the Code::Blocks IDE
3
Copyright (C) 2010-2013 Mirai Computing (mirai.computing@gmail.com)
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
//------------------------------------------------------------------------------
20
#ifndef STL_GPM_H
21
#define STL_GPM_H
22
//------------------------------------------------------------------------------
23
#include "
stlconfig.h
"
24
//------------------------------------------------------------------------------
25
26
class
CGenericProcessingMachine
27
{
28
protected
:
29
CConfiguration
m_FileConfiguration
;
30
CParameterStringConfiguration
m_ParameterStringConfiguration
;
31
CParameterString
m_ParameterString
;
32
CStringList
m_InputFileList
;
33
CStringList
m_OutputFileList
;
34
int
m_FileIndex
;
35
bool
m_AliasesEnabled
;
36
int
m_FileNameLength
;
37
bool
m_VerboseMode
;
38
bool
m_QuietMode
;
39
bool
m_HelpMode
;
40
protected
:
41
virtual
void
Initialize
(
void
);
42
public
:
43
virtual
void
Initialize
(
int
argc,
char
* argv[]);
44
virtual
void
Initialize
(
const
CParameterString
& Parameters);
45
virtual
void
DisplayHelpMessage
(
void
);
46
virtual
void
CreateConfiguration
(
void
);
47
CString
DefaultConfigurationName
(
void
);
48
virtual
CString
ConfigurationName
(
void
);
49
virtual
bool
Configure
(
const
CString
& FileName);
50
int
GetFileNameLength
(
void
)
const
{
return
m_FileNameLength
; }
51
int
SetFileNameLength
(
const
int
FileNameLength);
52
int
FileIndex
(
void
)
const
{
return
m_FileIndex
; }
53
virtual
CString
TargetName
(
const
int
FileIndex
,
const
CString
& SourceFileName);
54
virtual
bool
ProcessFile
(
const
CString
& SourceFileName,
CString
& TargetFileName);
55
virtual
bool
PreProcess
(
void
);
56
virtual
bool
Run
(
void
);
57
virtual
bool
PostProcess
(
void
);
58
virtual
void
Finalize
(
void
);
59
virtual
void
Print
(std::ostream& out) { };
60
public
:
61
bool
&
AliasesEnabled
(
void
) {
return
m_AliasesEnabled
; }
62
bool
&
BeVerbose
(
void
) {
return
m_VerboseMode
; }
63
bool
&
BeQuiet
(
void
) {
return
m_QuietMode
; }
64
bool
&
DoShowHelp
(
void
) {
return
m_HelpMode
; }
65
CConfiguration
&
CFG
(
void
) {
return
m_FileConfiguration
; }
66
CParameterStringConfiguration
&
PSC
(
void
) {
return
m_ParameterStringConfiguration
; }
67
CParameterString
&
PS
(
void
) {
return
m_ParameterString
; }
68
CStringList
&
ILST
(
void
) {
return
m_InputFileList
; };
69
CStringList
&
OLST
(
void
) {
return
m_OutputFileList
; };
70
public
:
71
CGenericProcessingMachine
(
void
);
72
virtual
~CGenericProcessingMachine
(
void
);
73
};
74
75
const
CString
GPM_VAR_NAME_IN
=
"-in"
;
76
const
CString
GPM_VAR_NAME_OUT
=
"-out"
;
77
const
CString
GPM_VAR_NAME_LIST
=
"-list"
;
78
const
CString
GPM_VAR_NAME_CFG
=
"-cfg"
;
79
const
CString
GPM_VAR_NAME_INDIR
=
"-indir"
;
80
const
CString
GPM_VAR_NAME_OUTDIR
=
"-outdir"
;
81
const
CString
GPM_VAR_NAME_HELP
=
"--help"
;
82
const
CString
GPM_VAR_NAME_VERBOSE
=
"--verbose"
;
83
const
CString
GPM_VAR_NAME_QUIET
=
"--quiet"
;
84
const
CString
GPM_VAR_NAME_HELP_ALIAS
=
"-h"
;
85
const
CString
GPM_VAR_NAME_VERBOSE_ALIAS
=
"-v"
;
86
const
CString
GPM_VAR_NAME_QUIET_ALIAS
=
"-q"
;
87
88
#endif
89
//------------------------------------------------------------------------------
Generated on Sun Jun 9 2013 10:55:50 for cbp2make by
1.8.4