| 207 | } |
| 208 | |
| 209 | void NParticleReader::attributeNames( std::vector<std::string> &names ) |
| 210 | { |
| 211 | names.clear(); |
| 212 | if( !open() ) |
| 213 | { |
| 214 | return; |
| 215 | } |
| 216 | |
| 217 | int frameIndex = m_frameParameter->getNumericValue(); |
| 218 | int frame = m_frames->readable()[frameIndex]; |
| 219 | std::map<int, IFFFile::Chunk::ChunkIterator>::const_iterator frameIt = frameToRootChildren.find( frame ); |
| 220 | if( frameIt == frameToRootChildren.end() ) |
| 221 | { |
| 222 | msg( Msg::Warning, "NParticleReader::attributeNames()", boost::format( "Frame '%d' (index '%d') does not exist in '%s'." ) % frame % frameIndex % m_iffFileName ); |
| 223 | return; |
| 224 | } |
| 225 | |
| 226 | IFFFile::Chunk::ChunkIterator child = frameIt->second; |
| 227 | IFFFile::Chunk::ChunkIterator it = child->childrenBegin(); |
| 228 | |
| 229 | for ( ; it != child->childrenEnd(); it++ ) |
| 230 | { |
| 231 | if ( it->type().id() == kCHNM ) |
| 232 | { |
| 233 | std::string channelName; |
| 234 | it->read( channelName ); |
| 235 | names.push_back( channelName ); |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | const IntVectorData * NParticleReader::frameTimes() |
| 241 | { |
nothing calls this directly
no test coverage detected