Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: xfa/fxfa/parser/xfa_document_serialize.h

Issue 1988453002: Remove Release() { delete this; } in data importer/exporter (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffdoc.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_ 7 #ifndef XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_
8 #define XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_ 8 #define XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_
9 9
10 #include "core/fxcrt/include/fx_string.h" 10 #include "core/fxcrt/include/fx_string.h"
11 11
12 class CXFA_Document; 12 class CXFA_Document;
13 class CXFA_Node; 13 class CXFA_Node;
14 class IFX_FileRead; 14 class IFX_FileRead;
15 class IFX_FileWrite; 15 class IFX_FileWrite;
16 class IFX_Stream; 16 class IFX_Stream;
17 17
18 class CXFA_DataImporter { 18 class CXFA_DataImporter {
19 public: 19 public:
20 explicit CXFA_DataImporter(CXFA_Document* pDocument); 20 explicit CXFA_DataImporter(CXFA_Document* pDocument);
21 21
22 void Release() { delete this; }
23 FX_BOOL ImportData(IFX_FileRead* pDataDocument); 22 FX_BOOL ImportData(IFX_FileRead* pDataDocument);
24 23
25 protected: 24 protected:
26 CXFA_Document* const m_pDocument; 25 CXFA_Document* const m_pDocument;
27 }; 26 };
28 27
29 class CXFA_DataExporter { 28 class CXFA_DataExporter {
30 public: 29 public:
31 explicit CXFA_DataExporter(CXFA_Document* pDocument); 30 explicit CXFA_DataExporter(CXFA_Document* pDocument);
32 31
33 void Release() { delete this; }
34 FX_BOOL Export(IFX_FileWrite* pWrite); 32 FX_BOOL Export(IFX_FileWrite* pWrite);
35 FX_BOOL Export(IFX_FileWrite* pWrite, 33 FX_BOOL Export(IFX_FileWrite* pWrite,
36 CXFA_Node* pNode, 34 CXFA_Node* pNode,
37 uint32_t dwFlag = 0, 35 uint32_t dwFlag = 0,
38 const FX_CHAR* pChecksum = NULL); 36 const FX_CHAR* pChecksum = NULL);
39 37
40 protected: 38 protected:
41 FX_BOOL Export(IFX_Stream* pStream, 39 FX_BOOL Export(IFX_Stream* pStream,
42 CXFA_Node* pNode, 40 CXFA_Node* pNode,
43 uint32_t dwFlag, 41 uint32_t dwFlag,
44 const FX_CHAR* pChecksum); 42 const FX_CHAR* pChecksum);
43
45 CXFA_Document* const m_pDocument; 44 CXFA_Document* const m_pDocument;
46 }; 45 };
47 46
48 #endif // XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_ 47 #endif // XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdoc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698