summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2/JBig2_Object.h
blob: bab1a16231b66855235a48e9e7040a1118bce5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef _JBIG2_OBJECT_H_
#define _JBIG2_OBJECT_H_
#include "JBig2_Define.h"
class CJBig2_Module;
#define _JBIG2_NO_EXPECTION_
class CJBig2_Object {
 public:
  void* operator new(size_t size,
                     CJBig2_Module* pModule,
                     const FX_CHAR* filename,
                     int line);

  void operator delete(void* p,
                       CJBig2_Module* pModule,
                       const FX_CHAR* filename,
                       int line);

  void* operator new(size_t size, CJBig2_Module* pModule);

  void operator delete(void* p);

  void operator delete(void* p, CJBig2_Module* pModule);

  void* operator new[](size_t size,
                       CJBig2_Module* pModule,
                       size_t unit_size,
                       const FX_CHAR* filename,
                       int line);

  void operator delete[](void* p,
                         CJBig2_Module* pModule,
                         size_t unit_size,
                         const FX_CHAR* filename,
                         int line);

  void* operator new[](size_t size, CJBig2_Module* pModule, size_t unit_size);

  void operator delete[](void* p);

  void operator delete[](void* p, CJBig2_Module* pModule, size_t unit_size);

 public:
  CJBig2_Module* m_pModule;
};
#define JBIG2_NEW new (m_pModule)
#define JBIG2_ALLOC(p, a) \
  p = JBIG2_NEW a;        \
  p->m_pModule = m_pModule;
#endif