20 #ifndef __XPATH2MEMORYMANAGER_HPP
21 #define __XPATH2MEMORYMANAGER_HPP
27 #include <xqilla/framework/XQillaExport.hpp>
31 XERCES_CPP_NAMESPACE_BEGIN
34 XERCES_CPP_NAMESPACE_END
37 class VariableTypeStore;
40 class CollationHelper;
42 class ATDecimalOrDerived;
51 virtual void reset() = 0;
54 virtual const XMLCh* getPooledString(
const XMLCh *src) = 0;
55 virtual const XMLCh* getPooledString(
const XMLCh *src,
unsigned int length) = 0;
56 virtual const XMLCh* getPooledString(
const char *src) = 0;
59 #if _XERCES_VERSION >= 30000
60 virtual void* allocate(XMLSize_t numElements) = 0;
62 virtual void* allocate(
size_t numElements) = 0;
64 virtual void deallocate(
void* p) = 0;
67 virtual Collation* createCollation(CollationHelper* helper) = 0;
70 virtual XQillaNSResolver* createNSResolver(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *resolverNode) = 0;
73 virtual VariableTypeStore* createVariableTypeStore() = 0;
76 virtual ATDecimalOrDerived* createInteger(
int value) = 0;
78 virtual void dumpStatistics()
const = 0;
79 virtual size_t getAllocatedObjectCount()
const = 0;
80 virtual size_t getTotalAllocatedMemory()
const = 0;
81 virtual const StringPool *getStringPool()
const = 0;
96 template <
class _Tp1>
struct rebind {
133 return _n != 0 ?
static_cast<pointer>(malloc(_n*
sizeof(_Tp))) : 0;
151 new ((
void *)_p) _Tp(_v);
185 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager*
_memMgr;
194 inline void *
operator new(
size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr)
200 inline void operator delete(
void* ptr, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr)
202 memMgr->deallocate(ptr);
225 operator TYPE*()
const
278 operator TYPE*()
const
330 operator TYPE*()
const
367 AutoDeallocate(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *mmgr,
size_t size =
sizeof(TYPE))
368 : p_(0), mmgr_(mmgr) {
372 : p_(p), mmgr_(mmgr) {}
387 operator TYPE*()
const
419 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *mmgr_;
422 #endif //__XPATH2MEMORYMANAGER_HPP
TYPE & operator*() const
Definition: XPath2MemoryManager.hpp:270
XQillaAllocator(xercesc::MemoryManager *memMgr)
Definition: XPath2MemoryManager.hpp:106
bool operator==(const XQillaAllocator< _Tp > &o) const
Definition: XPath2MemoryManager.hpp:169
Definition: XPath2MemoryManager.hpp:364
TYPE * swap(TYPE *p)
Definition: XPath2MemoryManager.hpp:401
TYPE * adopt()
Definition: XPath2MemoryManager.hpp:338
_Tp value_type
Definition: XPath2MemoryManager.hpp:94
char _singleton[sizeof(_Tp)]
Definition: XPath2MemoryManager.hpp:184
Definition: XPath2MemoryManager.hpp:45
~AutoDeleteArray()
Definition: XPath2MemoryManager.hpp:317
TYPE * operator->() const
Definition: XPath2MemoryManager.hpp:274
virtual void deallocate(void *p)=0
This method deallocates memory.
TYPE * adopt()
Definition: XPath2MemoryManager.hpp:286
void deallocate(void *_p, size_t _n)
Definition: XPath2MemoryManager.hpp:136
Definition: XPath2MemoryManager.hpp:85
size_type max_size(size_type) const
Definition: XPath2MemoryManager.hpp:164
Definition: XPath2MemoryManager.hpp:312
~AutoDelete()
Definition: XPath2MemoryManager.hpp:265
void construct(pointer _p, const_reference _v)
Definition: XPath2MemoryManager.hpp:149
xercesc::MemoryManager * _memMgr
Definition: XPath2MemoryManager.hpp:185
TYPE * swap(TYPE *p)
Definition: XPath2MemoryManager.hpp:239
TYPE * swap(TYPE *p)
Definition: XPath2MemoryManager.hpp:344
_Tp & reference
Definition: XPath2MemoryManager.hpp:92
AutoRelease(TYPE *p)
Definition: XPath2MemoryManager.hpp:209
virtual ~XPath2MemoryManager()
Definition: XPath2MemoryManager.hpp:48
virtual void * allocate(XMLSize_t size)=0
This method allocates requested memory.
AutoDeleteArray(TYPE *p)
Definition: XPath2MemoryManager.hpp:315
TYPE & operator*() const
Definition: XPath2MemoryManager.hpp:322
The XQillaNSResolver interface extends the DOMXPathNSResolver providing the ability to add additional...
Definition: XQillaNSResolver.hpp:38
AutoDeallocate(TYPE *p, xercesc::MemoryManager *mmgr)
Definition: XPath2MemoryManager.hpp:371
TYPE * operator->() const
Definition: XPath2MemoryManager.hpp:326
void destroy(pointer _p)
Definition: XPath2MemoryManager.hpp:154
size_t size_type
Definition: XPath2MemoryManager.hpp:88
const _Tp & const_reference
Definition: XPath2MemoryManager.hpp:93
_Tp * pointer
Definition: XPath2MemoryManager.hpp:90
void set(TYPE *p)
Definition: XPath2MemoryManager.hpp:245
ptrdiff_t difference_type
Definition: XPath2MemoryManager.hpp:89
Definition: XPath2MemoryManager.hpp:206
void set(TYPE *p)
Definition: XPath2MemoryManager.hpp:407
TYPE * adopt()
Definition: XPath2MemoryManager.hpp:233
TYPE * swap(TYPE *p)
Definition: XPath2MemoryManager.hpp:292
TYPE * adopt()
Definition: XPath2MemoryManager.hpp:395
bool operator!=(XQillaAllocator< _Tp > &o)
Definition: XPath2MemoryManager.hpp:179
TYPE & operator*() const
Definition: XPath2MemoryManager.hpp:217
size_type max_size() const
Definition: XPath2MemoryManager.hpp:159
void set(TYPE *p)
Definition: XPath2MemoryManager.hpp:298
void set(TYPE *p)
Definition: XPath2MemoryManager.hpp:350
bool operator!=(const XQillaAllocator< _Tp > &o) const
Definition: XPath2MemoryManager.hpp:174
pointer allocate(size_t _n, const void *=0)
Definition: XPath2MemoryManager.hpp:123
TYPE * operator->() const
Definition: XPath2MemoryManager.hpp:383
Definition: XPath2MemoryManager.hpp:96
TYPE & operator*() const
Definition: XPath2MemoryManager.hpp:379
~AutoDeallocate()
Definition: XPath2MemoryManager.hpp:373
~AutoRelease()
Definition: XPath2MemoryManager.hpp:211
XQillaAllocator(const XQillaAllocator< _Tp > &o)
Definition: XPath2MemoryManager.hpp:112
XQillaAllocator()
Definition: XPath2MemoryManager.hpp:101
const _Tp * const_pointer
Definition: XPath2MemoryManager.hpp:91
AutoDelete(TYPE *p)
Definition: XPath2MemoryManager.hpp:263
XQillaAllocator< _Tp1 > other
Definition: XPath2MemoryManager.hpp:97
Definition: XPath2MemoryManager.hpp:260
TYPE * operator->() const
Definition: XPath2MemoryManager.hpp:221