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

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

Issue 2612923002: Remove CFX_MapPtrToPtr from xfa/fxfa. (Closed)
Patch Set: endless loop Created 3 years, 11 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/parser/xfa_document_datamerger_imp.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_OBJECT_H_ 7 #ifndef XFA_FXFA_PARSER_XFA_OBJECT_H_
8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ 8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_
9 9
10 #include <map>
10 #include <unordered_set> 11 #include <unordered_set>
11 12
12 #include "fxjs/cfxjse_arguments.h" 13 #include "fxjs/cfxjse_arguments.h"
13 #include "xfa/fde/xml/fde_xml.h" 14 #include "xfa/fde/xml/fde_xml.h"
14 #include "xfa/fxfa/parser/xfa_utils.h" 15 #include "xfa/fxfa/parser/xfa_utils.h"
15 16
16 class CXFA_Document; 17 class CXFA_Document;
17 class CXFA_Node; 18 class CXFA_Node;
18 class CXFA_NodeList; 19 class CXFA_NodeList;
19 20
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 struct XFA_MAPDATABLOCK { 138 struct XFA_MAPDATABLOCK {
138 uint8_t* GetData() const { return (uint8_t*)this + sizeof(XFA_MAPDATABLOCK); } 139 uint8_t* GetData() const { return (uint8_t*)this + sizeof(XFA_MAPDATABLOCK); }
139 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo; 140 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo;
140 int32_t iBytes; 141 int32_t iBytes;
141 }; 142 };
142 143
143 struct XFA_MAPMODULEDATA { 144 struct XFA_MAPMODULEDATA {
144 XFA_MAPMODULEDATA(); 145 XFA_MAPMODULEDATA();
145 ~XFA_MAPMODULEDATA(); 146 ~XFA_MAPMODULEDATA();
146 147
147 CFX_MapPtrToPtr m_ValueMap; 148 std::map<void*, void*> m_ValueMap;
148 CFX_MapPtrTemplate<void*, XFA_MAPDATABLOCK*> m_BufferMap; 149 std::map<void*, XFA_MAPDATABLOCK*> m_BufferMap;
149 }; 150 };
150 151
151 #define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R') 152 #define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R')
152 #define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C') 153 #define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C')
153 #define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M') 154 #define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M')
154 155
155 class CXFA_Node : public CXFA_Object { 156 class CXFA_Node : public CXFA_Object {
156 public: 157 public:
157 uint32_t GetPacketID() const { return m_ePacket; } 158 uint32_t GetPacketID() const { return m_ePacket; }
158 159
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 void* pKey, 659 void* pKey,
659 void* pValue, 660 void* pValue,
660 int32_t iBytes, 661 int32_t iBytes,
661 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr); 662 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr);
662 bool GetMapModuleBuffer(void* pKey, 663 bool GetMapModuleBuffer(void* pKey,
663 void*& pValue, 664 void*& pValue,
664 int32_t& iBytes, 665 int32_t& iBytes,
665 bool bProtoAlso = true) const; 666 bool bProtoAlso = true) const;
666 bool HasMapModuleKey(void* pKey, bool bProtoAlso = false); 667 bool HasMapModuleKey(void* pKey, bool bProtoAlso = false);
667 void RemoveMapModuleKey(void* pKey = nullptr); 668 void RemoveMapModuleKey(void* pKey = nullptr);
668 void MergeAllData(void* pDstModule, bool bUseSrcAttr = true); 669 void MergeAllData(void* pDstModule);
669 void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey); 670 void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey);
670 void MoveBufferMapData(CXFA_Node* pSrcModule, 671 void MoveBufferMapData(CXFA_Node* pSrcModule,
671 CXFA_Node* pDstModule, 672 CXFA_Node* pDstModule,
672 void* pKey, 673 void* pKey,
673 bool bRecursive = false); 674 bool bRecursive = false);
674 675
675 CXFA_Node* m_pNext; 676 CXFA_Node* m_pNext;
676 CXFA_Node* m_pChild; 677 CXFA_Node* m_pChild;
677 CXFA_Node* m_pLastChild; 678 CXFA_Node* m_pLastChild;
678 CXFA_Node* m_pParent; 679 CXFA_Node* m_pParent;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 812
812 inline CXFA_Node* ToNode(CXFA_Object* pObj) { 813 inline CXFA_Node* ToNode(CXFA_Object* pObj) {
813 return pObj ? pObj->AsNode() : nullptr; 814 return pObj ? pObj->AsNode() : nullptr;
814 } 815 }
815 816
816 inline const CXFA_Node* ToNode(const CXFA_Object* pObj) { 817 inline const CXFA_Node* ToNode(const CXFA_Object* pObj) {
817 return pObj ? pObj->AsNode() : nullptr; 818 return pObj ? pObj->AsNode() : nullptr;
818 } 819 }
819 820
820 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ 821 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document_datamerger_imp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698