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 
38 {
39 public:
40  VSource( VipsSource *input, VSteal steal = STEAL ) :
41  VObject( (VipsObject *) input, steal )
42  {
43  }
44 
45  static
46  VSource new_from_descriptor( int descriptor );
47 
48  static
49  VSource new_from_file( const char *filename );
50 
51  static
52  VSource new_from_blob( VipsBlob *blob );
53 
54  static
55  VSource new_from_memory( const void *data,
56  size_t size );
57 
58  static
59  VSource new_from_options( const char *options );
60 
61  VipsSource *
62  get_source() const
63  {
64  return( (VipsSource *) VObject::get_object() );
65  }
66 
67 };
68 
70 {
71 public:
72  VTarget( VipsTarget *output, VSteal steal = STEAL ) :
73  VObject( (VipsObject *) output, steal )
74  {
75  }
76 
77  static
78  VTarget new_to_descriptor( int descriptor );
79 
80  static
81  VTarget new_to_file( const char *filename );
82 
83  static
84  VTarget new_to_memory();
85 
86  VipsTarget *
87  get_target() const
88  {
89  return( (VipsTarget *) VObject::get_object() );
90  }
91 
92 };
93 
94 VIPS_NAMESPACE_END
95 
96 #endif /*VIPS_VCONNECTION_H*/
VObject
Definition: VImage8.h:60
VSource
Definition: VConnection8.h:37
VTarget
Definition: VConnection8.h:69