Xalan-C++ API Reference  1.12.0
FormatterStringLengthCounter.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(FORMATTERSTRINGLENGTHCOUNTER_HEADER_GUARD_1357924680)
19 #define FORMATTERSTRINGLENGTHCOUNTER_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 // Base class header file.
30 
31 
32 
33 namespace XALAN_CPP_NAMESPACE {
34 
35 
36 
37 /**
38  * This class takes SAX events (in addition to some extra events
39  * that SAX doesn't handle yet) and produces counts the characters
40  * sent to the characters event.
41  */
43 {
44 public:
45 
46  /**
47  * FormatterStringLengthCounter instance constructor.
48  */
49  explicit
51 
52  virtual
54 
55 
56  size_type
57  getCount() const
58  {
59  return m_count;
60  }
61 
62  // These methods are inherited from FormatterListener ...
63 
64  virtual void
65  setDocumentLocator(const Locator* const locator);
66 
67  virtual void
68  startDocument();
69 
70  virtual void
71  endDocument();
72 
73  virtual void
74  startElement(
75  const XMLCh* const name,
76  AttributeListType& attrs);
77 
78  virtual void
79  endElement(const XMLCh* const name);
80 
81  virtual void
82  characters(
83  const XMLCh* const chars,
84  const size_type length);
85 
86  virtual void
87  charactersRaw(
88  const XMLCh* const chars,
89  const size_type length);
90 
91  virtual void
92  entityReference(const XMLCh* const name);
93 
94  virtual void
95  ignorableWhitespace(
96  const XMLCh* const chars,
97  const size_type length);
98 
99  virtual void
100  processingInstruction(
101  const XMLCh* const target,
102  const XMLCh* const data);
103 
104  virtual void
105  resetDocument();
106 
107  virtual void
108  comment(const XMLCh* const data);
109 
110  virtual void
111  cdata(
112  const XMLCh* const ch,
113  const size_type length);
114 
115 private:
116 
117  // These are not implemented.
119 
121  operator=(const FormatterStringLengthCounter&);
122 
123  bool
125 
126  // Data members...
127  size_type m_count;
128 };
129 
130 
131 
132 }
133 
134 
135 
136 #endif // FORMATTERSTRINGLENGTHCOUNTER_HEADER_GUARD_1357924680
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::AttributeListType
xercesc::AttributeList AttributeListType
Definition: AttributeListImpl.hpp:41
xalanc::FormatterStringLengthCounter::getCount
size_type getCount() const
Definition: FormatterStringLengthCounter.hpp:57
FormatterListener.hpp
xalanc::size_type
size_t size_type
Definition: XalanMap.hpp:46
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
xalanc::FormatterListener::size_type
XalanSize_t size_type
Definition: FormatterListener.hpp:63
xalanc::length
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:235
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::FormatterStringLengthCounter
This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and produc...
Definition: FormatterStringLengthCounter.hpp:42
XPathDefinitions.hpp