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