Changeset 2335

Show
Ignore:
Timestamp:
10/01/03 15:12:25
Author:
robert
Message:

Added addEntryToObjectCache method to osgDB::Registry

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OpenSceneGraph/trunk/include/osgDB/Registry

    r2166 r2335  
    191191        /** Remove all objects in the cache regardless of having external references or expiry times.*/  
    192192        void clearObjectCache(); 
     193 
     194        void addEntryToObjectCache(const std::string& filename, osg::Object* object, double timestamp = 0.0); 
    193195 
    194196        /** get the attached library with specified name.*/ 
  • OpenSceneGraph/trunk/src/osgDB/Registry.cpp

    r2268 r2335  
    11661166            // update cache with new entry. 
    11671167            notify(INFO)<<"Adding to cache object "<<file<<std::endl; 
    1168             _objectCache[file]=ObjectTimeStampPair(rr.getObject(),0.0f); 
     1168            addEntryToObjectCache(file,rr.getObject()); 
    11691169        } 
    11701170         
     
    13041304            // update cache with new entry. 
    13051305            notify(INFO)<<"Adding to cache image "<<file<<std::endl; 
    1306             _objectCache[file]=ObjectTimeStampPair(rr.getObject(),0.0f); 
     1306            addEntryToObjectCache(file,rr.getObject()); 
    13071307        } 
    13081308         
     
    14571457            // update cache with new entry. 
    14581458            notify(INFO)<<"Adding to cache node "<<file<<std::endl; 
    1459             _objectCache[file]=ObjectTimeStampPair(rr.getObject(),0.0f); 
     1459            addEntryToObjectCache(file,rr.getObject()); 
    14601460        } 
    14611461         
     
    15481548} 
    15491549 
     1550void Registry::addEntryToObjectCache(const std::string& filename, osg::Object* object, double timestamp) 
     1551{ 
     1552     _objectCache[filename]=ObjectTimeStampPair(object,timestamp); 
     1553} 
     1554 
    15501555void Registry::updateTimeStampOfObjectsInCacheWithExtenalReferences(double currentTime) 
    15511556{