## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.10

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XalanDOMStringPool.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *     http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016 #if !defined(XALANDOMSTRINGPOOL_HEADER_GUARD_1357924680)
    00017 #define XALANDOMSTRINGPOOL_HEADER_GUARD_1357924680
    00018
    00019
    00020
    00021 // Base include file.  Must be first.
    00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
    00023
    00024
    00025
    00026 #include <xalanc/PlatformSupport/ArenaAllocator.hpp>
    00027 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
    00028 #include <xalanc/PlatformSupport/XalanDOMStringAllocator.hpp>
    00029 #include <xalanc/PlatformSupport/XalanDOMStringHashTable.hpp>
    00030
    00031
    00032
    00033 XALAN_CPP_NAMESPACE_BEGIN
    00034
    00035
    00036
    00037 class XALAN_PLATFORMSUPPORT_EXPORT XalanDOMStringPool
    00038 {
    00039 public:
    00040
    00041     enum { eDefaultBlockSize = 32,
    00042            eDefaultBucketCount = XalanDOMStringHashTable::eDefaultBucketCount,
    00043            eDefaultBucketSize = XalanDOMStringHashTable::eDefaultBucketSize };
    00044
    00045     typedef XalanDOMStringAllocator         AllocatorType;
    00046
    00047     typedef AllocatorType::size_type                    block_size_type;
    00048     typedef size_t                                      bucket_count_type;
    00049     typedef XalanDOMStringHashTable::bucket_size_type   bucket_size_type;
    00050
    00058     explicit
    00059     XalanDOMStringPool(
    00060             MemoryManagerType&  theManager,
    00061             block_size_type     theBlockSize = eDefaultBlockSize,
    00062             bucket_count_type   theBucketCount = eDefaultBucketCount,
    00063             bucket_size_type    theBucketSize = eDefaultBucketSize);
    00064
    00065     static XalanDOMStringPool*
    00066     create(
    00067             MemoryManagerType&  theManager,
    00068             block_size_type     theBlockSize = eDefaultBlockSize,
    00069             bucket_count_type   theBucketCount = eDefaultBucketCount,
    00070             bucket_size_type    theBucketSize = eDefaultBucketSize);
    00071
    00072
    00073     virtual
    00074     ~XalanDOMStringPool();
    00075
    00080     virtual void
    00081     clear();
    00082
    00088     virtual size_t
    00089     size() const;
    00090
    00097     virtual const XalanDOMString&
    00098     get(const XalanDOMString&   theString);
    00099
    00107     virtual const XalanDOMString&
    00108     get(
    00109             const XalanDOMChar*         theString,
    00110             XalanDOMString::size_type   theLength = XalanDOMString::npos);
    00111
    00118     const XalanDOMStringHashTable&
    00119     getHashTable() const
    00120     {
    00121         return m_hashTable;
    00122     }
    00123
    00124     MemoryManagerType&
    00125     getMemoryManager()
    00126     {
    00127         return m_hashTable.getMemoryManager();
    00128     }
    00129
    00130     const MemoryManagerType&
    00131     getMemoryManager() const
    00132     {
    00133         return m_hashTable.getMemoryManager();
    00134     }
    00135
    00136 private:
    00137
    00138     // Not implemented, for now...
    00139     XalanDOMStringPool(const XalanDOMStringPool&);
    00140
    00141     XalanDOMStringPool&
    00142     operator=(const XalanDOMStringPool&);
    00143
    00144     bool
    00145     operator==(const XalanDOMStringPool&) const;
    00146
    00147     // Data members...
    00148     AllocatorType                   m_stringAllocator;
    00149
    00150     size_t                          m_stringCount;
    00151
    00152     XalanDOMStringHashTable         m_hashTable;
    00153
    00154     static const XalanDOMString     s_emptyString;
    00155 };
    00156
    00157
    00158
    00159 XALAN_CPP_NAMESPACE_END
    00160
    00161
    00162
    00163 #endif  // !defined(XALANDOMSTRINGPOOL_HEADER_GUARD_1357924680)

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.10 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.