Fix InstrumentSwitch grob definition.
[lilypond.git] / flower / include / memory-stream.hh
blob699dea851490f5600558f01e4cf8d6e45f18076c
1 /*
2 memory-stream.hh -- declare Memory_out_stream
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #ifndef MEMORY_STREAM_HH
10 #define MEMORY_STREAM_HH
12 #include <cstdio>
13 #include <unistd.h>
14 using namespace std;
16 #include "libc-extension.hh"
17 #include "file-cookie.hh"
19 class Memory_out_stream
21 char *buffer_;
22 ssize_t size_;
23 int buffer_blocks_;
24 FILE *file_;
26 static lily_cookie_io_functions_t functions_;
27 static const int block_size_;
29 public:
30 static ssize_t reader (void *, char *, size_t);
31 static ssize_t writer (void *, char const *, size_t);
32 static int seeker (void *, off64_t *, int);
33 static int cleaner (void *);
35 Memory_out_stream ();
36 ~Memory_out_stream ();
37 FILE *get_file () const;
38 char const *get_string () const;
39 ssize_t get_length () const;
42 #endif /* MEMORY_STREAM_HH */