Xalan-C++ API Reference 1.12.0
|
#include <xalanc/PlatformSupport/XalanDOMStringPool.hpp>
Public Types | |
enum | { eDefaultBlockSize = 32 , eDefaultBucketCount = XalanDOMStringHashTable::eDefaultBucketCount , eDefaultBucketSize = XalanDOMStringHashTable::eDefaultBucketSize } |
typedef XalanDOMStringAllocator | AllocatorType |
typedef AllocatorType::size_type | block_size_type |
typedef size_t | bucket_count_type |
typedef XalanDOMStringHashTable::bucket_size_type | bucket_size_type |
Public Member Functions | |
XalanDOMStringPool (MemoryManager &theManager, block_size_type theBlockSize=eDefaultBlockSize, bucket_count_type theBucketCount=eDefaultBucketCount, bucket_size_type theBucketSize=eDefaultBucketSize) | |
Create a string pool. | |
virtual | ~XalanDOMStringPool () |
virtual void | clear () |
Clear the pool. | |
virtual size_t | size () const |
Get the number of strings in the pool. | |
virtual const XalanDOMString & | get (const XalanDOMString &theString) |
Get a pooled string. | |
virtual const XalanDOMString & | get (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos) |
Get a pooled string. | |
const XalanDOMStringHashTable & | getHashTable () const |
Get a reference to the pool's hash table. | |
MemoryManager & | getMemoryManager () |
const MemoryManager & | getMemoryManager () const |
Static Public Member Functions | |
static XalanDOMStringPool * | create (MemoryManager &theManager, block_size_type theBlockSize=eDefaultBlockSize, bucket_count_type theBucketCount=eDefaultBucketCount, bucket_size_type theBucketSize=eDefaultBucketSize) |
Definition at line 39 of file XalanDOMStringPool.hpp.
Definition at line 47 of file XalanDOMStringPool.hpp.
Definition at line 49 of file XalanDOMStringPool.hpp.
typedef size_t xalanc::XalanDOMStringPool::bucket_count_type |
Definition at line 50 of file XalanDOMStringPool.hpp.
Definition at line 51 of file XalanDOMStringPool.hpp.
anonymous enum |
Enumerator | |
---|---|
eDefaultBlockSize | |
eDefaultBucketCount | |
eDefaultBucketSize |
Definition at line 43 of file XalanDOMStringPool.hpp.
|
explicit |
Create a string pool.
theBlockSize | The block size for the allocator. |
theBucketCount | The number of buckets to use for the hash table. This should be a prime number for best results. |
theBucketSize | The initial size of each bucket in the hash table. |
References eDefaultBlockSize, eDefaultBucketCount, eDefaultBucketSize, and XalanDOMStringPool().
Referenced by XalanDOMStringPool().
|
virtual |
|
virtual |
Clear the pool.
Reimplemented in xalanc::XercesLiaisonXalanDOMStringPool.
|
static |
References eDefaultBlockSize, eDefaultBucketCount, and eDefaultBucketSize.
|
virtual |
Get a pooled string.
If the string is not pooled, it is added.
theString | The string to pool. |
theLength | The length of the string. If XalanDOMString::npos, the string is assumed to be null-terminated. |
Reimplemented in xalanc::XercesLiaisonXalanDOMStringPool.
References xalanc::XalanDOMString::npos.
|
virtual |
Get a pooled string.
If the string is not pooled, it is added.
theString | The string to pool. |
Reimplemented in xalanc::XercesLiaisonXalanDOMStringPool.
|
inline |
Get a reference to the pool's hash table.
Useful for diagnostic purposes.
Definition at line 121 of file XalanDOMStringPool.hpp.
|
inline |
Definition at line 127 of file XalanDOMStringPool.hpp.
|
inline |
Definition at line 133 of file XalanDOMStringPool.hpp.
|
virtual |
Get the number of strings in the pool.
Reimplemented in xalanc::XercesLiaisonXalanDOMStringPool.
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sat May 17 2025 10:52:27 for Xalan-C++ API Reference by