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

Method entry

src/IECore/StreamIndexedIO.cpp:3092–3129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3090}
3091
3092IndexedIO::Entry StreamIndexedIO::entry(const IndexedIO::EntryID &name) const
3093{
3094 assert( m_node );
3095 readable(name);
3096
3097 Index::MutexLock lock;
3098 m_node->m_idx->lockDirectory( lock, m_node->m_node );
3099
3100 DirectoryNode::ChildMap::iterator it = m_node->m_node->findChild( name );
3101 if ( it == m_node->m_node->children().end() )
3102 {
3103 throw IOException( "StreamIndexedIO::entry: Entry not found '" + name.value() + "'" );
3104 }
3105
3106 NodeBase *node = *it;
3107
3108 switch( node->nodeType() )
3109 {
3110 case NodeBase::Data:
3111 {
3112 DataNode *dn = static_cast< DataNode * >(node);
3113 return IndexedIO::Entry( dn->name(), IndexedIO::File, dn->dataType(), dn->arrayLength() );
3114 }
3115
3116 case NodeBase::SmallData:
3117 {
3118 SmallDataNode *dn = static_cast< SmallDataNode * >(node);
3119 return IndexedIO::Entry( dn->name(), IndexedIO::File, dn->dataType(), dn->arrayLength() );
3120 }
3121
3122 case NodeBase::Directory:
3123 case NodeBase::SubIndex:
3124 return IndexedIO::Entry( node->name(), IndexedIO::Directory, IndexedIO::Invalid, 0 );
3125
3126 default:
3127 throw Exception("Invalid node type!");
3128 }
3129}
3130
3131IndexedIOPtr StreamIndexedIO::parentDirectory()
3132{

Callers 13

loadSceneIntoCacheMethod · 0.45
loadPrimVarsMethod · 0.45
testMethod · 0.45
testArrayMethod · 0.45
writeMethod · 0.45
writeArrayMethod · 0.45
testResetRootMethod · 0.45
testLsMethod · 0.45
hasTagMethod · 0.45
restoreSampleTimesMethod · 0.45
handleFileFunction · 0.45
loadMethod · 0.45

Calls 10

IOExceptionFunction · 0.85
EntryClass · 0.85
lockDirectoryMethod · 0.80
findChildMethod · 0.80
nodeTypeMethod · 0.80
endMethod · 0.45
valueMethod · 0.45
nameMethod · 0.45
dataTypeMethod · 0.45
arrayLengthMethod · 0.45

Tested by 4

testMethod · 0.36
testArrayMethod · 0.36
writeMethod · 0.36
writeArrayMethod · 0.36