vips-cpp  8.11
libvips C++ binding
VConnection8.h
1 // VIPS connection wrapper
2 
3 /*
4 
5  This file is part of VIPS.
6 
7  VIPS is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  02110-1301 USA
21 
22  */
23 
24 /*
25 
26  These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
27 
28  */
29 
30 #ifndef VIPS_VCONNECTION_H
31 #define VIPS_VCONNECTION_H
32 
33 #include <vips/vips.h>
34 
35 VIPS_NAMESPACE_START
36 
45 class VSource : public VObject
46 {
47 public:
51  VSource( VipsSource *input, VSteal steal = STEAL ) :
52  VObject( (VipsObject *) input, steal )
53  {
54  }
55 
59  static VSource
60  new_from_descriptor( int descriptor );
61 
65  static VSource
66  new_from_file( const char *filename );
67 
71  static VSource
72  new_from_blob( VipsBlob *blob );
73 
77  static VSource
78  new_from_memory( const void *data, size_t size );
79 
84  static VSource
85  new_from_options( const char *options );
86 
90  VipsSource *
91  get_source() const
92  {
93  return( (VipsSource *) VObject::get_object() );
94  }
95 
96 };
97 
106 class VTarget : public VObject
107 {
108 public:
112  VTarget( VipsTarget *output, VSteal steal = STEAL ) :
113  VObject( (VipsObject *) output, steal )
114  {
115  }
116 
121  static VTarget
122  new_to_descriptor( int descriptor );
123 
127  static
128  VTarget new_to_file( const char *filename );
129 
134  static
136 
140  VipsTarget *
141  get_target() const
142  {
143  return( (VipsTarget *) VObject::get_object() );
144  }
145 
146 };
147 
148 VIPS_NAMESPACE_END
149 
150 #endif /*VIPS_VCONNECTION_H*/
Definition: VImage8.h:68
VipsObject * get_object() const
Definition: VImage8.h:172
Definition: VConnection8.h:46
static VSource new_from_blob(VipsBlob *blob)
Definition: VConnection.cpp:74
static VSource new_from_options(const char *options)
Definition: VConnection.cpp:101
static VSource new_from_file(const char *filename)
Definition: VConnection.cpp:61
VipsSource * get_source() const
Definition: VConnection8.h:91
static VSource new_from_memory(const void *data, size_t size)
Definition: VConnection.cpp:87
VSource(VipsSource *input, VSteal steal=STEAL)
Definition: VConnection8.h:51
static VSource new_from_descriptor(int descriptor)
Definition: VConnection.cpp:48
Definition: VConnection8.h:107
static VTarget new_to_file(const char *filename)
Definition: VConnection.cpp:127
VipsTarget * get_target() const
Definition: VConnection8.h:141
static VTarget new_to_memory()
Definition: VConnection.cpp:140
static VTarget new_to_descriptor(int descriptor)
Definition: VConnection.cpp:114
VTarget(VipsTarget *output, VSteal steal=STEAL)
Definition: VConnection8.h:112