Code::Blocks  SVN r11506
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CompilerXML Class Reference

#include <compilerXML.h>

Inheritance diagram for CompilerXML:
Collaboration diagram for CompilerXML:

Public Member Functions

 CompilerXML (const wxString &name, const wxString &ID, const wxString &file)
 
virtual ~CompilerXML ()
 
virtual AutoDetectResult AutoDetectInstallationDir ()
 Try to auto-detect the compiler's installation directory. More...
 
- Public Member Functions inherited from Compiler
 Compiler (const wxString &name, const wxString &ID, const wxString &parentID=wxEmptyString, int weight=50)
 
 ~Compiler () override
 
virtual bool IsValid ()
 Check if the compiler is actually valid (installed). More...
 
virtual CompilerLineType CheckForWarningsAndErrors (const wxString &line)
 Check if the supplied string is a compiler warning/error. More...
 
virtual wxString GetLastErrorFilename ()
 Returns warning/error filename. More...
 
virtual wxString GetLastErrorLine ()
 Returns warning/error line number (as a string). More...
 
virtual wxString GetLastError ()
 Returns warning/error actual string. More...
 
virtual const wxStringGetName () const
 Get the compiler's name. More...
 
virtual const wxStringGetMasterPath () const
 Get the compiler's master path (must contain "bin", "include" and "lib") More...
 
virtual const wxArrayStringGetExtraPaths () const
 Get the compiler's extra paths. More...
 
virtual const CompilerProgramsGetPrograms () const
 Get the compiler's programs. More...
 
virtual const CompilerSwitchesGetSwitches () const
 Get the compiler's generic switches. More...
 
virtual const CompilerOptionsGetOptions () const
 Get the compiler's options. More...
 
virtual const wxStringGetCommand (CommandType ct, const wxString &fileExtension=wxEmptyString) const
 Get a command based on CommandType. More...
 
virtual const CompilerToolGetCompilerTool (CommandType ct, const wxString &fileExtension=wxEmptyString) const
 Get a compiler tool based on CommandType. More...
 
virtual CompilerToolsVectorGetCommandToolsVector (CommandType ct)
 Get a command tool vector based on CommandType (used by advanced compiler dialog) More...
 
virtual const RegExArrayGetRegExArray ()
 Get the array of regexes used in errors/warnings recognition. More...
 
virtual void LoadDefaultRegExArray (bool globalPrecedence=false)
 Load the default (preset) array of regexes used in errors/warnings recognition. More...
 
virtual void SetName (const wxString &name)
 Set the compiler's name. More...
 
virtual void SetMasterPath (const wxString &path)
 Set the compiler's master path (must contain "bin", "include" and "lib") More...
 
virtual void SetExtraPaths (const wxArrayString &paths)
 Set the compiler's extra paths. More...
 
virtual void SetPrograms (const CompilerPrograms &programs)
 Set the compiler's programs. More...
 
virtual void SetSwitches (const CompilerSwitches &switches)
 Set the compiler's generic switches. More...
 
virtual void SetOptions (const CompilerOptions &options)
 Set the compiler's options. More...
 
virtual void SetRegExArray (const RegExArray &regexes)
 Set the array of regexes used in errors/warnings recognition. More...
 
virtual void SaveSettings (const wxString &baseKey)
 Save settings. More...
 
virtual void LoadSettings (const wxString &baseKey)
 Load settings. More...
 
virtual void Reset ()
 Reset settings to defaults. More...
 
virtual void ReloadOptions ()
 Reload option flags (for copied compilers). More...
 
const wxStringGetID () const
 Get this compiler's unique ID. More...
 
const wxStringGetParentID () const
 Get this compiler's parent's unique ID. More...
 
virtual void SetVersionString ()
 Set the compiler version string. More...
 
const wxString GetVersionString () const
 Get the compiler version string. More...
 
virtual CompilerCommandGeneratorGetCommandGenerator (cbProject *project)
 This is to be overridden, if compiler needs to alter the default command line generation. More...
 
void SetCOnlyFlags (const wxString &flags)
 
void SetCPPOnlyFlags (const wxString &flags)
 
const wxStringGetCOnlyFlags ()
 
