add doc comments for VError and VInterpolate

This commit is contained in:
John Cupitt 2020-08-17 19:16:03 +01:00
parent 636e265477
commit 5e985ad187
2 changed files with 27 additions and 1 deletions

View File

@ -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;
};

View File

@ -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
{