| 3347 | |
| 3348 | template<typename T> |
| 3349 | void StreamIndexedIO::rawRead(const IndexedIO::EntryID &name, T *&x, size_t arrayLength) const |
| 3350 | { |
| 3351 | assert( m_node ); |
| 3352 | readable(name); |
| 3353 | |
| 3354 | StreamIndexedIO::Node::Info nodeInfo; |
| 3355 | if( !m_node->dataChildInfo( name, nodeInfo ) ) |
| 3356 | { |
| 3357 | throw IOException( "StreamIndexedIO::rawRead: Data entry not found '" + name.value() + "'" ); |
| 3358 | } |
| 3359 | |
| 3360 | if (!x) |
| 3361 | { |
| 3362 | x = new T[arrayLength]; |
| 3363 | } |
| 3364 | |
| 3365 | size_t arraySizeInBytes = sizeof(T) * arrayLength; |
| 3366 | if ( arraySizeInBytes != nodeInfo.decompressedSize ) |
| 3367 | { |
| 3368 | throw IECore::IOException( |
| 3369 | boost::str( |
| 3370 | boost::format( "StreamIndexedIO::rawRead - array size (%1%) does not match block size (%2%) " ) % |
| 3371 | arraySizeInBytes % |
| 3372 | nodeInfo.decompressedSize |
| 3373 | ) |
| 3374 | ); |
| 3375 | } |
| 3376 | |
| 3377 | Reader reader( streamFile(), nodeInfo, m_node->m_idx->decompressionThreadCount(), reinterpret_cast<char *>( x ) ); |
| 3378 | } |
| 3379 | |
| 3380 | template<typename T> |
| 3381 | void StreamIndexedIO::read(const IndexedIO::EntryID &name, T &x) const |
nothing calls this directly
no test coverage detected