const wxStringGetCPPOnlyFlags ()
 
bool WithMultiLineMsg ()
 Do compiler writes multi-line messages? More...
 
wxString MakeInvalidCompilerMessages () const
 Returns messages which might be useful to the use for debugging why the compiler is invalid. More...
 
- Public Member Functions inherited from CompileOptionsBase
 CompileOptionsBase ()
 
virtual ~CompileOptionsBase ()
 
virtual void AddPlatform (int platform)
 
virtual void RemovePlatform (int platform)
 
virtual void SetPlatforms (int platforms)
 
virtual int GetPlatforms () const
 
virtual bool SupportsCurrentPlatform () const
 
virtual void SetLinkerOptions (const wxArrayString &linkerOpts)
 
virtual const wxArrayStringGetLinkerOptions () const
 
virtual void AddLinkerOption (const wxString &option)
 
virtual void ReplaceLinkerOption (const wxString &option, const wxString &new_option)
 
virtual void RemoveLinkerOption (const wxString &option)
 
virtual void SetLinkLibs (const wxArrayString &linkLibs)
 
virtual const wxArrayStringGetLinkLibs () const
 
virtual void AddLinkLib (const wxString &option)
 
virtual void ReplaceLinkLib (const wxString &option, const wxString &new_option)
 
virtual void RemoveLinkLib (const wxString &option)
 
virtual void SetCompilerOptions (const wxArrayString &compilerOpts)
 
virtual const wxArrayStringGetCompilerOptions () const
 
virtual void AddCompilerOption (const wxString &option)
 
virtual void ReplaceCompilerOption (const wxString &option, const wxString &new_option)
 
virtual void RemoveCompilerOption (const wxString &option)
 
virtual void SetResourceCompilerOptions (const wxArrayString &resourceCompilerOpts)
 
virtual const wxArrayStringGetResourceCompilerOptions () const
 
virtual void AddResourceCompilerOption (const wxString &option)
 
virtual void ReplaceResourceCompilerOption (const wxString &option, const wxString &new_option)
 
virtual void RemoveResourceCompilerOption (const wxString &option)
 
virtual void SetIncludeDirs (const wxArrayString &includeDirs)
 
virtual const wxArrayStringGetIncludeDirs () const
 
virtual void AddIncludeDir (const wxString &option)
 
virtual void ReplaceIncludeDir (const wxString &option, const wxString &new_option)
 
virtual void RemoveIncludeDir (const wxString &option)
 
virtual void SetResourceIncludeDirs (const wxArrayString &resIncludeDirs)
 
virtual const wxArrayStringGetResourceIncludeDirs () const
 
virtual void AddResourceIncludeDir (const wxString &option)
 
virtual void ReplaceResourceIncludeDir (const wxString &option, const wxString &new_option)
 
virtual void RemoveResourceIncludeDir (const wxString &option)
 
virtual void SetLibDirs (const wxArrayString &libDirs)
 
virtual const wxArrayStringGetLibDirs () const
 
virtual void AddLibDir (const wxString &option)
 
virtual void ReplaceLibDir (const wxString &option, const wxString &new_option)
 
virtual void RemoveLibDir (const wxString &option)
 
virtual void SetCommandsBeforeBuild (const wxArrayString &commands)
 
virtual const wxArrayStringGetCommandsBeforeBuild () const
 
virtual void AddCommandsBeforeBuild (const wxString &command)
 
virtual void RemoveCommandsBeforeBuild (const wxString &command)
 
virtual void SetCommandsAfterBuild (const wxArrayString &commands)
 
virtual const wxArrayStringGetCommandsAfterBuild () const
 
virtual void AddCommandsAfterBuild (const wxString &command)
 
virtual void RemoveCommandsAfterBuild (const wxString &command)
 
virtual void SetBuildScripts (const wxArrayString &scripts)
 
virtual const wxArrayStringGetBuildScripts () const
 
virtual void AddBuildScript (const wxString &script)
 
virtual void RemoveBuildScript (const wxString &script)
 
virtual bool GetModified () const
 
virtual void SetModified (bool modified)
 
virtual bool GetAlwaysRunPostBuildSteps () const
 
