1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 #line 1 "html-styled-ostream.oo.h"
4 /* Output stream for CSS styled text, producing HTML output.
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/>. */
21 #ifndef _HTML_STYLED_OSTREAM_H
22 #define _HTML_STYLED_OSTREAM_H
24 #include "styled-ostream.h"
27 #line 28 "html-styled-ostream.h"
28 struct html_styled_ostream_representation;
29 /* html_styled_ostream_t is defined as a pointer to struct html_styled_ostream_representation.
30 In C++ mode, we use a smart pointer class.
31 In C mode, we have no other choice than a typedef to the root class type. */
33 struct html_styled_ostream_t
36 struct html_styled_ostream_representation *_pointer;
38 html_styled_ostream_t () : _pointer (NULL) {}
39 html_styled_ostream_t (struct html_styled_ostream_representation *pointer) : _pointer (pointer) {}
40 struct html_styled_ostream_representation * operator -> () { return _pointer; }
41 operator struct html_styled_ostream_representation * () { return _pointer; }
42 operator struct any_ostream_representation * () { return (struct any_ostream_representation *) _pointer; }
43 operator struct styled_ostream_representation * () { return (struct styled_ostream_representation *) _pointer; }
44 operator void * () { return _pointer; }
45 bool operator == (const void *p) { return _pointer == p; }
46 bool operator != (const void *p) { return _pointer != p; }
47 operator ostream_t () { return (ostream_t) (struct any_ostream_representation *) _pointer; }
48 explicit html_styled_ostream_t (ostream_t x) : _pointer ((struct html_styled_ostream_representation *) (void *) x) {}
49 operator styled_ostream_t () { return (styled_ostream_t) (struct styled_ostream_representation *) _pointer; }
50 explicit html_styled_ostream_t (styled_ostream_t x) : _pointer ((struct html_styled_ostream_representation *) (void *) x) {}
53 typedef styled_ostream_t html_styled_ostream_t;
56 /* Functions that invoke the methods. */
57 extern void html_styled_ostream_write_mem (html_styled_ostream_t first_arg, const void *data, size_t len);
58 extern void html_styled_ostream_flush (html_styled_ostream_t first_arg);
59 extern void html_styled_ostream_free (html_styled_ostream_t first_arg);
60 extern void html_styled_ostream_begin_use_class (html_styled_ostream_t first_arg, const char *classname);
61 extern void html_styled_ostream_end_use_class (html_styled_ostream_t first_arg, const char *classname);
63 /* Type representing an implementation of html_styled_ostream_t. */
64 struct html_styled_ostream_implementation
66 const typeinfo_t * const *superclasses;
67 size_t superclasses_length;
69 #define THIS_ARG html_styled_ostream_t first_arg
70 #include "html_styled_ostream.vt.h"
74 /* Public portion of the object pointed to by a html_styled_ostream_t. */
75 struct html_styled_ostream_representation_header
77 const struct html_styled_ostream_implementation *vtable;
82 /* Define the functions that invoke the methods as inline accesses to
83 the html_styled_ostream_implementation.
84 Use #define to avoid a warning because of extern vs. static. */
86 # define html_styled_ostream_write_mem html_styled_ostream_write_mem_inline
88 html_styled_ostream_write_mem (html_styled_ostream_t first_arg, const void *data, size_t len)
90 const struct html_styled_ostream_implementation *vtable =
91 ((struct html_styled_ostream_representation_header *) (struct html_styled_ostream_representation *) first_arg)->vtable;
92 vtable->write_mem (first_arg,data,len);
95 # define html_styled_ostream_flush html_styled_ostream_flush_inline
97 html_styled_ostream_flush (html_styled_ostream_t first_arg)
99 const struct html_styled_ostream_implementation *vtable =
100 ((struct html_styled_ostream_representation_header *) (struct html_styled_ostream_representation *) first_arg)->vtable;
101 vtable->flush (first_arg);
104 # define html_styled_ostream_free html_styled_ostream_free_inline
106 html_styled_ostream_free (html_styled_ostream_t first_arg)
108 const struct html_styled_ostream_implementation *vtable =
109 ((struct html_styled_ostream_representation_header *) (struct html_styled_ostream_representation *) first_arg)->vtable;
110 vtable->free (first_arg);
113 # define html_styled_ostream_begin_use_class html_styled_ostream_begin_use_class_inline
115 html_styled_ostream_begin_use_class (html_styled_ostream_t first_arg, const char *classname)
117 const struct html_styled_ostream_implementation *vtable =
118 ((struct html_styled_ostream_representation_header *) (struct html_styled_ostream_representation *) first_arg)->vtable;
119 vtable->begin_use_class (first_arg,classname);
122 # define html_styled_ostream_end_use_class html_styled_ostream_end_use_class_inline
124 html_styled_ostream_end_use_class (html_styled_ostream_t first_arg, const char *classname)
126 const struct html_styled_ostream_implementation *vtable =
127 ((struct html_styled_ostream_representation_header *) (struct html_styled_ostream_representation *) first_arg)->vtable;
128 vtable->end_use_class (first_arg,classname);
133 extern const typeinfo_t html_styled_ostream_typeinfo;
134 #define html_styled_ostream_SUPERCLASSES &html_styled_ostream_typeinfo, styled_ostream_SUPERCLASSES
135 #define html_styled_ostream_SUPERCLASSES_LENGTH (1 + styled_ostream_SUPERCLASSES_LENGTH)
137 extern const struct html_styled_ostream_implementation html_styled_ostream_vtable;
139 #line 28 "html-styled-ostream.oo.h"
147 /* Create an output stream that takes input in the UTF-8 encoding and
148 writes it in HTML form on DESTINATION, styled with the file CSS_FILENAME.
149 Note that the resulting stream must be closed before DESTINATION can be
151 extern html_styled_ostream_t
152 html_styled_ostream_create (ostream_t destination,
153 const char *css_filename);
160 #endif /* _HTML_STYLED_OSTREAM_H */