1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2
3 #if !IS_CPLUSPLUS
4 #define styled_ostream_representation any_ostream_representation
5 #endif
6 #line 1 "styled-ostream.oo.c"
7 /* Abstract output stream for CSS styled text.
8 Copyright (C) 2006, 2020 Free Software Foundation, Inc.
9 Written by Bruno Haible <bruno@clisp.org>, 2006.
10
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <https://www.gnu.org/licenses/>. */
23
24 #include <config.h>
25
26 /* Specification. */
27 #include "styled-ostream.h"
28
29
30 #line 31 "styled-ostream.c"
31 #include "styled_ostream.priv.h"
32
33 const typeinfo_t styled_ostream_typeinfo = { "styled_ostream" };
34
35 static const typeinfo_t * const styled_ostream_superclasses[] =
36 { styled_ostream_SUPERCLASSES };
37
38 #define super ostream_vtable
39
40 #line 28 "styled-ostream.oo.c"
41
42 /* Instanceof test. */
43
44 bool
45 is_instance_of_styled_ostream (ostream_t stream)
46 {
47 return IS_INSTANCE (stream, ostream, styled_ostream);
48 }
49
50 #line 51 "styled-ostream.c"
51 void styled_ostream__write_mem (styled_ostream_t first_arg, const void *data, size_t len);
52 void
53 styled_ostream__write_mem (styled_ostream_t first_arg, const void *data, size_t len)
54 {
55 super.write_mem (first_arg,data,len);
56 }
57
58 void styled_ostream__flush (styled_ostream_t first_arg, ostream_flush_scope_t scope);
59 void
60 styled_ostream__flush (styled_ostream_t first_arg, ostream_flush_scope_t scope)
61 {
62 super.flush (first_arg,scope);
63 }
64
65 void styled_ostream__free (styled_ostream_t first_arg);
66 void
67 styled_ostream__free (styled_ostream_t first_arg)
68 {
69 super.free (first_arg);
70 }
71
72 void styled_ostream__begin_use_class (styled_ostream_t first_arg, const char *classname);
73 void
74 styled_ostream__begin_use_class (styled_ostream_t first_arg, const char *classname)
75 {
76 /* Abstract (unimplemented) method called. */
77 abort ();
78 #ifndef __GNUC__
79 styled_ostream__begin_use_class (first_arg,classname);
80 #endif
81 }
82
83 void styled_ostream__end_use_class (styled_ostream_t first_arg, const char *classname);
84 void
85 styled_ostream__end_use_class (styled_ostream_t first_arg, const char *classname)
86 {
87 /* Abstract (unimplemented) method called. */
88 abort ();
89 #ifndef __GNUC__
90 styled_ostream__end_use_class (first_arg,classname);
91 #endif
92 }
93
94 const char * styled_ostream__get_hyperlink_ref (styled_ostream_t first_arg);
95 const char *
96 styled_ostream__get_hyperlink_ref (styled_ostream_t first_arg)
97 {
98 /* Abstract (unimplemented) method called. */
99 abort ();
100 #ifndef __GNUC__
101 return styled_ostream__get_hyperlink_ref (first_arg);
102 #endif
103 }
104
105 const char * styled_ostream__get_hyperlink_id (styled_ostream_t first_arg);
106 const char *
107 styled_ostream__get_hyperlink_id (styled_ostream_t first_arg)
108 {
109 /* Abstract (unimplemented) method called. */
110 abort ();
111 #ifndef __GNUC__
112 return styled_ostream__get_hyperlink_id (first_arg);
113 #endif
114 }
115
116 void styled_ostream__set_hyperlink (styled_ostream_t first_arg, const char *ref, const char *id);
117 void
118 styled_ostream__set_hyperlink (styled_ostream_t first_arg, const char *ref, const char *id)
119 {
120 /* Abstract (unimplemented) method called. */
121 abort ();
122 #ifndef __GNUC__
123 styled_ostream__set_hyperlink (first_arg,ref,id);
124 #endif
125 }
126
127 void styled_ostream__flush_to_current_style (styled_ostream_t first_arg);
128 void
129 styled_ostream__flush_to_current_style (styled_ostream_t first_arg)
130 {
131 /* Abstract (unimplemented) method called. */
132 abort ();
133 #ifndef __GNUC__
134 styled_ostream__flush_to_current_style (first_arg);
135 #endif
136 }
137
138
139 const struct styled_ostream_implementation styled_ostream_vtable =
140 {
141 styled_ostream_superclasses,
142 sizeof (styled_ostream_superclasses) / sizeof (styled_ostream_superclasses[0]),
143 sizeof (struct styled_ostream_representation),
144 styled_ostream__write_mem,
145 styled_ostream__flush,
146 styled_ostream__free,
147 styled_ostream__begin_use_class,
148 styled_ostream__end_use_class,
149 styled_ostream__get_hyperlink_ref,
150 styled_ostream__get_hyperlink_id,
151 styled_ostream__set_hyperlink,
152 styled_ostream__flush_to_current_style,
153 };
154
155 #if !HAVE_INLINE
156
157 /* Define the functions that invoke the methods. */
158
159 void
160 styled_ostream_write_mem (styled_ostream_t first_arg, const void *data, size_t len)
161 {
162 const struct styled_ostream_implementation *vtable =
163 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
164 vtable->write_mem (first_arg,data,len);
165 }
166
167 void
168 styled_ostream_flush (styled_ostream_t first_arg, ostream_flush_scope_t scope)
169 {
170 const struct styled_ostream_implementation *vtable =
171 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
172 vtable->flush (first_arg,scope);
173 }
174
175 void
176 styled_ostream_free (styled_ostream_t first_arg)
177 {
178 const struct styled_ostream_implementation *vtable =
179 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
180 vtable->free (first_arg);
181 }
182
183 void
184 styled_ostream_begin_use_class (styled_ostream_t first_arg, const char *classname)
185 {
186 const struct styled_ostream_implementation *vtable =
187 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
188 vtable->begin_use_class (first_arg,classname);
189 }
190
191 void
192 styled_ostream_end_use_class (styled_ostream_t first_arg, const char *classname)
193 {
194 const struct styled_ostream_implementation *vtable =
195 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
196 vtable->end_use_class (first_arg,classname);
197 }
198
199 const char *
200 styled_ostream_get_hyperlink_ref (styled_ostream_t first_arg)
201 {
202 const struct styled_ostream_implementation *vtable =
203 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
204 return vtable->get_hyperlink_ref (first_arg);
205 }
206
207 const char *
208 styled_ostream_get_hyperlink_id (styled_ostream_t first_arg)
209 {
210 const struct styled_ostream_implementation *vtable =
211 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
212 return vtable->get_hyperlink_id (first_arg);
213 }
214
215 void
216 styled_ostream_set_hyperlink (styled_ostream_t first_arg, const char *ref, const char *id)
217 {
218 const struct styled_ostream_implementation *vtable =
219 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
220 vtable->set_hyperlink (first_arg,ref,id);
221 }
222
223 void
224 styled_ostream_flush_to_current_style (styled_ostream_t first_arg)
225 {
226 const struct styled_ostream_implementation *vtable =
227 ((struct styled_ostream_representation_header *) (struct styled_ostream_representation *) first_arg)->vtable;
228 vtable->flush_to_current_style (first_arg);
229 }
230
231 #endif