virtual void SetAlwaysRunPostBuildSteps (bool always)
 
virtual bool SetVar (const wxString &key, const wxString &value, bool onlyIfExists=false)
 
virtual bool UnsetVar (const wxString &key)
 
virtual void UnsetAllVars ()
 
virtual bool HasVar (const wxString &key) const
 
virtual const wxStringGetVar (const wxString &key) const
 
virtual const StringHash & GetAllVars () const
 

Protected Member Functions

virtual CompilerCreateCopy ()
 Implement this in new compilers, to return a new copy. More...
 
- Protected Member Functions inherited from Compiler
 Compiler (const Compiler &other)
 
bool IsUniqueID (const wxString &ID)
 
void MakeValidID ()
 
void LoadDefaultOptions (const wxString &name, int recursion=0)
 
void LoadRegExArray (const wxString &name, bool globalPrecedence=false, int recursion=0)
 
bool EvalXMLCondition (const wxXmlNode *node)
 
wxString GetExecName (const wxString &name)
 
void MirrorCurrentSettings ()
 

Private Types

enum  SearchMode {
  master, extra, include, resource,
  lib, none
}
 

Private Member Functions

bool AddPath (const wxString &pth, SearchMode sm, int rmDirs=0)
 

Private Attributes

wxString m_fileName
 

Additional Inherited Members

- Static Public Attributes inherited from Compiler
static const wxString FilePathWithSpaces = _T("[][{}() \t#%$~[:alnum:]&_:+/\\.-]+")
 
static wxString CommandTypeDescriptions [ctCount]
 Get the command type descriptions (used in advanced compiler options) More...
 
- Protected Attributes inherited from Compiler
wxString m_Name
 
wxString m_MasterPath
 
wxArrayString m_ExtraPaths
 
CompilerToolsVector m_Commands [ctCount]
 
CompilerPrograms m_Programs
 
CompilerSwitches m_Switches
 
CompilerOptions m_Options
 
RegExArray m_RegExes
 
wxString m_ErrorFilename
 
wxString m_ErrorLine
 
wxString m_Error
 
wxString m_VersionString
 
wxString m_SortOptions [2]
 
int m_Weight
 
bool m_MultiLineMessages
 
- Protected Attributes inherited from CompileOptionsBase
int m_Platform
 
wxArrayString m_LinkerOptions
 
wxArrayString m_LinkLibs
 
wxArrayString m_CompilerOptions
 
wxArrayString m_ResourceCompilerOptions
 
wxArrayString m_IncludeDirs
 
wxArrayString m_ResIncludeDirs
 
wxArrayString m_LibDirs
 
wxArrayString m_CmdsBefore
 
wxArrayString m_CmdsAfter
 
wxArrayString m_Scripts
 
bool m_Modified
 
bool m_AlwaysRunPostCmds
 
StringHash m_Vars
 

Detailed Description

Definition at line 8 of file compilerXML.h.

Member Enumeration Documentation

◆ SearchMode

Enumerator
master 
extra 
include 
resource 
lib 
none 

Definition at line 21 of file compilerXML.h.

Constructor & Destructor Documentation

◆ CompilerXML()

CompilerXML::CompilerXML ( const wxString name,
const wxString ID,
const wxString file 
)

◆ ~CompilerXML()

CompilerXML::~CompilerXML ( )
virtual

Definition at line 27 of file compilerXML.cpp.

Member Function Documentation

◆ AddPath()

bool CompilerXML::AddPath ( const wxString pth,
SearchMode  sm,
int  rmDirs = 0 
)
private

◆ AutoDetectInstallationDir()

AutoDetectResult CompilerXML::AutoDetectInstallationDir ( )
virtual

◆ CreateCopy()

Compiler * CompilerXML::CreateCopy ( )
protectedvirtual

Implement this in new compilers, to return a new copy.

Implements Compiler.

Definition at line 31 of file compilerXML.cpp.

References CompilerXML().

Member Data Documentation

◆ m_fileName

wxString CompilerXML::m_fileName
private

Definition at line 33 of file compilerXML.h.

Referenced by AutoDetectInstallationDir(), and CompilerXML().


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