• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 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 XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_XFANODE_H_
8 #define XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_XFANODE_H_
9 
10 #include "xfa/fxfa/parser/cxfa_nodeiteratortemplate.h"
11 
12 class CXFA_TraverseStrategy_XFANode {
13  public:
GetFirstChild(CXFA_Node * pTemplateNode)14   static inline CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode) {
15     return pTemplateNode->GetFirstChild();
16   }
GetNextSibling(CXFA_Node * pTemplateNode)17   static inline CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode) {
18     return pTemplateNode->GetNextSibling();
19   }
GetParent(CXFA_Node * pTemplateNode)20   static inline CXFA_Node* GetParent(CXFA_Node* pTemplateNode) {
21     return pTemplateNode->GetParent();
22   }
23 };
24 
25 typedef CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode>
26     CXFA_NodeIterator;
27 
28 #endif  // XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_XFANODE_H_
29