1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
4 /* Abstract output stream data type.
5 Copyright (C) 2006 Free Software Foundation, Inc.
6 Written by Bruno Haible <bruno@clisp.org>, 2006.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
28 #define ostream_representation any_ostream_representation
30 #include "ostream.priv.h"
32 const typeinfo_t ostream_typeinfo = { "ostream" };
34 static const typeinfo_t * const ostream_superclasses[] =
35 { ostream_SUPERCLASSES };
37 #line 27 "ostream.oo.c"
42 ostream_write_str (ostream_t stream, const char *string)
44 ostream_write_mem (stream, string, strlen (string));
50 void ostream__write_mem (ostream_t first_arg, const void *data, size_t len);
52 ostream__write_mem (ostream_t first_arg, const void *data, size_t len)
54 /* Abstract (unimplemented) method called. */
57 ostream__write_mem (first_arg,data,len);
61 void ostream__flush (ostream_t first_arg);
63 ostream__flush (ostream_t first_arg)
65 /* Abstract (unimplemented) method called. */
68 ostream__flush (first_arg);
72 void ostream__free (ostream_t first_arg);
74 ostream__free (ostream_t first_arg)
76 /* Abstract (unimplemented) method called. */
79 ostream__free (first_arg);
84 const struct ostream_implementation ostream_vtable =
87 sizeof (ostream_superclasses) / sizeof (ostream_superclasses[0]),
88 sizeof (struct ostream_representation),
96 /* Define the functions that invoke the methods. */
99 ostream_write_mem (ostream_t first_arg, const void *data, size_t len)
101 const struct ostream_implementation *vtable =
102 ((struct ostream_representation_header *) (struct any_ostream_representation *) first_arg)->vtable;
103 vtable->write_mem (first_arg,data,len);
107 ostream_flush (ostream_t first_arg)
109 const struct ostream_implementation *vtable =
110 ((struct ostream_representation_header *) (struct any_ostream_representation *) first_arg)->vtable;
111 vtable->flush (first_arg);
115 ostream_free (ostream_t first_arg)
117 const struct ostream_implementation *vtable =
118 ((struct ostream_representation_header *) (struct any_ostream_representation *) first_arg)->vtable;
119 vtable->free (first_arg);