MCPcopy Create free account
hub / github.com/WinMerge/winmerge / Read

Method Read

Src/ProjectFile.cpp:370–379  ·  view source on GitHub ↗

* @brief Open given path-file and read data from it to member variables. * @param [in] path Path to project file. * @param [out] sError Error string if error happened. * @return true if reading succeeded, false if error happened. */

Source from the content-addressed store, hash-verified

368 * @return true if reading succeeded, false if error happened.
369 */
370bool ProjectFile::Read(const String& path)
371{
372 ProjectFileHandler handler(&m_items);
373 SAXParser parser;
374 parser.setFeature(SAXParser::FEATURE_EXTERNAL_GENERAL_ENTITIES, false);
375 parser.setFeature(SAXParser::FEATURE_EXTERNAL_PARAMETER_ENTITIES, false);
376 parser.setContentHandler(&handler);
377 parser.parse(toUTF8(path));
378 return true;
379}
380
381/**
382 * @brief Save data from member variables to path-file.

Callers 15

LoadProjectFileMethod · 0.45
IStream_WriteToFileFunction · 0.45
GetIconPNGDataMethod · 0.45
SetUpMethod · 0.45
TEST_FFunction · 0.45
SetUpMethod · 0.45
TEST_FFunction · 0.45
SetUpMethod · 0.45
TEST_FFunction · 0.45
SetUpMethod · 0.45
TEST_FFunction · 0.45
SetUpMethod · 0.45

Calls 4

toUTF8Function · 0.50
setFeatureMethod · 0.45
setContentHandlerMethod · 0.45
parseMethod · 0.45

Tested by 12

SetUpMethod · 0.36
TEST_FFunction · 0.36
SetUpMethod · 0.36
TEST_FFunction · 0.36
SetUpMethod · 0.36
TEST_FFunction · 0.36
SetUpMethod · 0.36
TEST_FFunction · 0.36
SetUpMethod · 0.36
TEST_FFunction · 0.36
SetUpMethod · 0.36
TEST_FFunction · 0.36