Code::Blocks
SVN r11506
|
Base class for compiler plugins. More...
#include <cbplugin.h>
Public Member Functions | |
cbCompilerPlugin () | |
virtual int | Run (ProjectBuildTarget *target=nullptr)=0 |
Run the project/target. More... | |
virtual int | Run (const wxString &target)=0 |
Same as Run(ProjectBuildTarget*) but with a wxString argument. More... | |
virtual int | Clean (ProjectBuildTarget *target=nullptr)=0 |
Clean the project/target. More... | |
virtual int | Clean (const wxString &target)=0 |
Same as Clean(ProjectBuildTarget*) but with a wxString argument. More... | |
virtual int | DistClean (ProjectBuildTarget *target=nullptr)=0 |
DistClean the project/target. More... | |
virtual int | DistClean (const wxString &target)=0 |
Same as DistClean(ProjectBuildTarget*) but with a wxString argument. More... | |
virtual int | Build (ProjectBuildTarget *target=nullptr)=0 |
Build the project/target. More... | |
virtual int | Build (const wxString &target)=0 |
Same as Build(ProjectBuildTarget*) but with a wxString argument. More... | |
virtual int | Rebuild (ProjectBuildTarget *target=nullptr)=0 |
Rebuild the project/target. More... | |
virtual int | Rebuild (const wxString &target)=0 |
Same as Rebuild(ProjectBuildTarget*) but with a wxString argument. More... | |
virtual int | BuildWorkspace (const wxString &target=wxEmptyString)=0 |
Build all open projects. More... | |
virtual int | RebuildWorkspace (const wxString &target=wxEmptyString)=0 |
Rebuild all open projects. More... | |
virtual int | CleanWorkspace (const wxString &target=wxEmptyString)=0 |
Clean all open projects. More... | |
virtual int | CompileFile (const wxString &file)=0 |
Compile a specific file. More... | |
virtual int | KillProcess ()=0 |
Abort the current build process. More... | |
virtual bool | IsRunning () const =0 |
Is the plugin currently compiling? More... | |
virtual int | GetExitCode () const =0 |
Get the exit code of the last build process. More... | |
virtual int | Configure (cbProject *project, ProjectBuildTarget *target=nullptr)=0 |
Display configuration dialog. More... | |
Public Member Functions inherited from cbPlugin | |
cbPlugin () | |
In default cbPlugin's constructor the associated PluginInfo structure is filled with default values. More... | |
~cbPlugin () override | |
cbPlugin destructor. More... | |
virtual PluginType | GetType () const |
The plugin must return its type on request. More... | |
virtual int | GetConfigurationPriority () const |
Return the plugin's configuration priority. More... | |
virtual int | GetConfigurationGroup () const |
Return the configuration group for this plugin. More... | |
virtual cbConfigurationPanel * | GetConfigurationPanel (cb_optional wxWindow *parent) |
Return plugin's configuration panel. More... | |
virtual cbConfigurationPanel * | GetProjectConfigurationPanel (cb_optional wxWindow *parent, cb_optional cbProject *project) |
Return plugin's configuration panel for projects. More... | |
virtual void | BuildMenu (cb_optional wxMenuBar *menuBar) |
This method is called by Code::Blocks and is used by the plugin to add any menu items it needs on Code::Blocks's menu bar. More... | |
virtual void | BuildModuleMenu (cb_optional const ModuleType type, cb_optional wxMenu *menu, cb_optional const FileTreeData *data=nullptr) |
This method is called by Code::Blocks core modules (EditorManager, ProjectManager etc) and is used by the plugin to add any menu items it needs in the module's popup menu. More... | |
virtual bool | BuildToolBar (cb_optional wxToolBar *toolBar) |
This method is called by Code::Blocks and is used by the plugin to add any toolbar items it needs on Code::Blocks's toolbar. More... | |
virtual int | GetToolBarPriority () |
This method return the priority of the plugin's toolbar, the less value indicates a more preceding position when C::B starts with no configuration file. More... | |
virtual void | CreateStatusField (cbStatusBar *statusBar) |
This method is called by Code::Blocks and is used by the plugin to add a field on Code::Blocks's statusbar. More... | |
bool | IsAttached () const |
See whether this plugin is attached or not. More... | |
virtual bool | CanDetach () const |
See whether this plugin can be detached (unloaded) or not. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from cbPlugin | |
virtual void | OnAttach () |
Any descendent plugin should override this virtual method and perform any necessary initialization. More... | |
virtual void | OnRelease (cb_optional bool appShutDown) |
Any descendent plugin should override this virtual method and perform any necessary de-initialization. More... | |
virtual void | NotImplemented (const wxString &log) const |
This method logs a "Not implemented" message and is provided for convenience only. More... | |
Protected Attributes inherited from cbPlugin | |
PluginType | m_Type |
Holds the plugin's type. More... | |
bool | m_IsAttached |
Holds the "attached" state. More... | |
Base class for compiler plugins.
This plugin type must offer some pre-defined build facilities, on top of the generic plugin's.
Definition at line 263 of file cbplugin.h.
cbCompilerPlugin::cbCompilerPlugin | ( | ) |
Definition at line 118 of file cbplugin.cpp.
References cbPlugin::m_Type, and ptCompiler.
|
pure virtual |
Build the project/target.
target | The specific build target to build. If NULL, it builds all the targets of the current project. |
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::BatchJob(), and cbDebuggerPlugin::EnsureBuildUpToDate().
|
pure virtual |
Same as Build(ProjectBuildTarget*) but with a wxString argument.
Implemented in CompilerGCC.
|
pure virtual |
Build all open projects.
target | If not empty, the target to build in each project. Else all targets. |
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::BatchJob().
|
pure virtual |
Clean the project/target.
Cleaning a project means deleting any files created by building it. This includes any object files, the binary output file, etc.
target | The specific build target to "clean". If NULL, it cleans all the build targets of the current project. |
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::BatchJob().
|
pure virtual |
Same as Clean(ProjectBuildTarget*) but with a wxString argument.
Implemented in CompilerGCC.
|
pure virtual |
Clean all open projects.
target | If not empty, the target to clean in each project. Else all targets. |
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::BatchJob().
|
pure virtual |
Compile a specific file.
file | The file to compile (must be a project file!) |
Implemented in CompilerGCC.
|
pure virtual |
Display configuration dialog.
project | The selected project (can be NULL). |
target | The selected target (can be NULL). |
Implemented in CompilerGCC.
Referenced by ProjectOptionsDlg::OnProjectBuildOptionsClick(), and ProjectOptionsDlg::OnTargetBuildOptionsClick().
|
pure virtual |
DistClean the project/target.
DistClean will typically remove any config files and anything else that got created as part of building a software package.
target | The specific build target to "distclean". If NULL, it cleans all the build targets of the current project. |
Implemented in CompilerGCC.
|
pure virtual |
Same as DistClean(ProjectBuildTarget*) but with a wxString argument.
Implemented in CompilerGCC.
|
pure virtual |
Get the exit code of the last build process.
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::OnBatchBuildDone(), and cbDebuggerPlugin::OnCompilerFinished().
|
pure virtual |
Is the plugin currently compiling?
Implemented in CompilerGCC.
Referenced by cbDebuggerPlugin::EnsureBuildUpToDate().
|
pure virtual |
Abort the current build process.
Implemented in CompilerGCC.
|
pure virtual |
Rebuild the project/target.
Rebuilding a project is equal to calling Clean() and then Build(). This makes sure that all compilable files in the project will be compiled again.
target | The specific build target to rebuild. If NULL, it rebuilds all the build targets of the current project. |
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::BatchJob().
|
pure virtual |
Same as Rebuild(ProjectBuildTarget*) but with a wxString argument.
Implemented in CompilerGCC.
|
pure virtual |
Rebuild all open projects.
target | If not empty, the target to rebuild in each project. Else all targets. |
Implemented in CompilerGCC.
Referenced by CodeBlocksApp::BatchJob().
|
pure virtual |
Run the project/target.
Running a project means executing its build output. Of course this depends on the selected build target and its type.
target | The specific build target to "run". If NULL, the plugin should ask the user which target to "run" (except maybe if there is only one build target in the project). |
Implemented in CompilerGCC.
|
pure virtual |
Same as Run(ProjectBuildTarget*) but with a wxString argument.
Implemented in CompilerGCC.