MCPcopy Create free account
hub / github.com/ImageEngine/cortex / SceneCache

Method SceneCache

src/IECoreScene/SceneCache.cpp:2221–2243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2219//////////////////////////////////////////////////////////////////////////
2220
2221SceneCache::SceneCache( const std::string &fileName, IndexedIO::OpenMode mode )
2222{
2223 if( mode & IndexedIO::Append )
2224 {
2225 throw InvalidArgumentException( "Append mode not supported" );
2226 }
2227 IndexedIOPtr indexedIO = IndexedIO::create( fileName, IndexedIO::rootPath, mode );
2228
2229 if( indexedIO->openMode() & IndexedIO::Write )
2230 {
2231 ObjectPtr header = HeaderGenerator::header();
2232 header->save( indexedIO, headerEntry );
2233 indexedIO->subdirectory( sampleTimesEntry, IndexedIO::CreateIfMissing );
2234 indexedIO = indexedIO->subdirectory( rootEntry, IndexedIO::CreateIfMissing );
2235 indexedIO->removeAll();
2236 m_implementation = new WriterImplementation( indexedIO );
2237 }
2238 else
2239 {
2240 indexedIO = indexedIO->subdirectory( rootEntry );
2241 m_implementation = new ReaderImplementation( indexedIO );
2242 }
2243}
2244
2245SceneCache::SceneCache( IECore::IndexedIOPtr indexedIO )
2246{

Callers 15

_writeSceneMethod · 0.80
testConstructionMethod · 0.80
testTimeSettingMethod · 0.80
testTransformMethod · 0.80
testCustomPrimvarsMethod · 0.80
testCornersAndCreasesMethod · 0.80
testPointsPrimitiveMethod · 0.80
testCurvesPrimitiveMethod · 0.80
testCameraMethod · 0.80
testLinkedSceneCacheMethod · 0.80
testSceneWriteMethod · 0.80

Calls 8

InvalidArgumentExceptionFunction · 0.85
createFunction · 0.85
subdirectoryMethod · 0.80
removeAllMethod · 0.80
openModeMethod · 0.45
saveMethod · 0.45
pathMethod · 0.45
sizeMethod · 0.45

Tested by 15

_writeSceneMethod · 0.64
testConstructionMethod · 0.64
testTimeSettingMethod · 0.64
testTransformMethod · 0.64
testCustomPrimvarsMethod · 0.64
testCornersAndCreasesMethod · 0.64
testPointsPrimitiveMethod · 0.64
testCurvesPrimitiveMethod · 0.64
testCameraMethod · 0.64
testLinkedSceneCacheMethod · 0.64
testSceneWriteMethod · 0.64