Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | List of all members
xalanc::XalanDOMStringReusableAllocator Class Reference

#include <xalanc/PlatformSupport/XalanDOMStringReusableAllocator.hpp>

Public Types

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

Public Member Functions

 XalanDOMStringReusableAllocator (MemoryManager &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...
 
MemoryManager & getMemoryManager ()
 Get a reference to the MemoryManager instance for this instance. More...
 
const MemoryManager & getMemoryManager () const
 Get a reference to the MemoryManager instance for this instance. More...
 

Detailed Description

Definition at line 41 of file XalanDOMStringReusableAllocator.hpp.

Member Typedef Documentation

◆ ArenaAllocatorType

Definition at line 54 of file XalanDOMStringReusableAllocator.hpp.

◆ data_type

Definition at line 45 of file XalanDOMStringReusableAllocator.hpp.

◆ data_type_size_type

Definition at line 46 of file XalanDOMStringReusableAllocator.hpp.

◆ size_type

Definition at line 57 of file XalanDOMStringReusableAllocator.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eDefaultBlockSize 

Definition at line 59 of file XalanDOMStringReusableAllocator.hpp.

Constructor & Destructor Documentation

◆ XalanDOMStringReusableAllocator()

xalanc::XalanDOMStringReusableAllocator::XalanDOMStringReusableAllocator ( MemoryManager &  theManager,
size_type  theBlockCount 
)

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

Parameters
theBlockSizeThe block size.

◆ ~XalanDOMStringReusableAllocator()

xalanc::XalanDOMStringReusableAllocator::~XalanDOMStringReusableAllocator ( )

Member Function Documentation

◆ create() [1/5]

data_type& xalanc::XalanDOMStringReusableAllocator::create ( )

Create a XalanDOMString object.

Returns
reference to the new instance

◆ create() [2/5]

data_type& xalanc::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

◆ create() [3/5]

data_type& xalanc::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

◆ create() [4/5]

data_type& xalanc::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

◆ create() [5/5]

data_type& xalanc::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

◆ destroy()

bool xalanc::XalanDOMStringReusableAllocator::destroy ( XalanDOMString theDOMString)
inline

Definition at line 143 of file XalanDOMStringReusableAllocator.hpp.

◆ getBlockCount()

size_type xalanc::XalanDOMStringReusableAllocator::getBlockCount ( ) const
inline

Get the number of ArenaBlocks currently allocated.

Returns
The number of blocks.

Definition at line 172 of file XalanDOMStringReusableAllocator.hpp.

◆ getBlockSize()

size_type xalanc::XalanDOMStringReusableAllocator::getBlockSize ( ) const
inline

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

Returns
The size of the block

Definition at line 184 of file XalanDOMStringReusableAllocator.hpp.

◆ getMemoryManager() [1/2]

MemoryManager& xalanc::XalanDOMStringReusableAllocator::getMemoryManager ( )
inline

Get a reference to the MemoryManager instance for this instance.

Returns
A reference to the MemoryManager instance.

Definition at line 196 of file XalanDOMStringReusableAllocator.hpp.

◆ getMemoryManager() [2/2]

const MemoryManager& xalanc::XalanDOMStringReusableAllocator::getMemoryManager ( ) const
inline

Get a reference to the MemoryManager instance for this instance.

Returns
A reference to the MemoryManager instance.

Definition at line 208 of file XalanDOMStringReusableAllocator.hpp.

◆ ownsObject()

bool xalanc::XalanDOMStringReusableAllocator::ownsObject ( const data_type theObject)
inline

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

Definition at line 152 of file XalanDOMStringReusableAllocator.hpp.

◆ reset()

void xalanc::XalanDOMStringReusableAllocator::reset ( )
inline

Delete all instance objects from allocator.


Definition at line 161 of file XalanDOMStringReusableAllocator.hpp.


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