Code::Blocks  SVN r11506
directcommands.h
Go to the documentation of this file.
1 #ifndef DIRECTCOMMANDS_H
2 #define DIRECTCOMMANDS_H
3 
4 #include <wx/string.h>
5 #include <wx/hashmap.h>
6 
7 extern const wxString COMPILER_SIMPLE_LOG;
8 extern const wxString COMPILER_NOTE_LOG;
9 extern const wxString COMPILER_WARNING_LOG;
10 extern const wxString COMPILER_ERROR_LOG;
11 extern const wxString COMPILER_TARGET_CHANGE;
12 extern const wxString COMPILER_WAIT;
13 extern const wxString COMPILER_WAIT_LINK;
14 
15 extern const wxString COMPILER_NOTE_ID_LOG;
17 extern const wxString COMPILER_ERROR_ID_LOG;
18 
19 
20 // forward decls
22 class CompilerGCC;
23 class Compiler;
24 class cbProject;
25 class ProjectBuildTarget;
26 class ProjectFile;
27 class pfDetails;
28 
29 WX_DEFINE_ARRAY(ProjectFile*, MyFilesArray); // keep our own copy, to sort it by file weight (priority)
30 
32 {
35  public:
36  DirectCommands(CompilerGCC* compilerPlugin,
37  Compiler* compiler,
38  cbProject* project,
39  int logPageIndex = 0);
41 
44  wxArrayString CompileFile(ProjectBuildTarget* target, ProjectFile* pf, bool force = false) const;
46  wxArrayString GetCompileSingleFileCommand(const wxString& filename) const;
47  wxArrayString GetCompileCommands(ProjectBuildTarget* target, bool force = false) const;
48  wxArrayString GetTargetCompileCommands(ProjectBuildTarget* target, bool force = false) const;
49  wxArrayString GetLinkCommands(ProjectBuildTarget* target, bool force = false) const;
50  wxArrayString GetTargetLinkCommands(ProjectBuildTarget* target, bool force = false) const;
51  wxArrayString GetCleanCommands(ProjectBuildTarget* target, bool distclean = false) const;
52  wxArrayString GetCleanSingleFileCommand(const wxString& filename) const;
53  wxArrayString GetTargetCleanCommands(ProjectBuildTarget* target, bool distclean = false) const;
54 
55  bool m_doYield;
56  protected:
57  bool AreExternalDepsOutdated(ProjectBuildTarget* target, const wxString& buildOutput, wxArrayString* filesMissing) const;
58  bool IsObjectOutdated(ProjectBuildTarget* target, const pfDetails& pfd, wxString* errorStr = 0) const;
59  void DepsSearchStart(ProjectBuildTarget* target) const;
60  MyFilesArray GetProjectFilesSortedByWeight(ProjectBuildTarget* target, bool compile, bool link) const;
61  void AddCommandsToArray(const wxString& cmds, wxArrayString& array, bool isWaitCmd = false, bool isLinkCmd = false) const;
62 
68  private:
69 };
70 
71 #endif // DIRECTCOMMANDS_H
WX_DEFINE_ARRAY(ProjectFile *, MyFilesArray)
const wxString COMPILER_WARNING_ID_LOG
Generate command-lines needed to produce a build.
const wxString COMPILER_SIMPLE_LOG
const wxString COMPILER_WAIT
void AddCommandsToArray(const wxString &cmds, wxArrayString &array, bool isWaitCmd=false, bool isLinkCmd=false) const
const wxString COMPILER_ERROR_LOG
const wxString COMPILER_WARNING_LOG
const wxString COMPILER_NOTE_LOG
wxArrayString GetTargetLinkCommands(ProjectBuildTarget *target, bool force=false) const
Represents a file in a Code::Blocks project.
Definition: projectfile.h:39
wxArrayString GetTargetCompileCommands(ProjectBuildTarget *target, bool force=false) const
wxArrayString GetCompileSingleFileCommand(const wxString &filename) const
This is to be used only for files not belonging to a project!!!
const wxString COMPILER_TARGET_CHANGE
wxArrayString GetPreBuildCommands(ProjectBuildTarget *target) const
DirectCommands & operator=(DirectCommands &)
Represents a Code::Blocks project.
Definition: cbproject.h:96
bool AreExternalDepsOutdated(ProjectBuildTarget *target, const wxString &buildOutput, wxArrayString *filesMissing) const
external deps are manually set by the user e.g.
wxArrayString GetTargetCleanCommands(ProjectBuildTarget *target, bool distclean=false) const
wxArrayString GetCompileCommands(ProjectBuildTarget *target, bool force=false) const
wxArrayString GetCleanCommands(ProjectBuildTarget *target, bool distclean=false) const
bool IsObjectOutdated(ProjectBuildTarget *target, const pfDetails &pfd, wxString *errorStr=0) const
This is a helper class that caches various filenames for one ProjectFile.
Definition: projectfile.h:241
void DepsSearchStart(ProjectBuildTarget *target) const
wxArrayString CompileFile(ProjectBuildTarget *target, ProjectFile *pf, bool force=false) const
wxArrayString GetPostBuildCommands(ProjectBuildTarget *target) const
Abstract base class for compilers.
Definition: compiler.h:274
wxArrayString GetCompileFileCommand(ProjectBuildTarget *target, ProjectFile *pf) const
cbProject * m_pProject
Compiler * m_pCompiler
CompilerCommandGenerator * m_pGenerator
MyFilesArray GetProjectFilesSortedByWeight(ProjectBuildTarget *target, bool compile, bool link) const
Represents a Code::Blocks project build target.
DirectCommands(DirectCommands &)
const wxString COMPILER_NOTE_ID_LOG
wxArrayString GetLinkCommands(ProjectBuildTarget *target, bool force=false) const
wxArrayString GetCleanSingleFileCommand(const wxString &filename) const
This is to be used only for files not belonging to a project!!!
const wxString COMPILER_ERROR_ID_LOG
CompilerGCC * m_pCompilerPlugin