Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Public Types | Public Member Functions | List of all members
XalanDOMStringReusableAllocator Class Reference

Public Types

enum  { eDefaultBlockSize = 32 }
 
typedef XalanDOMString data_type
 
typedef data_type::size_type data_type_size_type
 
typedef ReusableArenaAllocator
< data_type
ArenaAllocatorType
 
typedef
ArenaAllocatorType::size_type 
size_type
 

Public Member Functions

 XalanDOMStringReusableAllocator (MemoryManagerType &theManager, size_type theBlockCount)
 Construct an instance that will allocate in blocks of the specified size. More...
 
 ~XalanDOMStringReusableAllocator ()
 
data_typecreate ()
 Create a XalanDOMString object. More...
 
data_typecreate (const char *theString, data_type_size_type theCount=data_type_size_type(data_type::npos))
 Create a XalanDOMString object. More...
 
data_typecreate (const data_type &theSource, data_type_size_type theStartPosition=0, data_type_size_type theCount=data_type_size_type(data_type::npos))
 Copy constructor. More...
 
data_typecreate (const XalanDOMChar *theString, data_type_size_type theCount=data_type_size_type(data_type::npos))
 Create a XalanDOMString object. More...
 
data_typecreate (data_type_size_type theCount, XalanDOMChar theChar)
 Create a XalanDOMString object. More...
 
bool destroy (XalanDOMString &theDOMString)
 
bool ownsObject (const data_type *theObject)
 Determine if an object is owned by the allocator... More...
 
void reset ()
 Delete all instance objects from allocator. More...
 
size_type getBlockCount () const
 Get the number of ArenaBlocks currently allocated. More...
 
size_type getBlockSize () const
 Get size of an ArenaBlock, that is, the number of objects in each block. More...
 
MemoryManagerTypegetMemoryManager ()
 Get a reference to the MemoryManagerType instance for this instance. More...
 
const MemoryManagerTypegetMemoryManager () const
 Get a reference to the MemoryManagerType instance for this instance. More...
 

Member Typedef Documentation

typedef ArenaAllocatorType::size_type XalanDOMStringReusableAllocator::size_type

Member Enumeration Documentation

anonymous enum
Enumerator
eDefaultBlockSize 

Constructor & Destructor Documentation

XalanDOMStringReusableAllocator::XalanDOMStringReusableAllocator ( MemoryManagerType theManager,
size_type  theBlockCount 
)

Construct an instance that will allocate in blocks of the specified size.

Parameters
theBlockSizeThe block size.
XalanDOMStringReusableAllocator::~XalanDOMStringReusableAllocator ( )

Member Function Documentation

data_type& XalanDOMStringReusableAllocator::create ( )

Create a XalanDOMString object.

Returns
reference to the new instance
data_type& XalanDOMStringReusableAllocator::create ( const char *  theString,
data_type_size_type  theCount = data_type_size_type(data_type::npos) 
)

Create a XalanDOMString object.

Parameters
theStringA pointer to a character string
theCountThe number of characters in the string, or npos if the string is null-terminated.
Returns
reference to the new instance
data_type& XalanDOMStringReusableAllocator::create ( const data_type theSource,
data_type_size_type  theStartPosition = 0,
data_type_size_type  theCount = data_type_size_type(data_type::npos) 
)

Copy constructor.

Parameters
theSourceThe source string for the copy
theStartPositionThe position to start in the source string.
theCountThe number of characters to copy from the source string.
Returns
reference to the new instance
data_type& XalanDOMStringReusableAllocator::create ( const XalanDOMChar *  theString,
data_type_size_type  theCount = data_type_size_type(data_type::npos) 
)

Create a XalanDOMString object.

Parameters
theStringA pointer to a wide character string
theCountThe number of characters in the string, or npos if the string is null-terminated.
Returns
reference to the new instance
data_type& XalanDOMStringReusableAllocator::create ( data_type_size_type  theCount,
XalanDOMChar  theChar 
)

Create a XalanDOMString object.

Parameters
theCountthe size of the string
theCharthe character used to initialize the string
Returns
reference to the new instance
bool XalanDOMStringReusableAllocator::destroy ( XalanDOMString theDOMString)
size_type XalanDOMStringReusableAllocator::getBlockCount ( ) const

Get the number of ArenaBlocks currently allocated.

Returns
The number of blocks.
size_type XalanDOMStringReusableAllocator::getBlockSize ( ) const

Get size of an ArenaBlock, that is, the number of objects in each block.

Returns
The size of the block
MemoryManagerType& XalanDOMStringReusableAllocator::getMemoryManager ( )

Get a reference to the MemoryManagerType instance for this instance.

Returns
A reference to the MemoryManagerType instance.
const MemoryManagerType& XalanDOMStringReusableAllocator::getMemoryManager ( ) const

Get a reference to the MemoryManagerType instance for this instance.

Returns
A reference to the MemoryManagerType instance.
bool XalanDOMStringReusableAllocator::ownsObject ( const data_type theObject)

Determine if an object is owned by the allocator...

void XalanDOMStringReusableAllocator::reset ( )

Delete all instance objects from allocator.


The documentation for this class was generated from the following file:

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