MCPcopy Create free account
hub / github.com/ImageEngine/cortex / GeometricInterpretationSetter

Class GeometricInterpretationSetter

src/IECore/DataAlgo.cpp:62–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60};
61
62struct 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
88struct UniqueValueCollector
89{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected