blob: c09b8ee4474407fa52a062bd335b9fa8842bcff1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../foxitlib.h"
#include "include/fwl_targetimp.h"
FX_DWORD IFWL_Target::Release()
{
FX_DWORD dwRef = ((CFWL_Target*)m_pData)->Release();
if (!dwRef) {
m_pData = NULL;
delete this;
}
return dwRef;
}
IFWL_Target* IFWL_Target::Retain()
{
return ((CFWL_Target*)m_pData)->Retain();
}
FX_DWORD IFWL_Target::GetRefCount() const
{
return ((CFWL_Target*)m_pData)->GetRefCount();
}
FWL_ERR IFWL_Target::GetClassName(CFX_WideString &wsClass) const
{
return ((CFWL_Target*)m_pData)->GetClassName(wsClass);
}
FX_DWORD IFWL_Target::GetClassID() const
{
return ((CFWL_Target*)m_pData)->GetClassID();
}
FX_BOOL IFWL_Target::IsInstance(FX_WSTR wsClass) const
{
return ((CFWL_Target*)m_pData)->IsInstance(wsClass);
}
FWL_ERR IFWL_Target::Initialize()
{
return ((CFWL_Target*)m_pData)->Initialize();
}
FWL_ERR IFWL_Target::Finalize()
{
return ((CFWL_Target*)m_pData)->Finalize();
}
IFWL_Target::~IFWL_Target()
{
}
CFWL_Target::CFWL_Target()
: m_dwRefCount(1)
{
}
CFWL_Target::~CFWL_Target()
{
}
FX_DWORD CFWL_Target::Release()
{
m_dwRefCount--;
FX_DWORD dwRet = m_dwRefCount;
if (!m_dwRefCount) {
delete this;
}
return dwRet;
}
IFWL_Target* CFWL_Target::Retain()
{
m_dwRefCount++;
return (IFWL_Target*)this;
}
FX_DWORD CFWL_Target::GetRefCount() const
{
return m_dwRefCount;
}
FWL_ERR CFWL_Target::GetClassName(CFX_WideString &wsClass) const
{
return FWL_ERR_Succeeded;
}
FX_DWORD CFWL_Target::GetClassID() const
{
return 0;
}
FX_BOOL CFWL_Target::IsInstance(FX_WSTR wsClass) const
{
return FALSE;
}
FWL_ERR CFWL_Target::Initialize()
{
return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_Target::Finalize()
{
return FWL_ERR_Succeeded;
}
void* IFWL_TargetData::GetData()
{
return m_pData;
}
void IFWL_TargetData::SetData(void* pData)
{
m_pData = pData;
}
|