• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/gnulib-lib/
1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2
3#line 1 "term-styled-ostream.oo.h"
4/* Output stream for CSS styled text, producing ANSI escape sequences.
5   Copyright (C) 2006 Free Software Foundation, Inc.
6   Written by Bruno Haible <bruno@clisp.org>, 2006.
7
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.
12
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.
17
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/>.  */
20
21#ifndef _TERM_STYLED_OSTREAM_H
22#define _TERM_STYLED_OSTREAM_H
23
24#include "styled-ostream.h"
25
26
27#line 28 "term-styled-ostream.h"
28struct term_styled_ostream_representation;
29/* term_styled_ostream_t is defined as a pointer to struct term_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.  */
32#if IS_CPLUSPLUS
33struct term_styled_ostream_t
34{
35private:
36  struct term_styled_ostream_representation *_pointer;
37public:
38  term_styled_ostream_t () : _pointer (NULL) {}
39  term_styled_ostream_t (struct term_styled_ostream_representation *pointer) : _pointer (pointer) {}
40  struct term_styled_ostream_representation * operator -> () { return _pointer; }
41  operator struct term_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 term_styled_ostream_t (ostream_t x) : _pointer ((struct term_styled_ostream_representation *) (void *) x) {}
49  operator styled_ostream_t () { return (styled_ostream_t) (struct styled_ostream_representation *) _pointer; }
50  explicit term_styled_ostream_t (styled_ostream_t x) : _pointer ((struct term_styled_ostream_representation *) (void *) x) {}
51};
52#else
53typedef styled_ostream_t term_styled_ostream_t;
54#endif
55
56/* Functions that invoke the methods.  */
57extern        void term_styled_ostream_write_mem (term_styled_ostream_t first_arg, const void *data, size_t len);
58extern         void term_styled_ostream_flush (term_styled_ostream_t first_arg);
59extern         void term_styled_ostream_free (term_styled_ostream_t first_arg);
60extern          void term_styled_ostream_begin_use_class (term_styled_ostream_t first_arg, const char *classname);
61extern          void term_styled_ostream_end_use_class (term_styled_ostream_t first_arg, const char *classname);
62
63/* Type representing an implementation of term_styled_ostream_t.  */
64struct term_styled_ostream_implementation
65{
66  const typeinfo_t * const *superclasses;
67  size_t superclasses_length;
68  size_t instance_size;
69#define THIS_ARG term_styled_ostream_t first_arg
70#include "term_styled_ostream.vt.h"
71#undef THIS_ARG
72};
73
74/* Public portion of the object pointed to by a term_styled_ostream_t.  */
75struct term_styled_ostream_representation_header
76{
77  const struct term_styled_ostream_implementation *vtable;
78};
79
80#if HAVE_INLINE
81
82/* Define the functions that invoke the methods as inline accesses to
83   the term_styled_ostream_implementation.
84   Use #define to avoid a warning because of extern vs. static.  */
85
86# define term_styled_ostream_write_mem term_styled_ostream_write_mem_inline
87static inline void
88term_styled_ostream_write_mem (term_styled_ostream_t first_arg, const void *data, size_t len)
89{
90  const struct term_styled_ostream_implementation *vtable =
91    ((struct term_styled_ostream_representation_header *) (struct term_styled_ostream_representation *) first_arg)->vtable;
92  vtable->write_mem (first_arg,data,len);
93}
94
95# define term_styled_ostream_flush term_styled_ostream_flush_inline
96static inline void
97term_styled_ostream_flush (term_styled_ostream_t first_arg)
98{
99  const struct term_styled_ostream_implementation *vtable =
100    ((struct term_styled_ostream_representation_header *) (struct term_styled_ostream_representation *) first_arg)->vtable;
101  vtable->flush (first_arg);
102}
103
104# define term_styled_ostream_free term_styled_ostream_free_inline
105static inline void
106term_styled_ostream_free (term_styled_ostream_t first_arg)
107{
108  const struct term_styled_ostream_implementation *vtable =
109    ((struct term_styled_ostream_representation_header *) (struct term_styled_ostream_representation *) first_arg)->vtable;
110  vtable->free (first_arg);
111}
112
113# define term_styled_ostream_begin_use_class term_styled_ostream_begin_use_class_inline
114static inline void
115term_styled_ostream_begin_use_class (term_styled_ostream_t first_arg, const char *classname)
116{
117  const struct term_styled_ostream_implementation *vtable =
118    ((struct term_styled_ostream_representation_header *) (struct term_styled_ostream_representation *) first_arg)->vtable;
119  vtable->begin_use_class (first_arg,classname);
120}
121
122# define term_styled_ostream_end_use_class term_styled_ostream_end_use_class_inline
123static inline void
124term_styled_ostream_end_use_class (term_styled_ostream_t first_arg, const char *classname)
125{
126  const struct term_styled_ostream_implementation *vtable =
127    ((struct term_styled_ostream_representation_header *) (struct term_styled_ostream_representation *) first_arg)->vtable;
128  vtable->end_use_class (first_arg,classname);
129}
130
131#endif
132
133extern const typeinfo_t term_styled_ostream_typeinfo;
134#define term_styled_ostream_SUPERCLASSES &term_styled_ostream_typeinfo, styled_ostream_SUPERCLASSES
135#define term_styled_ostream_SUPERCLASSES_LENGTH (1 + styled_ostream_SUPERCLASSES_LENGTH)
136
137extern const struct term_styled_ostream_implementation term_styled_ostream_vtable;
138
139#line 28 "term-styled-ostream.oo.h"
140
141
142#ifdef __cplusplus
143extern "C" {
144#endif
145
146
147/* Create an output stream referring to the file descriptor FD, styled with
148   the file CSS_FILENAME.
149   FILENAME is used only for error messages.
150   Note that the resulting stream must be closed before FD can be closed.
151   Return NULL upon failure.  */
152extern term_styled_ostream_t
153       term_styled_ostream_create (int fd, const char *filename,
154				   const char *css_filename);
155
156
157#ifdef __cplusplus
158}
159#endif
160
161#endif /* _TERM_STYLED_OSTREAM_H */
162