\todo Rewrite the Parameter::valueValid bindings to follow this form? They currently always return a tuple, which is causing lots of coding errors (the tuple is always true, and it's easy to forget a tuple is being returned and expect a bool instead).
| 110 | /// return a tuple, which is causing lots of coding errors (the tuple is always true, and it's |
| 111 | /// easy to forget a tuple is being returned and expect a bool instead). |
| 112 | static object channelValid( ImagePrimitive &that, Data &d, bool wantReason = false ) |
| 113 | { |
| 114 | if( wantReason ) |
| 115 | { |
| 116 | std::string reason; |
| 117 | bool v = that.channelValid( &d, &reason ); |
| 118 | return boost::python::make_tuple( v, reason ); |
| 119 | } |
| 120 | bool v = that.channelValid( &d ); |
| 121 | return object( v ); |
| 122 | } |
| 123 | |
| 124 | static object channelValid2( ImagePrimitive &that, const char *n, bool wantReason = false ) |
| 125 | { |
no test coverage detected