• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium Authors
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_CXFA_READYNODEITERATOR_H_
8 #define XFA_FXFA_CXFA_READYNODEITERATOR_H_
9 
10 #include "core/fxcrt/unowned_ptr.h"
11 #include "v8/include/cppgc/macros.h"
12 #include "xfa/fxfa/parser/cxfa_traversestrategy_xfacontainernode.h"
13 
14 class CXFA_Node;
15 
16 class CXFA_ReadyNodeIterator {
17   CPPGC_STACK_ALLOCATED();  // Allow Raw/Unowned pointers.
18 
19  public:
20   explicit CXFA_ReadyNodeIterator(CXFA_Node* pTravelRoot);
21   ~CXFA_ReadyNodeIterator();
22 
23   CXFA_Node* MoveToNext();
24   void SkipTree();
25 
26  private:
27   CXFA_ContainerIterator m_ContentIterator;
28   UnownedPtr<CXFA_Node> m_pCurNode;  // Ok, stack-only.
29 };
30 
31 #endif  // XFA_FXFA_CXFA_READYNODEITERATOR_H_
32