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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 FX_BOOL m_bOnWidget; | 350 FX_BOOL m_bOnWidget; |
351 FX_BOOL m_bValid; | 351 FX_BOOL m_bValid; |
352 FX_BOOL m_bLocked; | 352 FX_BOOL m_bLocked; |
353 FX_BOOL m_bTakeOverPage; | 353 FX_BOOL m_bTakeOverPage; |
354 }; | 354 }; |
355 | 355 |
356 template <class TYPE> | 356 template <class TYPE> |
357 class CGW_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { | 357 class CGW_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { |
358 public: | 358 public: |
359 CGW_ArrayTemplate() {} | 359 CGW_ArrayTemplate() {} |
360 virtual ~CGW_ArrayTemplate() {} | 360 ~CGW_ArrayTemplate() {} |
361 | 361 |
362 typedef int (*LP_COMPARE)(TYPE p1, TYPE p2); | 362 typedef int (*LP_COMPARE)(TYPE p1, TYPE p2); |
363 | 363 |
364 void Sort(LP_COMPARE pCompare, FX_BOOL bAscent = TRUE) { | 364 void Sort(LP_COMPARE pCompare, FX_BOOL bAscent = TRUE) { |
365 int nSize = this->GetSize(); | 365 int nSize = this->GetSize(); |
366 QuickSort(0, nSize - 1, bAscent, pCompare); | 366 QuickSort(0, nSize - 1, bAscent, pCompare); |
367 } | 367 } |
368 | 368 |
369 private: | 369 private: |
370 void QuickSort(FX_UINT nStartPos, | 370 void QuickSort(FX_UINT nStartPos, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 } | 420 } |
421 | 421 |
422 if (nStartPos < m) | 422 if (nStartPos < m) |
423 QuickSort(nStartPos, m, bAscend, pCompare); | 423 QuickSort(nStartPos, m, bAscend, pCompare); |
424 if (nStopPos > m) | 424 if (nStopPos > m) |
425 QuickSort(m, nStopPos, bAscend, pCompare); | 425 QuickSort(m, nStopPos, bAscend, pCompare); |
426 } | 426 } |
427 }; | 427 }; |
428 | 428 |
429 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 429 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
OLD | NEW |