| 1405 | } |
| 1406 | |
| 1407 | DirectoryNode* StreamIndexedIO::Node::addChild( const IndexedIO::EntryID &childName ) |
| 1408 | { |
| 1409 | if ( m_node->subindex() ) |
| 1410 | { |
| 1411 | throw Exception( "Cannot modify the file at current location! It was already committed to the file." ); |
| 1412 | } |
| 1413 | |
| 1414 | if ( hasChild(childName) ) |
| 1415 | { |
| 1416 | return nullptr; |
| 1417 | } |
| 1418 | |
| 1419 | DirectoryNode* child = new DirectoryNode(childName); |
| 1420 | if ( !child ) |
| 1421 | { |
| 1422 | throw Exception( "Failed to allocate node!" ); |
| 1423 | } |
| 1424 | m_idx->m_stringCache.add( childName ); |
| 1425 | |
| 1426 | m_node->registerChild( child ); |
| 1427 | |
| 1428 | m_idx->m_hasChanged = true; |
| 1429 | |
| 1430 | return child; |
| 1431 | } |
| 1432 | |
| 1433 | void StreamIndexedIO::Node::addDataChild( |
| 1434 | const IndexedIO::EntryID &childName, |
no test coverage detected