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

Method getData

Platforms/OpenGL/OpenGLPlatform/src/MyGUI_OpenGLDataManager.cpp:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
openMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected