Exemplo n.º 1
0
static ModelCache::iterator ModelCache_find (const std::string& path, const std::string& name)
{
    if (g_modelCache_enabled) {
        return g_modelCache.find(ModelKey(path, name));
    }
    return g_modelCache.end();
}
Exemplo n.º 2
0
ModelCache::iterator ModelCache_find(const char* path, const char* name)
{
  if(g_modelCache_enabled)
  {
    return g_modelCache.find(ModelKey(path, name));
  }
  return g_modelCache.end();
}
Exemplo n.º 3
0
void ModelCache_flush (const std::string& path, const std::string& name)
{
    ModelCache::iterator i = g_modelCache.find(ModelKey(path, name));
    if (i != g_modelCache.end()) {
        //ASSERT_MESSAGE((*i).value.getCount() == 0, "resource flushed while still in use: " << (*i).key.first.c_str() << (*i).key.second.c_str());
        g_modelCache.erase(i);
    }
}