MCPcopy Create free account
hub / github.com/MyGUI/mygui / getData

Method getData

Wrappers/MyGUI_Export/MyGUI_ExportDataManager.cpp:43–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 IDataStream* ExportDataManager::getData(const std::string& _name) const
44 {
45 std::string filepath = getDataPath(_name);
46 if (filepath.empty())
47 return nullptr;
48
49 auto stream = std::make_unique<std::ifstream>();
50 stream->open(filepath.c_str(), std::ios_base::binary);
51
52 if (!stream->is_open())
53 return nullptr;
54
55 DataFileStream* data = new DataFileStream(std::move(stream));
56
57 return data;
58 }
59
60 void ExportDataManager::freeData(IDataStream* _data)
61 {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
openMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected