MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / getConfigData

Method getConfigData

tests/cpu/Config_tests.cpp:10048–10065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10046 {
10047 public:
10048 inline std::string getConfigData() const override
10049 {
10050 // Get config data from filesystem, database, memory, etc.
10051 // In this example, the config is simply coming from the filesystem.
10052 // Return a stream to the config.
10053 std::ifstream fstream(
10054 OCIO::Platform::filenameToUTF(configPath).c_str(), std::ios_base::in);
10055 if (fstream.fail())
10056 {
10057 std::ostringstream os;
10058 os << "Error could not read config file : " << configPath;
10059 throw OCIO::Exception (os.str().c_str());
10060 }
10061
10062 std::stringstream buffer;
10063 buffer << fstream.rdbuf();
10064 return buffer.str();
10065 }
10066
10067 inline std::vector<uint8_t> getLutData(
10068 const char * filepath) const override

Callers

nothing calls this directly

Calls 1

filenameToUTFFunction · 0.85

Tested by

no test coverage detected