Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

cbProject Class Reference

#include <cbproject.h>

Inheritance diagram for cbProject:

CompileTargetBase CompileOptionsBase

List of all members.


Detailed Description

Represents a Code::Blocks project.

A project is a collection of build targets and files. Each project can contain any number of build targets and files.

See also:
ProjectBuildTarget, ProjectFile.

Definition at line 94 of file cbproject.h.


Public Member Functions

virtual void AddBuildScript (const wxString &script)
ProjectBuildTargetAddBuildTarget (const wxString &targetName)
virtual void AddCommandsAfterBuild (const wxString &command)
virtual void AddCommandsBeforeBuild (const wxString &command)
virtual void AddCompilerOption (const wxString &option)
void AddExpandedNode (const wxString &path)
ProjectFileAddFile (int targetIndex, const wxString &filename, bool compile=true, bool link=true, unsigned short int weight=50)
ProjectFileAddFile (const wxString &targetName, const wxString &filename, bool compile=true, bool link=true, unsigned short int weight=50)
virtual void AddIncludeDir (const wxString &option)
virtual void AddLibDir (const wxString &option)
virtual void AddLinkerOption (const wxString &option)
virtual void AddLinkLib (const wxString &lib)
virtual void AddPlatform (int platform)
virtual void AddResourceIncludeDir (const wxString &option)
virtual void AddToExtensions (const wxString &stringDesc)
void BeginAddFiles ()
void BeginRemoveFiles ()
bool BuildTargetValid (const wxString &name, bool virtuals_too=true) const
void BuildTree (wxTreeCtrl *tree, const wxTreeItemId &root, bool categorize, bool useFolders, FilesGroupsAndMasks *fgam=0L)
void CalculateCommonTopLevelPath ()
bool CanAddToVirtualBuildTarget (const wxString &alias, const wxString &target)
bool CanDragNode (wxTreeCtrl *tree, wxTreeItemId node)
 cbProject (const wxString &filename=wxEmptyString)
 Constructor.
void ClearAllProperties ()
bool CloseAllFiles (bool dontsave=false)
bool DefineVirtualBuildTarget (const wxString &alias, const wxArrayString &targets)
ProjectBuildTargetDuplicateBuildTarget (const wxString &targetName, const wxString &newName=wxEmptyString)
ProjectBuildTargetDuplicateBuildTarget (int index, const wxString &newName=wxEmptyString)
void EndAddFiles ()
void EndRemoveFiles ()
const wxArrayString & ExpandedNodes ()
bool ExportTargetAsProject (const wxString &targetName)
bool ExportTargetAsProject (int index)
const wxString & GetActiveBuildTarget () const
virtual const StringHash & GetAllVars () const
virtual bool GetAlwaysRunPostBuildSteps () const
virtual wxString GetBasePath () const
 Read the target's base path, e.g. if GetFilename() returns "/usr/local/bin/xxx", base path will return "/usr/local/bin".
virtual const wxArrayString & GetBuildScripts () const
ProjectBuildTargetGetBuildTarget (const wxString &targetName)
ProjectBuildTargetGetBuildTarget (int index)
int GetBuildTargetsCount ()
virtual const wxArrayString & GetCommandsAfterBuild () const
virtual const wxArrayString & GetCommandsBeforeBuild () const
wxString GetCommonTopLevelPath () const
virtual const wxString & GetCompilerID () const
 Read the target's compiler.
virtual const wxArrayString & GetCompilerOptions () const
ProjectBuildTargetGetCurrentlyCompilingTarget ()
const wxString & GetDefaultExecuteTarget () const
virtual wxString GetDepsOutput () const
 Read the target's dependencies output dir.
virtual wxString GetDynamicLibDefFilename ()
 Read the target's dynamic library definition file filename (produced if target type is ttDynamicLib).
virtual wxString GetDynamicLibFilename ()
 Read the target's dynamic library filename (produced if target type is ttDynamicLib).
virtual wxString GetExecutableFilename () const
 Read the target's executable filename (produced if target type is ttExecutable).
virtual const wxString & GetExecutionParameters () const
 Read the target's execution parameters.
wxArrayString GetExpandedVirtualBuildTargetGroup (const wxString &alias) const
bool GetExtendedObjectNamesGeneration () const
virtual TiXmlNodeGetExtensionsNode ()
ProjectFileGetFile (int index)
ProjectFileGetFileByFilename (const wxString &filename, bool isRelative=true, bool isUnixFilename=false)
virtual const wxString & GetFilename () const
int GetFilesCount ()
wxString GetFirstValidBuildTargetName (bool virtuals_too=true) const
virtual const wxString & GetHostApplication () const
 Read the target's host application.
virtual const wxArrayString & GetIncludeDirs () const
wxDateTime GetLastModificationTime () const
virtual const wxArrayString & GetLibDirs () const
virtual const wxArrayString & GetLinkerOptions () const
virtual const wxArrayString & GetLinkLibs () const
virtual wxString GetMakeCommandFor (MakeCommand cmd) const
 Get the "make" command used for cmd.
const wxString & GetMakefile ()
PCHMode GetModeForPCH () const
bool GetModified () const
virtual wxString GetNativeFilename ()
 Read the target's native filename (produced if target type is ttNative).
const wxString & GetNotes () const
virtual wxString GetObjectOutput () const
 Read the target's objects output dir.
virtual OptionsRelation GetOptionRelation (OptionsRelationType type) const
 Read the target's options relation for type.
virtual wxString GetOutputFilename ()
 Read the target's output filename.
virtual int GetPlatforms () const
wxTreeItemId GetProjectNode ()
virtual const wxArrayString & GetResourceIncludeDirs () const
bool GetShowNotesOnLoad () const
virtual wxString GetStaticLibFilename ()
 Read the target's static library filename (produced if target type is ttStaticLib).
virtual void GetTargetFilenameGenerationPolicy (TargetFilenameGenerationPolicy &prefixOut, TargetFilenameGenerationPolicy &extensionOut) const
virtual TargetType GetTargetType () const
 Read the target's type.
virtual const wxString & GetTitle () const
 Read the target's title.
virtual const wxString & GetVar (const wxString &key) const
const wxArrayString & GetVirtualBuildTargetGroup (const wxString &alias) const
wxArrayString GetVirtualBuildTargets () const
const wxArrayString & GetVirtualFolders () const
virtual wxString GetWorkingDir ()
 Read the target's working dir for execution (valid only for executable targets).
bool HasVirtualBuildTarget (const wxString &alias) const
bool IsLoaded () const
bool IsMakefileCustom ()
bool LoadLayout ()
virtual bool MakeCommandsModified () const
 True if any of the "make" commands is modified.
bool NodeDragged (wxTreeCtrl *tree, wxTreeItemId from, wxTreeItemId to)
virtual void ProjectFileRenamed (ProjectFile *pf)
bool QueryCloseAllFiles ()
virtual void RemoveBuildScript (const wxString &script)
bool RemoveBuildTarget (const wxString &targetName)
bool RemoveBuildTarget (int index)
virtual void RemoveCommandsAfterBuild (const wxString &command)
virtual void RemoveCommandsBeforeBuild (const wxString &command)
virtual void RemoveCompilerOption (const wxString &option)
bool RemoveFile (ProjectFile *pf)
bool RemoveFile (int index)
virtual void RemoveIncludeDir (const wxString &option)
virtual void RemoveLibDir (const wxString &option)
virtual void RemoveLinkerOption (const wxString &option)
virtual void RemoveLinkLib (const wxString &lib)
virtual void RemovePlatform (int platform)
virtual void RemoveResourceIncludeDir (const wxString &option)
bool RemoveVirtualBuildTarget (const wxString &alias)
bool RenameBuildTarget (const wxString &oldTargetName, const wxString &newTargetName)
bool RenameBuildTarget (int index, const wxString &targetName)
void RenameInTree (const wxString &newname)
void ReOrderTargets (const wxArrayString &nameOrder)
void RestoreTreeState (wxTreeCtrl *tree)
bool Save ()
bool SaveAllFiles ()
bool SaveAs ()
bool SaveLayout ()
void SaveTreeState (wxTreeCtrl *tree)
int SelectTarget (int initial=-1, bool evenIfOne=false)
bool SetActiveBuildTarget (const wxString &name)
virtual void SetAlwaysRunPostBuildSteps (bool always)
virtual void SetBuildScripts (const wxArrayString &scripts)
virtual void SetCommandsAfterBuild (const wxArrayString &commands)
virtual void SetCommandsBeforeBuild (const wxArrayString &commands)
void SetCompilerID (const wxString &id)
 Set the target's compiler.
virtual void SetCompilerOptions (const wxArrayString &compilerOpts)
void SetCurrentlyCompilingTarget (ProjectBuildTarget *bt)
void SetDefaultExecuteTarget (const wxString &name)
virtual void SetDepsOutput (const wxString &dirname)
 Set the target's dependencies output dir.
virtual void SetExecutionParameters (const wxString &params)
 Set the target's execution parameters to params.
void SetExtendedObjectNamesGeneration (bool ext)
virtual void SetHostApplication (const wxString &app)
 Set the target's host application to app.
virtual void SetIncludeDirs (const wxArrayString &includeDirs)
virtual void SetLibDirs (const wxArrayString &libDirs)
virtual void SetLinkerOptions (const wxArrayString &linkerOpts)
virtual void SetLinkLibs (const wxArrayString &linkLibs)
virtual void SetMakeCommandFor (MakeCommand cmd, const wxString &make)
 Set the "make" command used for cmd.
void SetMakefile (const wxString &makefile)
void SetMakefileCustom (bool custom)
void SetModeForPCH (PCHMode mode)
void SetModified (bool modified=true)
void SetNotes (const wxString &notes)
virtual void SetObjectOutput (const wxString &dirname)
 Set the target's objects output dir.
virtual void SetOptionRelation (OptionsRelationType type, OptionsRelation rel)
 Set the target's options relation for type to rel.
virtual void SetOutputFilename (const wxString &filename)
 Set the target's output filename.
virtual void SetPlatforms (int platforms)
virtual void SetResourceIncludeDirs (const wxArrayString &resIncludeDirs)
void SetShowNotesOnLoad (bool show)
virtual void SetTargetFilenameGenerationPolicy (TargetFilenameGenerationPolicy prefix, TargetFilenameGenerationPolicy extension)
virtual void SetTargetType (TargetType pt)
 Set the target's type to pt.
virtual void SetTitle (const wxString &title)
virtual bool SetVar (const wxString &key, const wxString &value, bool onlyIfExists=false)
void SetVirtualFolders (const wxArrayString &folders)
virtual void SetWorkingDir (const wxString &dirname)
 Set the target's working dir on execution (valid only for executable targets).
void ShowNotes (bool nonEmptyOnly, bool editable=false)
bool ShowOptions ()
virtual wxString SuggestOutputFilename ()
 Suggest a filename based on the target's type.
virtual bool SupportsCurrentPlatform () const
void Touch ()
virtual void UnsetAllVars ()
virtual bool UnsetVar (const wxString &key)
bool VirtualFolderAdded (wxTreeCtrl *tree, wxTreeItemId parent_node, const wxString &virtual_folder)
void VirtualFolderDeleted (wxTreeCtrl *tree, wxTreeItemId node)
bool VirtualFolderRenamed (wxTreeCtrl *tree, wxTreeItemId node, const wxString &new_name)
 ~cbProject ()
 Destructor.

Protected Attributes

bool m_AlwaysRunPostCmds
wxArrayString m_CmdsAfter
wxArrayString m_CmdsBefore
wxString m_CompilerId
wxArrayString m_CompilerOptions
wxString m_DepsOutput
wxString m_ExecutionParameters
TargetFilenameGenerationPolicy m_ExtensionGenerationPolicy
wxString m_Filename
wxString m_HostApplication
wxArrayString m_IncludeDirs
wxArrayString m_LibDirs
wxArrayString m_LinkerOptions
wxArrayString m_LinkLibs
wxString m_MakeCommands [mcLast]
bool m_MakeCommandsModified
bool m_Modified
wxString m_ObjectOutput
OptionsRelation m_OptionsRelation [ortLast]
wxString m_OutputFilename
int m_Platform
TargetFilenameGenerationPolicy m_PrefixGenerationPolicy
wxArrayString m_ResIncludeDirs
wxArrayString m_Scripts
TargetType m_TargetType
wxString m_Title
StringHash m_Vars
wxString m_WorkingDir

Private Member Functions

ProjectBuildTargetAddDefaultBuildTarget ()
wxTreeItemId AddTreeNode (wxTreeCtrl *tree, const wxString &text, const wxTreeItemId &parent, bool useFolders, FileTreeData::FileTreeDataKind folders_kind, bool compiles, int image, FileTreeData *data=0L)
void CopyTreeNodeRecursively (wxTreeCtrl *tree, const wxTreeItemId &item, const wxTreeItemId &new_parent)
wxString CreateUniqueFilename ()
void ExpandVirtualBuildTargetGroup (const wxString &alias, wxArrayString &result) const
wxTreeItemId FindNodeToInsertAfter (wxTreeCtrl *tree, const wxString &text, const wxTreeItemId &parent, bool in_folders)
int IndexOfBuildTargetName (const wxString &targetName) const
void NotifyPlugins (wxEventType type, const wxString &targetName=wxEmptyString, const wxString &oldTargetName=wxEmptyString)
void Open ()

Private Attributes

wxString m_ActiveTarget
bool m_AutoShowNotesOnLoad
wxString m_BasePath
wxString m_CommonTopLevelPath
ProjectBuildTargetm_CurrentlyCompilingTarget
bool m_CurrentlyLoading
bool m_CustomMakefile
wxString m_DefaultExecuteTarget
wxArrayString m_ExpandedNodes
bool m_ExtendedObjectNamesGeneration
FilesList m_Files
wxDateTime m_LastModified
wxString m_LastSavedActiveTarget
bool m_Loaded
wxString m_Makefile
wxString m_Notes
PCHMode m_PCHMode
TiXmlElementm_pExtensionsElement
ProjectFiles m_ProjectFilesMap
wxTreeItemId m_ProjectNode
BuildTargets m_Targets
wxArrayString m_VirtualFolders
VirtualBuildTargetsMap m_VirtualTargets

Friends

class cbProject

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index