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

Method dataChildInfo

src/IECore/StreamIndexedIO.cpp:1375–1405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1373}
1374
1375bool StreamIndexedIO::Node::dataChildInfo( const IndexedIO::EntryID &name, Info &info ) const
1376{
1377 Index::MutexLock lock;
1378 m_idx->lockDirectory( lock, m_node );
1379
1380 DirectoryNode::ChildMap::const_iterator cit = m_node->findChild( name );
1381 if ( cit != m_node->children().end() )
1382 {
1383 NodeBase *p = *cit;
1384
1385 if ( p->nodeType() == NodeBase::Data )
1386 {
1387 DataNode *n = static_cast< DataNode *>( p );
1388 info.offset = n->offset();
1389 info.size = n->size();
1390 info.decompressedSize = n->decompressedSize();
1391 info.numCompressedBlocks = n->compressedBlocks();
1392 return true;
1393 }
1394 else if ( p->nodeType() == NodeBase::SmallData )
1395 {
1396 SmallDataNode *n = static_cast< SmallDataNode *>( p );
1397 info.offset = n->offset();
1398 info.size = n->size();
1399 info.decompressedSize = n->decompressedSize();
1400 info.numCompressedBlocks = n->compressedBlocks();
1401 return true;
1402 }
1403 }
1404 return false;
1405}
1406
1407DirectoryNode* StreamIndexedIO::Node::addChild( const IndexedIO::EntryID &childName )
1408{

Callers 2

readMethod · 0.80
rawReadMethod · 0.80

Calls 8

lockDirectoryMethod · 0.80
findChildMethod · 0.80
nodeTypeMethod · 0.80
endMethod · 0.45
offsetMethod · 0.45
sizeMethod · 0.45
decompressedSizeMethod · 0.45
compressedBlocksMethod · 0.45

Tested by

no test coverage detected