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
src
cbworkspace.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 CBWORKSPACE_H
21
#define CBWORKSPACE_H
22
//------------------------------------------------------------------------------
23
#include "
stlstrings.h
"
24
#include "
cbproject.h
"
25
//------------------------------------------------------------------------------
26
27
class
TiXmlElement;
28
class
CToolChainSet
;
29
30
class
CCodeBlocksWorkspace
;
31
class
CProjectWeightComparison
;
32
33
class
CWorkspaceUnit
34
{
35
friend
class
CCodeBlocksWorkspace
;
36
friend
class
CProjectWeightComparison
;
37
private
:
38
CString
m_FileName
;
39
CStringList
m_Depends
;
40
CCodeBlocksProject
m_Project
;
41
int
m_Weight
;
42
public
:
43
void
Clear
(
void
);
44
void
Read
(
const
TiXmlElement* UnitRoot);
45
void
Show
(
void
);
46
bool
LoadProject
(
const
CString
& WorkspacePath);
47
public
:
48
CWorkspaceUnit
(
void
);
49
~CWorkspaceUnit
(
void
);
50
};
51
52
class
CCodeBlocksWorkspace
53
{
54
private
:
55
CString
m_Title
;
56
std::vector<CWorkspaceUnit *>
m_Units
;
57
CStringList
m_TargetNames
;
58
CStringList
m_MakefileNames
;
59
CStringList
m_MakefilePaths
;
60
CStringList
m_TargetDeps
;
61
CStringList
m_MakefileText
;
62
CMakefile
m_Makefile
;
63
protected
:
64
int
CalculateProjectWeight
(
const
size_t
Index = 0);
65
void
ResolveProjectDependencies
(
void
);
66
void
SortProjectsByWeight
(
void
);
67
public
:
68
void
Clear
(
void
);
69
void
Read
(
const
TiXmlElement* WorkspaceRoot);
70
bool
LoadWorkspaceProjects
(
const
CString
& WorkspacePath);
71
bool
LoadWorkspace
(
const
CString
& FileName);
72
void
Show
(
const
bool
ShowProjects =
false
);
73
bool
GenerateMakefile
(
const
CString
& FileName,
CCodeBlocksBuildConfig
& Config);
74
void
GenerateMakefileText
(
const
CString
& FileName,
CCodeBlocksBuildConfig
& Config);
75
public
:
76
CCodeBlocksWorkspace
(
void
);
77
~CCodeBlocksWorkspace
(
void
);
78
};
79
80
#endif
81
//------------------------------------------------------------------------------
Generated on Sun Jun 9 2013 10:55:52 for cbp2make by
1.8.4