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 (MemoryManagerType &theManager, block_size_type theBlockSize=eDefaultBlockSize, bucket_count_type theBucketCount=eDefaultBucketCount, bucket_size_type theBucketSize=eDefaultBucketSize) | |
Create a string pool. More... | |
virtual | ~XalanDOMStringPool () |
virtual void | clear () |
Clear the pool. More... | |
virtual size_t | size () const |
Get the number of strings in the pool. More... | |
virtual const XalanDOMString & | get (const XalanDOMString &theString) |
Get a pooled string. More... | |
virtual const XalanDOMString & | get (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos) |
Get a pooled string. More... | |
const XalanDOMStringHashTable & | getHashTable () const |
Get a reference to the pool's hash table. More... | |
MemoryManagerType & | getMemoryManager () |
const MemoryManagerType & | getMemoryManager () const |
Static Public Member Functions | |
static XalanDOMStringPool * | create (MemoryManagerType &theManager, block_size_type theBlockSize=eDefaultBlockSize, bucket_count_type theBucketCount=eDefaultBucketCount, bucket_size_type theBucketSize=eDefaultBucketSize) |
typedef size_t XalanDOMStringPool::bucket_count_type |
|
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. |
|
virtual |
|
virtual |
Clear the pool.
Reimplemented in XercesLiaisonXalanDOMStringPool.
|
static |
|
virtual |
Get a pooled string.
If the string is not pooled, it is added.
theString | The string to pool. |
Reimplemented in XercesLiaisonXalanDOMStringPool.
|
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 XercesLiaisonXalanDOMStringPool.
const XalanDOMStringHashTable& XalanDOMStringPool::getHashTable | ( | ) | const |
Get a reference to the pool's hash table.
Useful for diagnostic purposes.
MemoryManagerType& XalanDOMStringPool::getMemoryManager | ( | ) |
const MemoryManagerType& XalanDOMStringPool::getMemoryManager | ( | ) | const |
|
virtual |
Get the number of strings in the pool.
Reimplemented in XercesLiaisonXalanDOMStringPool.
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.10 |
|