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

Method getData

Platforms/DirectX/DirectXPlatform/src/MyGUI_DirectXDataManager.cpp:39–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
openMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected