Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


Writer.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(WRITER_HEADER_GUARD_1357924680)
19 #define WRITER_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 #include <cstddef>
29 
30 
31 
33 
34 
35 
36 XALAN_CPP_NAMESPACE_BEGIN
37 
38 
39 
40 class XalanOutputStream;
41 
42 
43 
45 {
46 public:
47 
48  Writer();
49 
50  virtual
51  ~Writer();
52 
53  /**
54  * Close the stream
55  */
56  virtual void
57  close() = 0;
58 
59  /**
60  * Flush the stream
61  */
62  virtual void
63  flush() = 0;
64 
65  /**
66  * Get the stream associated with the writer...
67  */
68  virtual XalanOutputStream*
69  getStream();
70 
71  /**
72  * Get the stream associated with the writer...
73  */
74  virtual const XalanOutputStream*
75  getStream() const;
76 
77 
78  // Output functions
79 
80 #if defined(XALAN_INLINE_INITIALIZATION)
81  static const size_t npos = ~0u;
82 #else
83  static const size_t npos;
84 #endif
85 
86  /**
87  * Writes a string
88  *
89  * @param s string to write
90  * @param theOffset starting offset in string to begin writing, default 0
91  * @param theLength number of characters to write. If the length is npos, then the array is assumed to be null-terminated.
92  */
93  virtual void
94  write(
95  const char* s,
96  size_t theOffset = 0,
97  size_t theLength = npos) = 0;
98 
99  /**
100  * Writes a string
101  *
102  * @param s string to write
103  * @param theOffset starting offset in string to begin writing, default 0
104  * @param theLength number of characters to write. If the length is XalanDOMString::npos, then the array is assumed to be null-terminated.
105  */
106  virtual void
107  write(
108  const XalanDOMChar* s,
109  XalanDOMString::size_type theOffset = 0,
111 
112  /**
113  * Writes a character
114  *
115  * @param c character to write
116  */
117  virtual void
118  write(XalanDOMChar c) = 0;
119 
120  /**
121  * Writes a string
122  *
123  * @param s string to write
124  * @param theOffset starting offset in string to begin writing, default 0
125  * @param theLength number of characters to write. If the length is XalanDOMString::npos, then the entire string is printed.
126  */
127  virtual void
128  write(
129  const XalanDOMString& s,
130  XalanDOMString::size_type theOffset = 0,
132 
133 private:
134 
135  // Not implemented
136  Writer(const Writer&);
137 
138  Writer&
139  operator=(const Writer&);
140 
141  bool
142  operator==(const Writer&);
143 };
144 
145 
146 
147 XALAN_CPP_NAMESPACE_END
148 
149 
150 
151 #endif // WRITER_HEADER_GUARD_1357924680
XalanSize_t size_type
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
static const size_t npos
Definition: Writer.hpp:83
#define XALAN_PLATFORMSUPPORT_EXPORT

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo