Code::Blocks
SVN r11506
|
#include <filemanager.h>
Public Member Functions | |
FileManager () | |
~FileManager () override | |
cb_must_consume_result LoaderBase * | Load (const wxString &file, bool reuseEditors=false) |
Loads a file, once this function is called, the actually loading process is done in the worker thread(BackgroundThread). More... | |
bool | Save (const wxString &file, const wxString &data, wxFontEncoding encoding, bool bom) |
Private Member Functions | |
bool | SaveUTF8 (const wxString &file, const char *data, size_t len) |
bool | WriteWxStringToFile (wxFile &f, const wxString &data, wxFontEncoding encoding, bool bom) |
Private Attributes | |
BackgroundThread | fileLoaderThread |
BackgroundThread | uncLoaderThread |
BackgroundThread | urlLoaderThread |
Friends | |
bool | TinyXML::SaveDocument (const wxString &, TiXmlDocument *) |
Additional Inherited Members | |
Static Public Member Functions inherited from Mgr< FileManager > | |
static bool | Valid () |
static FileManager * | Get () |
static void | Free () |
Protected Member Functions inherited from Mgr< FileManager > | |
Mgr () | |
virtual | ~Mgr () |
Definition at line 112 of file filemanager.h.
FileManager::FileManager | ( | ) |
Definition at line 122 of file filemanager.cpp.
|
override |
Definition at line 129 of file filemanager.cpp.
LoaderBase * FileManager::Load | ( | const wxString & | file, |
bool | reuseEditors = false |
||
) |
Loads a file, once this function is called, the actually loading process is done in the worker thread(BackgroundThread).
file | the file path, it can an absolute file path, an unc file, or a url file |
reuseEditors | if true, we try to use the file contents in the editor if the file is modified in the editor. |
Definition at line 136 of file filemanager.cpp.
References _T, fileLoaderThread, Manager::Get(), EditorManager::GetBuiltinEditor(), cbEditor::GetControl(), EditorManager::GetEditor(), Manager::GetEditorManager(), EditorManager::GetEditorsCount(), EditorBase::GetFilename(), cbEditor::GetModified(), wxScintilla::GetText(), wxString::length(), BackgroundThread::Queue(), wxString::StartsWith(), uncLoaderThread, and urlLoaderThread.
Referenced by EditorColourSet::LoadAvailableSets(), cbProject::LoadLayout(), CodeBlocksApp::OnInit(), EditorManager::Open(), cbEditor::Open(), and Parser::Parse().
bool FileManager::Save | ( | const wxString & | file, |
const wxString & | data, | ||
wxFontEncoding | encoding, | ||
bool | bom | ||
) |
Definition at line 265 of file filemanager.cpp.
References wxFile::Access(), wxString::append(), wxFile::Close(), wxFile::Create(), wxFileName::Exists(), platform::move(), wxFile::write, wxFile::write_excl, WriteWxStringToFile(), wxFILE_EXISTS_SYMLINK, wxFileExists(), and wxT.
Referenced by cbSaveToFile().
|
private |
Definition at line 218 of file filemanager.cpp.
References wxFile::Access(), wxString::append(), wxFile::Close(), wxFile::Create(), wxFileName::Exists(), platform::move(), wxFile::Write(), wxFile::write, wxFile::write_excl, wxFILE_EXISTS_SYMLINK, wxFileExists(), and wxT.
Referenced by TinyXML::SaveDocument().
|
private |
Definition at line 315 of file filemanager.cpp.
References _(), _T, wxString::c_str(), cbMessageBox(), wxEncodingConverter::Convert(), InfoWindow::Display(), wxEncodingConverter::Init(), wxString::Len(), wxString::Length(), wxString::length(), wxString::mb_str(), wxFile::Write(), wxString::wx_str(), wxFONTENCODING_SYSTEM, wxFONTENCODING_UNICODE, wxFONTENCODING_UTF16BE, wxFONTENCODING_UTF16LE, wxFONTENCODING_UTF32BE, wxFONTENCODING_UTF32LE, wxFONTENCODING_UTF7, wxFONTENCODING_UTF8, wxICON_WARNING, and wxOK.
Referenced by Save().
|
friend |
|
private |
Definition at line 114 of file filemanager.h.
Referenced by Load().
|
private |
Definition at line 115 of file filemanager.h.
Referenced by Load().
|
private |
Definition at line 116 of file filemanager.h.
Referenced by Load().