| 1235 | /////////////////////////////////////////////// |
| 1236 | |
| 1237 | void DirectoryNode::registerChild( NodeBase* c ) |
| 1238 | { |
| 1239 | if ( !c ) |
| 1240 | { |
| 1241 | throw Exception("Invalid pointer for child node!!"); |
| 1242 | } |
| 1243 | |
| 1244 | if ( m_children.size() >= UINT32_MAX ) |
| 1245 | { |
| 1246 | // we currently save childCount as a uint32... so we prevent new children by construction. |
| 1247 | throw IOException("StreamIndexedIO: Too many children under the same node!"); |
| 1248 | } |
| 1249 | |
| 1250 | if ( c->nodeType() == NodeBase::Directory ) |
| 1251 | { |
| 1252 | DirectoryNode *childNode = static_cast< DirectoryNode *>(c); |
| 1253 | if (childNode->m_parent) |
| 1254 | { |
| 1255 | throw IOException("StreamIndexedIO: Node already has parent!"); |
| 1256 | } |
| 1257 | childNode->m_parent = this; |
| 1258 | } |
| 1259 | else if ( c->nodeType() == NodeBase::SubIndex ) |
| 1260 | { |
| 1261 | m_subindexChildren = true; |
| 1262 | } |
| 1263 | m_children.push_back( c ); |
| 1264 | m_sortedChildren = false; |
| 1265 | } |
| 1266 | |
| 1267 | void DirectoryNode::path( IndexedIO::EntryIDList &result ) const |
| 1268 | { |
no test coverage detected