16 #if !defined(XALANMEMORYMANAGEMENT_HEADER_GUARD_1357924680)
17 #define XALANMEMORYMANAGEMENT_HEADER_GUARD_1357924680
30 #include <xercesc/framework/MemoryManager.hpp>
35 XALAN_CPP_NAMESPACE_BEGIN
40 XALAN_USING_XERCES(MemoryManager)
48 #if defined(XALAN_STRICT_ANSI_HEADERS)
55 MemoryManager& theMemoryManager,
57 m_memoryManager(theMemoryManager),
63 MemoryManager& theMemoryManager,
65 m_memoryManager(theMemoryManager),
66 m_pointer(theMemoryManager.allocate(theSize))
74 m_memoryManager.deallocate(m_pointer);
93 MemoryManager& m_memoryManager;
124 MemoryManager& theMemoryManager,
131 theMemoryManager.deallocate(theArg);
140 MemoryManager& theMemoryManager,
145 theMemoryManager.deallocate(&theArg);
153 MemoryManager& theMemoryManager,
161 new (theGuard.
get()) Type;
175 MemoryManager& theMemoryManager,
177 const Param1Type& theParam1)
184 new (theGuard.
get()) Type(theParam1);
198 MemoryManager& theMemoryManager,
200 Param1Type& theParam1)
207 new (theGuard.
get()) Type(theParam1);
222 MemoryManager& theMemoryManager,
224 Param1Type& theParam1,
225 const Param2Type& theParam2)
232 new (theGuard.
get()) Type(theParam1, theParam2);
248 MemoryManager& theMemoryManager,
250 Param1Type& theParam1,
251 const Param2Type& theParam2,
252 Param3Type& theParam3)
259 new (theGuard.
get()) Type(theParam1, theParam2, theParam3);
277 MemoryManager& theMemoryManager,
279 Param1Type& theParam1,
280 Param2Type& theParam2,
281 const Param3Type& theParam3,
282 const Param4Type& theParam4,
283 const Param5Type& theParam5)
290 new (theGuard.
get()) Type(theParam1, theParam2, theParam3, theParam4, theParam5);
309 MemoryManager& theMemoryManager,
311 Param1Type& theParam1,
312 Param2Type& theParam2,
313 const Param3Type& theParam3,
314 const Param4Type& theParam4,
315 const Param5Type& theParam5,
316 const Param6Type& theParam6)
323 new (theGuard.
get()) Type(theParam1, theParam2, theParam3, theParam4, theParam5, theParam6);
335 MemoryManager& theMemoryManager,
336 const Type& theSource)
342 Type*
const theInstance =
343 new (theGuard.
get()) Type(theSource);
357 MemoryManager& theMemoryManager,
358 const Type& theSource,
359 Param1Type& theParam1)
365 Type*
const theInstance =
366 new (theGuard.
get()) Type(theSource, theParam1);
379 static MemoryManager&
382 static MemoryManager&
383 getDefaultXercesMemMgr();
385 static MemoryManager&
388 return getDefaultXercesMemMgr();
395 #if defined (XALAN_DEVELOPMENT)
396 #define XALAN_DEFAULT_CONSTRUCTOR_MEMORY_MGR
397 #define XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR
398 #define XALAN_DEFAULT_MEMMGR = XalanMemMgrs::getDummyMemMgr()
400 #define XALAN_DEFAULT_CONSTRUCTOR_MEMORY_MGR = XalanMemMgrs::getDefaultXercesMemMgr()
401 #define XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR XALAN_DEFAULT_CONSTRUCTOR_MEMORY_MGR
402 #define XALAN_DEFAULT_MEMMGR = XalanMemMgrs::getDefaultXercesMemMgr()
436 return (C*)
new (address) C;
439 static C*
construct(C* address,
const C& theRhs, MemoryManager& )
441 return (C*)
new (address) C(theRhs);
452 return (C*)
new (address) C(mgr);
455 static C*
construct(C* address,
const C& theRhs, MemoryManager& mgr)
457 return (C*)
new (address) C(theRhs, mgr);
468 #define XALAN_USES_MEMORY_MANAGER(Type) \
470 struct MemoryManagedConstructionTraits<Type> \
472 typedef ConstructWithMemoryManager<Type> Constructor; \
490 XALAN_CPP_NAMESPACE_END
494 #endif // XALANMEMORYMANAGEMENT_HEADER_GUARD_1357924680