summaryrefslogtreecommitdiff
path: root/xfa/include/fwl/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-17 15:15:41 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-17 15:15:41 -0800
commitb8a51e2c5b476d0db5b75799911f0c8626012e9c (patch)
tree070a128be38b2d846c51e16dc514d10e686fb172 /xfa/include/fwl/core
parent10cfea1fdafc8fcf1edd60bc783e9db9ef6229c0 (diff)
downloadpdfium-b8a51e2c5b476d0db5b75799911f0c8626012e9c.tar.xz
Make FWL_ classes more consistently named.
Rename IFWL_Target::m_pData to m_pImpl since it points to CFWL_*Imp classes. Rename CFWL_Widget:m_pImp to m_pIface since it points to IFWL_* interface classes. Here, the concrete classes have pointers to the corresponding interfaces, rather than inheriting from them, and this is likely due to someone not understanding virtual inheritance (since this code has the diamond problem in spades). Rename CFWL_Target to CWFL_TargetImp since it is the root of the CFWL_*Imp hierarchy, and is pointed to by the m_pImpl slot. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1446393002 .
Diffstat (limited to 'xfa/include/fwl/core')
-rw-r--r--xfa/include/fwl/core/fwl_target.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/xfa/include/fwl/core/fwl_target.h b/xfa/include/fwl/core/fwl_target.h
index facd28fb70..25c8a33c90 100644
--- a/xfa/include/fwl/core/fwl_target.h
+++ b/xfa/include/fwl/core/fwl_target.h
@@ -4,9 +4,28 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef _FWL_TARGET_H
-#define _FWL_TARGET_H
-class IFWL_Target;
+#ifndef FWL_TARGET_H_
+#define FWL_TARGET_H_
+
+#include "core/include/fxcrt/fx_basic.h"
+
+// FWL contains three parallel inheritance hierarchies, which reference each
+// other via pointers as follows:
+//
+// m_pImpl
+// (nonesuch) IFWL_Target ----------> CFWL_TargetImp
+// | |
+// A A
+// m_pIface | |
+// CFWL_Widget ----------> IFWL_Widget CFWL_WidgetImp
+// | | |
+// A A A
+// | | |
+// CFWL_... IFWL_... CFWL_...Imp
+//
+
+class CFWL_TargetImp;
+
class IFWL_Target {
public:
FX_DWORD Release();
@@ -20,6 +39,7 @@ class IFWL_Target {
protected:
virtual ~IFWL_Target();
- void* m_pData;
+ CFWL_TargetImp* m_pImpl;
};
-#endif
+
+#endif // FWL_TARGET_H_