cbp2make
Makefile generation tool for Code::Blocks IDE
cbpunit.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 CBP_UNIT_H
21 #define CBP_UNIT_H
22 //------------------------------------------------------------------------------
23 #include "stlstrings.h"
24 #include "cbptarget.h"
25 //------------------------------------------------------------------------------
26 
27 class TiXmlNode;
28 class TiXmlElement;
29 class CCodeBlocksProject;
30 
33 {
34  friend class CUnitWeightComparison;
35  private:
40  bool m_DoLink;
41  int m_Weight;
42  //
44  public:
45  CString FileName(void) const { return m_FileName; }
46  CString Extension(void) const;
47  bool BelongToTarget(const CString& TargetName);
49  bool DoCompile(void) const { return m_DoCompile; }
50  bool DoLink(void) const { return m_DoLink; }
51  int Weight(void) const { return m_Weight; }
52  public:
53  void Clear(void);
54  void Read(const TiXmlElement *UnitRoot);
55  void Show(void);
56  public:
57  CBuildUnit(void);
58  ~CBuildUnit(void);
59 };
60 
61 #endif
62 //------------------------------------------------------------------------------
CString m_ObjectFileName
File name of the object file (a result of compilation) of this build unit.
Definition: cbpunit.h:43
Definition: cbproject.cpp:370
Build unit description.
Definition: cbpunit.h:32
~CBuildUnit(void)
Destroys build unit.
Definition: cbpunit.cpp:35
bool DoCompile(void) const
Definition: cbpunit.h:49
CStringList m_Targets
List of build target names to which this build unit belong.
Definition: cbpunit.h:37
bool BelongToTarget(const CString &TargetName)
Definition: cbpunit.cpp:55
void Read(const TiXmlElement *UnitRoot)
Reads the build unit settings from an XML document.
Definition: cbpunit.cpp:60
bool m_DoCompile
Allows compilation of the build unit.
Definition: cbpunit.h:39
Definition: stlstrings.h:98
void Clear(void)
Resets the build unit to the initial state.
Definition: cbpunit.cpp:40
CBuildUnit(void)
Creates build unit.
Definition: cbpunit.cpp:30
void Show(void)
Prints the build unit contents to standard output.
Definition: cbpunit.cpp:99
Definition: stlstrings.h:32
int m_Weight
Weight (priority) of the build unit.
Definition: cbpunit.h:41
Project description.
Definition: cbproject.h:39
int Weight(void) const
Definition: cbpunit.h:51
CString CompilerVariable(void) const
Definition: cbpunit.h:48
CString m_CompilerVariable
Definition: cbpunit.h:38
CString m_FileName
File name of the build unit.
Definition: cbpunit.h:36
CString FileName(void) const
Definition: cbpunit.h:45
bool DoLink(void) const
Definition: cbpunit.h:50
bool m_DoLink
Allows linking of the build unit.
Definition: cbpunit.h:40
CString Extension(void) const
Definition: cbpunit.cpp:50