Revision 111, 0.8 kB
(checked in by mido, 17 years ago)
|
pridana knihovna XSD (a jeji chlebodarkyne XERCES), v ramci Win32 zprovoznen priklad tests/test_xsd_hello.cxx
|
Line | |
---|
1 | // file : xsd/cxx/xml/std-memory-manager.hxx |
---|
2 | // author : Boris Kolpackov <boris@codesynthesis.com> |
---|
3 | // copyright : Copyright (c) 2005-2008 Code Synthesis Tools CC |
---|
4 | // license : GNU GPL v2 + exceptions; see accompanying LICENSE file |
---|
5 | |
---|
6 | #ifndef XSD_CXX_XML_STD_MEMORY_MANAGER_HXX |
---|
7 | #define XSD_CXX_XML_STD_MEMORY_MANAGER_HXX |
---|
8 | |
---|
9 | #include <new> // operator new, delete |
---|
10 | #include <xercesc/framework/MemoryManager.hpp> |
---|
11 | |
---|
12 | namespace xsd |
---|
13 | { |
---|
14 | namespace cxx |
---|
15 | { |
---|
16 | namespace xml |
---|
17 | { |
---|
18 | class std_memory_manager: public xercesc::MemoryManager |
---|
19 | { |
---|
20 | public: |
---|
21 | virtual void* |
---|
22 | allocate(size_t size) |
---|
23 | { |
---|
24 | return operator new (size); |
---|
25 | } |
---|
26 | |
---|
27 | virtual void |
---|
28 | deallocate(void* p) |
---|
29 | { |
---|
30 | operator delete (p); |
---|
31 | } |
---|
32 | }; |
---|
33 | } |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | #endif // XSD_CXX_XML_STD_MEMORY_MANAGER_HXX |
---|