2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef MEMORY_STREAM_HH
21 #define MEMORY_STREAM_HH
27 #include "libc-extension.hh"
28 #include "file-cookie.hh"
30 class Memory_out_stream
37 static lily_cookie_io_functions_t functions_;
38 static const int block_size_;
41 static ssize_t reader (void *, char *, size_t);
42 static ssize_t writer (void *, char const *, size_t);
43 static ssize_t seeker (void *, off64_t *, size_t);
44 static ssize_t cleaner (void *);
47 ~Memory_out_stream ();
48 FILE *get_file () const;
49 char const *get_string () const;
50 ssize_t get_length () const;
53 #endif /* MEMORY_STREAM_HH */