| OLD | NEW |
| 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 _FX_UTILS | 7 #ifndef _FX_UTILS |
| 8 #define _FX_UTILS | 8 #define _FX_UTILS |
| 9 class CFX_ThreadLock; | 9 class CFX_ThreadLock; |
| 10 class CFX_BaseArray; | 10 class CFX_BaseArray; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 } | 745 } |
| 746 protected: | 746 protected: |
| 747 CPLTreeNode *m_pParentNode; | 747 CPLTreeNode *m_pParentNode; |
| 748 CPLTreeNode *m_pChildNode; | 748 CPLTreeNode *m_pChildNode; |
| 749 CPLTreeNode *m_pPrevNode; | 749 CPLTreeNode *m_pPrevNode; |
| 750 CPLTreeNode *m_pNextNode; | 750 CPLTreeNode *m_pNextNode; |
| 751 baseType m_Data; | 751 baseType m_Data; |
| 752 friend class CFX_CPLTree<baseType>; | 752 friend class CFX_CPLTree<baseType>; |
| 753 }; | 753 }; |
| 754 template<class baseType> | 754 template<class baseType> |
| 755 class CFX_CPLTree : public CFX_Object | 755 class CFX_CPLTree |
| 756 { | 756 { |
| 757 public: | 757 public: |
| 758 typedef CFX_CPLTreeNode<baseType> CPLTreeNode; | 758 typedef CFX_CPLTreeNode<baseType> CPLTreeNode; |
| 759 CFX_CPLTree() : m_Root() | 759 CFX_CPLTree() : m_Root() |
| 760 { | 760 { |
| 761 } | 761 } |
| 762 ~CFX_CPLTree() | 762 ~CFX_CPLTree() |
| 763 { | 763 { |
| 764 CPLTreeNode *pNode = m_Root.GetNode(CPLTreeNode::LastNeighbor); | 764 CPLTreeNode *pNode = m_Root.GetNode(CPLTreeNode::LastNeighbor); |
| 765 while (pNode != NULL) { | 765 while (pNode != NULL) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 789 CPLTreeNode *pLast = pParent->GetNode(CPLTreeNode::LastChild); | 789 CPLTreeNode *pLast = pParent->GetNode(CPLTreeNode::LastChild); |
| 790 pChild->SetPrevNode(pLast); | 790 pChild->SetPrevNode(pLast); |
| 791 pLast->SetNextNode(pChild); | 791 pLast->SetNextNode(pChild); |
| 792 } | 792 } |
| 793 return pChild; | 793 return pChild; |
| 794 } | 794 } |
| 795 protected: | 795 protected: |
| 796 CPLTreeNode m_Root; | 796 CPLTreeNode m_Root; |
| 797 }; | 797 }; |
| 798 #endif | 798 #endif |
| OLD | NEW |