Code::Blocks  SVN r11506
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
LogManager Class Reference

#include <logmanager.h>

Inheritance diagram for LogManager:
Collaboration diagram for LogManager:

Classes

struct  Instantiator
 
struct  InstantiatorBase
 

Public Types

enum  { max_logs = 32 }
 
enum  {
  no_index = -1, invalid_log, stdout_log, app_log,
  debug_log
}
 

Public Member Functions

size_t SetLog (Logger *l, int index=no_index)
 
void DeleteLog (int i)
 
LogSlotSlot (int i)
 
size_t FindIndex (Logger *l)
 
void Log (const wxString &msg, int i=app_log, Logger::level lv=Logger::info)
 
void LogWarning (const wxString &msg, int i=app_log)
 
void LogError (const wxString &msg, int i=app_log)
 
void Panic (const wxString &msg, const wxString &component=wxEmptyString)
 
void DebugLog (const wxString &msg, Logger::level lv=Logger::info)
 
void DebugLogError (const wxString &msg)
 
void LogToStdOut (const wxString &msg, Logger::level lv=Logger::info)
 
void ClearLog (int i)
 
wxArrayString ListAvailable ()
 
LoggerNew (const wxString &name)
 
bool FilenameRequired (const wxString &name)
 
void Register (const wxString &name, InstantiatorBase *ins)
 
void NotifyUpdate ()
 

Private Types

typedef std::map< wxString, InstantiatorBase * > inst_map_t
 

Private Member Functions

 LogManager ()
 
 ~LogManager () override
 
void ClearLogInternal (int i)
 
void LogInternal (const wxString &msg, int i, Logger::level lv)
 

Private Attributes

inst_map_t instMap
 
LogSlot slot [max_logs+1]
 

Friends

class Mgr< LogManager >
 
class Manager
 

Additional Inherited Members

- Static Public Member Functions inherited from Mgr< LogManager >
static bool Valid ()
 
static LogManagerGet ()
 
static void Free ()
 
- Protected Member Functions inherited from Mgr< LogManager >
 Mgr ()
 
virtual ~Mgr ()
 

Detailed Description

Definition at line 76 of file logmanager.h.

Member Typedef Documentation

◆ inst_map_t

typedef std::map<wxString, InstantiatorBase*> LogManager::inst_map_t
private

Definition at line 93 of file logmanager.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
max_logs 

Definition at line 91 of file logmanager.h.

◆ anonymous enum

anonymous enum
Enumerator
no_index 
invalid_log 
stdout_log 
app_log 
debug_log 

Definition at line 109 of file logmanager.h.

Constructor & Destructor Documentation

◆ LogManager()

LogManager::LogManager ( )
private

◆ ~LogManager()

LogManager::~LogManager ( )
overrideprivate

Definition at line 92 of file logmanager.cpp.

Member Function Documentation

◆ ClearLog()

void LogManager::ClearLog ( int  i)
inline

Definition at line 151 of file logmanager.h.

◆ ClearLogInternal()

void LogManager::ClearLogInternal ( int  i)
private

Definition at line 98 of file logmanager.cpp.

References LogSlot::log.

◆ DebugLog()

void LogManager::DebugLog ( const wxString msg,
Logger::level  lv = Logger::info 
)
inline

Definition at line 146 of file logmanager.h.

