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
ConstructValueWithNoMemoryManager< C > ConstructableType
Definition: XalanMemoryManagement.hpp:432
static C * construct(C *address, const C &theRhs, MemoryManager &)
Definition: XalanMemoryManagement.hpp:439
ConstructWithNoMemoryManager< C > Constructor
Definition: XalanMemoryManagement.hpp:464
static C * construct(C *address, const C &theRhs, MemoryManager &mgr)
Definition: XalanMemoryManagement.hpp:455
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
ConstructWithMemoryManager< C > Constructor
Definition: XalanMemoryManagement.hpp:478
C value
Definition: XalanMemoryManagement.hpp:415
Definition: XalanMemoryManagement.hpp:446
ConstructValueWithNoMemoryManager(MemoryManager &)
Definition: XalanMemoryManagement.hpp:410
C value
Definition: XalanMemoryManagement.hpp:426
ConstructValueWithMemoryManager< C > ConstructableType
Definition: XalanMemoryManagement.hpp:448
XalanAllocationGuard(MemoryManager &theMemoryManager, size_type theSize)
Definition: XalanMemoryManagement.hpp:62
Definition: XalanMemoryManagement.hpp:430
Type * XalanCopyConstruct(MemoryManager &theMemoryManager, const Type &theSource)
Definition: XalanMemoryManagement.hpp:334
size_t size_type
Definition: XalanMemoryManagement.hpp:51
Definition: XalanMemoryManagement.hpp:482
Definition: XalanMemoryManagement.hpp:375
static C * construct(C *address, MemoryManager &)
Definition: XalanMemoryManagement.hpp:434
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
static C * construct(C *address, MemoryManager &mgr)
Definition: XalanMemoryManagement.hpp:450
static MemoryManager & getDefault()
Definition: XalanMemoryManagement.hpp:386
void * get() const
Definition: XalanMemoryManagement.hpp:79
void release()
Definition: XalanMemoryManagement.hpp:85
Definition: XalanMemoryManagement.hpp:476
void XalanDestroy(Type &theArg)
Definition: XalanMemoryManagement.hpp:102
ConstructWithNoMemoryManager< C > Constructor
Definition: XalanMemoryManagement.hpp:484
XalanAllocationGuard(MemoryManager &theMemoryManager, void *thePointer)
Definition: XalanMemoryManagement.hpp:54
Definition: XalanMemoryManagement.hpp:408
#define XALAN_PLATFORM_EXPORT
Definition: AIXDefinitions.hpp:29
Definition: XalanMemoryManagement.hpp:419
Definition: XalanMemoryManagement.hpp:462
Definition: XalanMemoryManagement.hpp:44
ConstructValueWithMemoryManager(MemoryManager &mgr)
Definition: XalanMemoryManagement.hpp:421
Type * XalanConstruct(MemoryManager &theMemoryManager, Type *&theInstance)
Definition: XalanMemoryManagement.hpp:152
~XalanAllocationGuard()
Definition: XalanMemoryManagement.hpp:70