* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
std::string resource::find_file(const std::string& name)
{
std::string ext = stlplus::extension_part(name);
std::string resource::find_file(const std::string& name)
{
std::string ext = stlplus::extension_part(name);
{
hash<std::string,resource_weakptr,hash_function>::iterator it;
for (it = table.begin(); it != table.end(); ++it)
{
hash<std::string,resource_weakptr,hash_function>::iterator it;
for (it = table.begin(); it != table.end(); ++it)
int add(resource_ptr rsrc)
{
int wd = inotify_add_watch(fd, rsrc->path().c_str(),
int add(resource_ptr rsrc)
{
int wd = inotify_add_watch(fd, rsrc->path().c_str(),
resource_ptr resource::load(const std::string& name)
{
std::string ext = stlplus::extension_part(name);
return load_with_path(find_file(name, ext), ext);
}
resource_ptr resource::load(const std::string& name)
{
std::string ext = stlplus::extension_part(name);
return load_with_path(find_file(name, ext), ext);
}
/*] Resource registration
*************************************************************************/
bool resource::call_registry(const std::string& ext,
/*] Resource registration
*************************************************************************/
bool resource::call_registry(const std::string& ext,