Referenced by cbProject::AddFile(), CompilerGCC::AddOutputLine(), ProjectManager::AddProjectDependency(), Wiz::AddWizard(), DirectCommands::AreExternalDepsOutdated(), CompilerGDC::AutoDetectInstallationDir(), cbProject::CalculateCommonTopLevelPath(), EditorHooks::CallHooks(), cbEditorInternalData::cbEditorInternalData(), ProjectManager::ClearProjectDependencies(), DirectCommands::CompileFile(), Compiler::Compiler(), CompilerFactory::CompilerInheritsFrom(), EncodingDetector::ConvertToWxString(), CompilerFactory::CreateCompilerCopy(), MainFrame::CreateMenubar(), MainFrame::CreateToolbars(), EncodingDetector::DetectEncoding(), DirectCommands::DirectCommands(), ProjectLoader::DoBuildTarget(), ProjectLoader::DoUnits(), EditorManager::EditorManager(), ExpandBackticks(), ScriptBindings::gDebugLog(), CompilerCommandGenerator::GenerateCommandLine(), Wiz::GenerateFile(), CompileTargetBase::GenerateTargetFilename(), DirectCommands::GetCompileFileCommand(), CompileTargetBase::GetDynamicLibDefFilename(), CompileTargetBase::GetDynamicLibFilename(), CompileTargetBase::GetDynamicLibImportFilename(), CompileTargetBase::GetStaticLibFilename(), PluginManager::InstallPlugin(), CompilerLCC::IsValid(), cbWorkspace::Load(), WorkspaceLoader::LoadLayout(), cbWorkspace::LoadLayout(), cbProject::LoadLayout(), PluginManager::LoadPlugin(), ScriptingManager::LoadScript(), CompilerFactory::LoadSettings(), TemplateManager::LoadUserTemplates(), ProfileTimer::Log(), MainFrame::MainFrame(), TemplateManager::NewProjectFromUserTemplate(), cbPlugin::NotImplemented(), MainFrame::OnApplicationClose(), cbEditorPrintout::OnBeginDocument(), WizPage::OnButton(), CodeCompletion::OnCCDebugLogger(), CompilerGCC::OnCleanFile(), CompilerGCC::OnCompileFileRequest(), ProjectManagerUI::OnGotoFile(), MainFrame::OnHelpPluginMenu(), MainFrame::OnPluginLoaded(), MainFrame::OnPluginsExecuteMenu(), cbEditorPrintout::OnPrintPage(), ProjectFileOptionsDlg::OnReadOnlyCheck(), ProjectManagerUI::OnRemoveFileFromProject(), WorkspaceLoader::Open(), ProjectLayoutLoader::Open(), ProjectTemplateLoader::Open(), ProjectLoader::Open(), MainFrame::Open(), EditorManager::Open(), cbEditor::Open(), EditorManager::OpenContainingFolder(), OpenContainingFolderData::OpenContainingFolderData(), Manager::ProcessEvent(), DebuggerMenuHandler::RegisterWindowMenu(), CompilerFactory::RemoveCompiler(), cbProject::RemoveFile(), ProjectManager::RemoveFileFromProject(), ProjectManager::RemoveProjectDependency(), ProjectManager::RemoveProjectFromAllDependencies(), cbProject::ReOrderTargets(), EncodingDetector::Report(), Wiz::RunProjectWizard(), cbWorkspace::Save(), cbWorkspace::SaveLayout(), TemplateManager::SaveUserTemplate(), cbEditor::SetProjectFile(), CompilerGCC::SetupEnvironment(), CompilerCommandGenerator::SetupOutputFilenames(), ScriptBindings::ShowDialog(), cbDebuggerPlugin::SwitchToDebuggingLayout(), cbDebuggerPlugin::SwitchToPreviousLayout(), CfgMgrBldr::SwitchToR(), ProjectFileOptionsDlg::ToggleFileReadOnly(), ScriptingManager::UnRegisterScriptMenu(), and DirectCommands::~DirectCommands().

◆ DebugLogError()

void LogManager::DebugLogError ( const wxString msg)
inline

◆ DeleteLog()

void LogManager::DeleteLog ( int  i)

Definition at line 142 of file logmanager.cpp.

Referenced by InfoPane::DeleteLogger().

◆ FilenameRequired()

bool LogManager::FilenameRequired ( const wxString name)

Definition at line 172 of file logmanager.cpp.

◆ FindIndex()

size_t LogManager::FindIndex ( Logger l)

Definition at line 152 of file logmanager.cpp.

References LogSlot::log.

Referenced by CodeBlocksLogEvent::CodeBlocksLogEvent(), and InfoPane::DeleteLogger().

◆ ListAvailable()

wxArrayString LogManager::ListAvailable ( )

Definition at line 162 of file logmanager.cpp.

References wxArrayString::Add().

◆ Log()

void LogManager::Log ( const wxString msg,
int  i = app_log,
Logger::level  lv = Logger::info 
)
inline

◆ LogError()

void LogManager::LogError ( const wxString msg,
int  i = app_log 
)
inline

◆ LogInternal()

void LogManager::LogInternal ( const wxString msg,
int  i,
Logger::level  lv 
)
private

Definition at line 104 of file logmanager.cpp.

References LogSlot::log.

◆ LogToStdOut()

void LogManager::LogToStdOut ( const wxString msg,
Logger::level  lv = Logger::info 
)
inline

Definition at line 149 of file logmanager.h.

Referenced by CompilerCommandGenerator::Init(), and CompilerGCC::LogMessage().

◆ LogWarning()

void LogManager::LogWarning ( const wxString msg,
int  i = app_log 
)
inline

◆ New()

Logger * LogManager::New ( const wxString name)

Definition at line 182 of file logmanager.cpp.

◆ NotifyUpdate()

void LogManager::NotifyUpdate ( )

◆ Panic()

void LogManager::Panic ( const wxString msg,
const wxString component = wxEmptyString 
)

◆ Register()

void LogManager::Register ( const wxString name,
InstantiatorBase ins 
)

Definition at line 192 of file logmanager.cpp.

◆ SetLog()

size_t LogManager::SetLog ( Logger l,
int  index = no_index 
)

◆ Slot()

LogSlot & LogManager::Slot ( int  i)

Friends And Related Function Documentation

◆ Manager

friend class Manager
friend

Definition at line 103 of file logmanager.h.

◆ Mgr< LogManager >

friend class Mgr< LogManager >
friend

Definition at line 102 of file logmanager.h.

Member Data Documentation

◆ instMap

inst_map_t LogManager::instMap
private

Definition at line 94 of file logmanager.h.

◆ slot

LogSlot LogManager::slot[max_logs+1]
private

Definition at line 96 of file logmanager.h.


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