OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _JBIG2_OBJECT_H_ | 7 #ifndef _JBIG2_OBJECT_H_ |
8 #define _JBIG2_OBJECT_H_ | 8 #define _JBIG2_OBJECT_H_ |
9 #include "JBig2_Define.h" | 9 #include "JBig2_Define.h" |
10 class CJBig2_Module; | 10 class CJBig2_Module; |
11 #define _JBIG2_NO_EXPECTION_ | 11 #define _JBIG2_NO_EXPECTION_ |
12 class CJBig2_Object | 12 class CJBig2_Object |
13 { | 13 { |
14 public: | 14 public: |
15 | 15 |
16 void *operator new(size_t size, CJBig2_Module *pModule, FX_LPCSTR filename,
int line); | 16 void *operator new(size_t size, CJBig2_Module *pModule, const FX_CHAR* filen
ame, int line); |
17 | 17 |
18 void operator delete(void *p, CJBig2_Module *pModule, FX_LPCSTR filename, in
t line); | 18 void operator delete(void *p, CJBig2_Module *pModule, const FX_CHAR* filenam
e, int line); |
19 | 19 |
20 void *operator new(size_t size, CJBig2_Module *pModule); | 20 void *operator new(size_t size, CJBig2_Module *pModule); |
21 | 21 |
22 void operator delete(void *p); | 22 void operator delete(void *p); |
23 | 23 |
24 void operator delete(void *p, CJBig2_Module *pModule); | 24 void operator delete(void *p, CJBig2_Module *pModule); |
25 | 25 |
26 void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size, | 26 void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size, |
27 FX_LPCSTR filename, int line); | 27 const FX_CHAR* filename, int line); |
28 | 28 |
29 void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size, | 29 void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size, |
30 FX_LPCSTR filename, int line); | 30 const FX_CHAR* filename, int line); |
31 | 31 |
32 void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size); | 32 void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size); |
33 | 33 |
34 void operator delete[](void* p); | 34 void operator delete[](void* p); |
35 | 35 |
36 void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size); | 36 void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size); |
37 public: | 37 public: |
38 | 38 |
39 CJBig2_Module *m_pModule; | 39 CJBig2_Module *m_pModule; |
40 }; | 40 }; |
41 #define JBIG2_NEW new(m_pModule) | 41 #define JBIG2_NEW new(m_pModule) |
42 #define JBIG2_ALLOC(p, a) p = JBIG2_NEW a; p->m_pModule = m_pModule; | 42 #define JBIG2_ALLOC(p, a) p = JBIG2_NEW a; p->m_pModule = m_pModule; |
43 #endif | 43 #endif |
OLD | NEW |