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_XFACONTAINERNODE_H_
8 #define XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_XFACONTAINERNODE_H_
9 
10 #include "xfa/fxfa/parser/cxfa_node.h"
11 #include "xfa/fxfa/parser/cxfa_nodeiteratortemplate.h"
12 
13 class CXFA_TraverseStrategy_XFAContainerNode {
14  public:
15   static CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode) {
16     return pTemplateNode->GetFirstContainerChild();
17   }
18   static CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode) {
19     return pTemplateNode->GetNextContainerSibling();
20   }
21   static CXFA_Node* GetParent(CXFA_Node* pTemplateNode) {
22     return pTemplateNode->GetContainerParent();
23   }
24 };
25 
26 typedef CXFA_NodeIteratorTemplate<CXFA_Node,
27                                   CXFA_TraverseStrategy_XFAContainerNode>
28     CXFA_ContainerIterator;
29 
30 #endif  // XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_XFACONTAINERNODE_H_
31