Code::Blocks  SVN r11506
projectbuildtarget.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 PROJECTBUILDTARGET_H
7 #define PROJECTBUILDTARGET_H
8 
9 #include "settings.h"
10 #include "globals.h"
11 #include "compiletargetbase.h"
12 #include "projectfile.h"
13 #include <wx/dynarray.h>
14 #include <wx/filename.h>
15 #include <wx/list.h>
16 #include <wx/treectrl.h>
17 
18 class cbProject;
19 class ProjectBuildTarget;
20 
21 WX_DEFINE_ARRAY(ProjectBuildTarget*, BuildTargets);
22 
25 {
26  public:
28  ProjectBuildTarget(cbProject* parentProject);
30  ~ProjectBuildTarget() override;
31 
33  virtual cbProject* GetParentProject();
35  virtual wxString GetFullTitle() const;
36 
37  //properties
38 
42  virtual const wxString& GetExternalDeps() const;
43 
48  virtual void SetExternalDeps(const wxString& deps);
49 
54  virtual const wxString& GetAdditionalOutputFiles() const;
55 
61  virtual void SetAdditionalOutputFiles(const wxString& files);
62 
65  virtual bool GetIncludeInTargetAll() const;
66 
70  virtual void SetIncludeInTargetAll(bool buildIt);
71 
74  virtual bool GetCreateDefFile() const;
75 
79  virtual void SetCreateDefFile(bool createIt);
80 
83  virtual bool GetCreateStaticLib();
84 
88  virtual void SetCreateStaticLib(bool createIt);
89 
94  virtual bool GetUseConsoleRunner() const;
95 
101  virtual void SetUseConsoleRunner(bool useIt);
102 
103  void SetTargetType(TargetType pt) override; // overriden
104 
110  virtual void AddTargetDep(ProjectBuildTarget* target);
111 
113  virtual BuildTargets& GetTargetDeps();
114 
117  virtual FilesList& GetFilesList(){ return m_Files; }
118 
120  int GetFilesCount(){ return m_Files.size(); }
121 
126  ProjectFile* GetFile(int index);
127 
132  bool RemoveFile(ProjectFile* pf);
133 
134  private:
135  friend class ProjectFile; // to allow it to add/remove files in FilesList
136 
140  BuildTargets m_TargetDeps;
141  FilesList m_Files;
142  ProjectFileArray m_FileArray;
143  bool m_BuildWithAll; // obsolete: left just to convert old projects to use virtual targets
147 };
148 
149 #endif // PROJECTBUILDTARGET_H
Represents a file in a Code::Blocks project.
Definition: projectfile.h:39
ProjectFileArray m_FileArray
#define DLLIMPORT
Definition: settings.h:16
Represents a Code::Blocks project.
Definition: cbproject.h:96
WX_DEFINE_ARRAY(ProjectBuildTarget *, BuildTargets)
virtual FilesList & GetFilesList()
Provides an easy way to iterate all the files belonging in this target.
bool RemoveFile(const wxString &src)
Definition: sc_io.cpp:134
Represents a Code::Blocks project build target.
virtual void SetTargetType(TargetType pt)
Set the target&#39;s type to pt.
TargetType
Enum to define the type of output the target produces.
Base class for build target classes Each Code::Blocks project consists of at least one target...