| 60 | }; |
| 61 | |
| 62 | struct GeometricInterpretationSetter |
| 63 | { |
| 64 | GeometricInterpretationSetter( IECore::GeometricData::Interpretation interpretation ) : m_interpretation( interpretation ) |
| 65 | { |
| 66 | } |
| 67 | |
| 68 | template<typename T> |
| 69 | void operator()( IECore::GeometricTypedData<T> *data ) |
| 70 | { |
| 71 | data->setInterpretation( m_interpretation ); |
| 72 | } |
| 73 | |
| 74 | void operator()( Data *data ) |
| 75 | { |
| 76 | if( m_interpretation != IECore::GeometricData::None ) |
| 77 | { |
| 78 | throw IECore::InvalidArgumentException( std::string( "Cannot set geometric interpretation on type " ) + data->typeName() ); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | private : |
| 83 | |
| 84 | IECore::GeometricData::Interpretation m_interpretation; |
| 85 | |
| 86 | }; |
| 87 | |
| 88 | struct UniqueValueCollector |
| 89 | { |
no outgoing calls
no test coverage detected