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

Method valueValid

include/IECorePython/ParameterBinding.h:91–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 }
90
91 bool valueValid( const IECore::Object *value, std::string *reason = nullptr ) const override
92 {
93 if( this->isSubclassed() )
94 {
95 ScopedGILLock gilLock;
96 try
97 {
98 if( boost::python::object f = this->methodOverride( "valueValid" ) )
99 {
100 boost::python::tuple r = boost::python::extract<boost::python::tuple>( f( IECore::ObjectPtr( const_cast<IECore::Object *>( value ) ) ) );
101 if( reason )
102 {
103 *reason = boost::python::extract<std::string>( r[1] );
104 }
105 return boost::python::extract<bool>( r[0] );
106 }
107 }
108
109 catch( const boost::python::error_already_set & )
110 {
111 ExceptionAlgo::translatePythonException();
112 }
113
114 }
115
116 return T::valueValid( value, reason );
117 }
118
119};
120

Callers

nothing calls this directly

Calls 2

translatePythonExceptionFunction · 0.85
methodOverrideMethod · 0.80

Tested by

no test coverage detected