Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XObjectFactoryDefault.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XOBJECTFACTORYDEFAULT_HEADER_GUARD_1357924680)
17 #define XOBJECTFACTORYDEFAULT_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
30 // Base class header file...
32 
33 
34 
38 #include <xalanc/XPath/XNull.hpp>
46 
47 
48 
49 
50 XALAN_CPP_NAMESPACE_BEGIN
51 
52 
53 
58 {
59 public:
60 
61  // Default block size for strings.
62  enum
63  {
64  eDefaultXStringBlockSize = 10,
65  eDefaultXNumberBlockSize = 10,
66  eDefaultXNodeSetBlockSize = 10,
67  eDefaultXNodeSetNodeProxyBlockSize = 5,
68  eXNumberCacheMax = 40,
69  eXNodeSetCacheMax = 40,
70  eXStringCacheMax = 40,
71  eXResultTreeFragCacheMax = 40
72  };
73 
75 
83  explicit
86  size_type theXStringBlockSize = eDefaultXStringBlockSize,
87  size_type theXNumberBlockSize = eDefaultXNumberBlockSize,
88  size_type theXNodeSetBlockSize = eDefaultXNodeSetBlockSize,
89  size_type theXNodeSetNodeProxyBlockSize = eDefaultXNodeSetNodeProxyBlockSize);
90 
91  static XObjectFactoryDefault*
92  create(
93  MemoryManagerType& theManager,
94  size_type theXStringBlockSize = eDefaultXStringBlockSize,
95  size_type theXNumberBlockSize = eDefaultXNumberBlockSize,
96  size_type theXNodeSetBlockSize = eDefaultXNodeSetBlockSize,
97  size_type theXNodeSetNodeProxyBlockSize = eDefaultXNodeSetNodeProxyBlockSize);
98 
99 
100  virtual
102 
105  {
106  return m_xobjects.getMemoryManager();
107  }
108  // These methods are inherited from XObjectFactory ...
109 
110  virtual void
111  reset();
112 
113  virtual const XObjectPtr
114  createBoolean(bool theValue);
115 
116  virtual const XObjectPtr
117  createNodeSet(BorrowReturnMutableNodeRefList& theValue);
118 
119  virtual const XObjectPtr
120  createNodeSet(XalanNode* theValue);
121 
122  virtual const XObjectPtr
123  createNull();
124 
125  virtual const XObjectPtr
126  createNumber(double theValue);
127 
128  virtual const XObjectPtr
129  createNumber(const XToken& theValue);
130 
131  virtual const XObjectPtr
132  createString(const XalanDOMString& theValue);
133 
134  virtual const XObjectPtr
135  createString(const XalanDOMChar* theValue);
136 
137  virtual const XObjectPtr
138  createString(
139  const XalanDOMChar* theValue,
140  unsigned int theLength);
141 
142  virtual const XObjectPtr
143  createString(const XToken& theValue);
144 
145  virtual const XObjectPtr
146  createStringReference(const XalanDOMString& theValue);
147 
148  virtual const XObjectPtr
149  createStringAdapter(const XObjectPtr& theValue);
150 
151  virtual const XObjectPtr
152  createString(GetAndReleaseCachedString& theValue);
153 
154  virtual const XObjectPtr
156  const XalanDOMString& theValue);
157 
162 
163 protected:
164 
165  virtual bool
167  XObject* theXObject,
168  bool fInReset = false);
169 
170 private:
171 
172  // Not implemented...
174 
176  operator=(const XObjectFactoryDefault&);
177 
178  bool
179  operator==(const XObjectFactoryDefault&) const;
180 
181 
182  // Data members...
183 
184  // This one's first, since it may be be holding references
185  // to objects in other allocators.
186  XStringAdapterAllocator m_xstringAdapterAllocator;
187 
188  XStringAllocator m_xstringAllocator;
189 
190  XStringCachedAllocator m_xstringCachedAllocator;
191 
192  XStringReferenceAllocator m_xstringReferenceAllocator;
193 
194  XNumberAllocator m_xnumberAllocator;
195 
196  XNodeSetAllocator m_xnodesetAllocator;
197 
198  XNodeSetNodeProxyAllocator m_xnodesetNodeProxyAllocator;
199 
200  XTokenNumberAdapterAllocator m_xtokenNumberAdapterAllocator;
201 
202  XTokenStringAdapterAllocator m_xtokenStringAdapterAllocator;
203 
204  XObjectCollectionType m_xobjects;
205 
206  XNumberCacheType m_xnumberCache;
207 
208  XNodeSetCacheType m_xnodesetCache;
209 
210  XStringCacheType m_xstringCache;
211 
212  XNull m_xnull;
213 
214  XBoolean m_xbooleanFalse;
215 
216  XBoolean m_xbooleanTrue;
217 };
218 
219 
220 
221 XALAN_CPP_NAMESPACE_END
222 
223 
224 
225 #endif // XOBJECTFACTORYDEFAULT_HEADER_GUARD_1357924680

Interpreting class diagrams

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

dot

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

Apache Logo