|
void | pushDir (fs::path dir) |
|
void | pushDir (const char *path) |
|
void | pushAlias (const std::string &name, std::filesystem::path dataFile) |
|
std::unique_ptr< std::istream > | load (fs::path name) |
|
Definition at line 825 of file utilities.cpp.
◆ instance()
Definition at line 828 of file utilities.cpp.
830 static std::unique_ptr<ResourcePool> s_instance(
new ResourcePool);
◆ load()
std::unique_ptr< std::istream > cif::ResourcePool::load |
( |
fs::path |
name | ) |
|
Definition at line 903 of file utilities.cpp.
905 std::unique_ptr<std::istream> result;
910 if (mLocalResources.count(name.string()))
911 result = open(mLocalResources[name.string()]);
913 for (
auto di = mDirs.begin(); not result and
di != mDirs.end(); ++
di)
916 if (fs::exists(p2, ec) and not ec)
const mrsrc::rsrc_imp gResourceIndex[1]
Class mrsrc::rsrc contains a pointer to the data in the resource, as well as offering an iterator int...
◆ pushAlias()
void cif::ResourcePool::pushAlias |
( |
const std::string & |
name, |
|
|
std::filesystem::path |
dataFile |
|
) |
| |
|
inline |
Definition at line 848 of file utilities.cpp.
851 if (not fs::exists(dataFile, ec)
or ec)
852 throw std::runtime_error(
"Attempt to add a file resource for " + name +
" that cannot be used (" + dataFile.string() +
") :" + ec.message());
854 mLocalResources[name] = dataFile;
◆ pushDir() [1/2]
void cif::ResourcePool::pushDir |
( |
fs::path |
dir | ) |
|
|
inline |
Definition at line 834 of file utilities.cpp.
838 if (fs::exists(dir, ec) and not ec)
839 mDirs.push_front(dir);
◆ pushDir() [2/2]
void cif::ResourcePool::pushDir |
( |
const char * |
path | ) |
|
|
inline |
The documentation for this class was generated from the following file: