diff --git a/cplusplus/include/vips/VError8.h b/cplusplus/include/vips/VError8.h index 29f3e9fb..24ddd135 100644 --- a/cplusplus/include/vips/VError8.h +++ b/cplusplus/include/vips/VError8.h @@ -43,12 +43,27 @@ class VIPS_CPLUSPLUS_API VError : public std::exception { std::string _what; public: + /** + * Construct a VError, setting the error message. + */ VError( const std::string &what ) : _what( what ) {} + + /** + * Construct a VError, fetching the error message from the libvips + * error buffer. + */ VError() : _what( vips_error_buffer() ) {} + virtual ~VError() throw() {} - // Extract string + /** + * Get a reference to the underlying C string. + */ virtual const char *what() const throw() { return _what.c_str(); } + + /** + * Print the error message to a stream. + */ void ostream_print( std::ostream & ) const; }; diff --git a/cplusplus/include/vips/VInterpolate8.h b/cplusplus/include/vips/VInterpolate8.h index 43ef2429..d09da1ce 100644 --- a/cplusplus/include/vips/VInterpolate8.h +++ b/cplusplus/include/vips/VInterpolate8.h @@ -37,14 +37,25 @@ VIPS_NAMESPACE_START class VInterpolate : VObject { public: + /** + * Create a VInterpolate that wraps a VipsInterpolate object. If steal + * is STEAL, then this VInterpolate takes over ownership of the libvips + * object and will automatically unref it. + */ VInterpolate( VipsInterpolate *interpolate, VSteal steal = STEAL ) : VObject( (VipsObject *) interpolate, steal ) { } + /** + * Create a VInterpolate from a name, for example `"bicubic"`. + */ static VInterpolate new_from_name( const char *name, VOption *options = 0 ); + /** + * Get a pointer to the underlying VipsInterpolate object. + */ VipsInterpolate * get_interpolate() const {