| 360 | } |
| 361 | |
| 362 | bool Tr2BindingPoint::GetValue( float& value ) const |
| 363 | { |
| 364 | if( !IsValid() ) |
| 365 | { |
| 366 | return false; |
| 367 | } |
| 368 | switch( m_entry->mType ) |
| 369 | { |
| 370 | case Be::FLOAT: |
| 371 | value = *reinterpret_cast<float*>( m_destination ); |
| 372 | break; |
| 373 | case Be::DOUBLE: |
| 374 | value = float( *reinterpret_cast<double*>( m_destination ) ); |
| 375 | break; |
| 376 | case Be::BOOL: |
| 377 | value = float( *reinterpret_cast<bool*>( m_destination ) ? 1.f : 0.f ); |
| 378 | break; |
| 379 | case Be::FLOATARRAY: |
| 380 | value = reinterpret_cast<float*>( m_destination )[std::max( m_entryOffset, 0 )]; |
| 381 | break; |
| 382 | case Be::DOUBLEARRAY: |
| 383 | value = float( reinterpret_cast<double*>( m_destination )[std::max( m_entryOffset, 0 )] ); |
| 384 | break; |
| 385 | default: |
| 386 | return false; |
| 387 | } |
| 388 | return true; |
| 389 | } |
| 390 | |
| 391 | bool Tr2BindingPoint::SetDestination( IRoot* object, const std::string& attribute ) |
| 392 | { |
no test coverage detected