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 FPDFSDK_INCLUDE_FSDK_MGR_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ |
8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 FX_BOOL m_bExitWidget; | 608 FX_BOOL m_bExitWidget; |
609 FX_BOOL m_bOnWidget; | 609 FX_BOOL m_bOnWidget; |
610 FX_BOOL m_bValid; | 610 FX_BOOL m_bValid; |
611 FX_BOOL m_bLocked; | 611 FX_BOOL m_bLocked; |
612 }; | 612 }; |
613 | 613 |
614 template <class TYPE> | 614 template <class TYPE> |
615 class CGW_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { | 615 class CGW_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { |
616 public: | 616 public: |
617 CGW_ArrayTemplate() {} | 617 CGW_ArrayTemplate() {} |
618 virtual ~CGW_ArrayTemplate() {} | 618 ~CGW_ArrayTemplate() {} |
619 | 619 |
620 typedef int (*LP_COMPARE)(TYPE p1, TYPE p2); | 620 typedef int (*LP_COMPARE)(TYPE p1, TYPE p2); |
621 | 621 |
622 void Sort(LP_COMPARE pCompare, FX_BOOL bAscent = TRUE) { | 622 void Sort(LP_COMPARE pCompare, FX_BOOL bAscent = TRUE) { |
623 int nSize = this->GetSize(); | 623 int nSize = this->GetSize(); |
624 QuickSort(0, nSize - 1, bAscent, pCompare); | 624 QuickSort(0, nSize - 1, bAscent, pCompare); |
625 } | 625 } |
626 | 626 |
627 private: | 627 private: |
628 void QuickSort(FX_UINT nStartPos, | 628 void QuickSort(FX_UINT nStartPos, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 } | 678 } |
679 | 679 |
680 if (nStartPos < m) | 680 if (nStartPos < m) |
681 QuickSort(nStartPos, m, bAscend, pCompare); | 681 QuickSort(nStartPos, m, bAscend, pCompare); |
682 if (nStopPos > m) | 682 if (nStopPos > m) |
683 QuickSort(m, nStopPos, bAscend, pCompare); | 683 QuickSort(m, nStopPos, bAscend, pCompare); |
684 } | 684 } |
685 }; | 685 }; |
686 | 686 |
687 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 687 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
OLD | NEW |