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_BASIC_H_ | 7 #ifndef _FX_BASIC_H_ |
8 #define _FX_BASIC_H_ | 8 #define _FX_BASIC_H_ |
9 #ifndef _FX_SYSTEM_H_ | 9 #ifndef _FX_SYSTEM_H_ |
10 #include "fx_system.h" | 10 #include "fx_system.h" |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 | 1431 |
1432 template <class T> | 1432 template <class T> |
1433 class CFX_SmartPointer | 1433 class CFX_SmartPointer |
1434 { | 1434 { |
1435 public: | 1435 public: |
1436 CFX_SmartPointer(T *pObj) : m_pObj(pObj) {} | 1436 CFX_SmartPointer(T *pObj) : m_pObj(pObj) {} |
1437 ~CFX_SmartPointer() | 1437 ~CFX_SmartPointer() |
1438 { | 1438 { |
1439 m_pObj->Release(); | 1439 m_pObj->Release(); |
1440 } | 1440 } |
1441 operator T*(void) | 1441 T* Get(void) |
1442 { | 1442 { |
1443 return m_pObj; | 1443 return m_pObj; |
1444 } | 1444 } |
1445 T& operator *(void) | 1445 T& operator *(void) |
1446 { | 1446 { |
1447 return *m_pObj; | 1447 return *m_pObj; |
1448 } | 1448 } |
1449 T* operator ->(void) | 1449 T* operator ->(void) |
1450 { | 1450 { |
1451 return m_pObj; | 1451 return m_pObj; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1649 FX_FLOAT c; | 1649 FX_FLOAT c; |
1650 FX_FLOAT d; | 1650 FX_FLOAT d; |
1651 FX_FLOAT e; | 1651 FX_FLOAT e; |
1652 FX_FLOAT f; | 1652 FX_FLOAT f; |
1653 FX_FLOAT g; | 1653 FX_FLOAT g; |
1654 FX_FLOAT h; | 1654 FX_FLOAT h; |
1655 FX_FLOAT i; | 1655 FX_FLOAT i; |
1656 }; | 1656 }; |
1657 | 1657 |
1658 #endif | 1658 #endif |
OLD | NEW |