summaryrefslogtreecommitdiff
path: root/xfa/src/fwl/src/core/fwl_targetimp.cpp
blob: 1acc56a01818c8c9c065e2959f637ade8c7f2341 (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
// 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_TargetImp*)m_pImpl)->Release();
  if (!dwRef) {
    m_pImpl = NULL;
    delete this;
  }
  return dwRef;
}
IFWL_Target* IFWL_Target::Retain() {
  return ((CFWL_TargetImp*)m_pImpl)->Retain();
}
FX_DWORD IFWL_Target::GetRefCount() const {
  return ((CFWL_TargetImp*)m_pImpl)->GetRefCount();
}
FWL_ERR IFWL_Target::GetClassName(CFX_WideString& wsClass) const {
  return ((CFWL_TargetImp*)m_pImpl)->GetClassName(wsClass);
}
FX_DWORD IFWL_Target::GetClassID() const {
  return ((CFWL_TargetImp*)m_pImpl)->GetClassID();
}
FX_BOOL IFWL_Target::IsInstance(const CFX_WideStringC& wsClass) const {
  return ((CFWL_TargetImp*)m_pImpl)->IsInstance(wsClass);
}
FWL_ERR IFWL_Target::Initialize() {
  return ((CFWL_TargetImp*)m_pImpl)->Initialize();
}
FWL_ERR IFWL_Target::Finalize() {
  return ((CFWL_TargetImp*)m_pImpl)->Finalize();
}
IFWL_Target::~IFWL_Target() {}
CFWL_TargetImp::CFWL_TargetImp() : m_dwRefCount(1) {
}
CFWL_TargetImp::~CFWL_TargetImp() {
}
FX_DWORD CFWL_TargetImp::Release() {
  m_dwRefCount--;
  FX_DWORD dwRet = m_dwRefCount;
  if (!m_dwRefCount) {
    delete this;
  }
  return dwRet;
}
IFWL_Target* CFWL_TargetImp::Retain() {
  m_dwRefCount++;
  return (IFWL_Target*)this;
}
FX_DWORD CFWL_TargetImp::GetRefCount() const {
  return m_dwRefCount;
}
FWL_ERR CFWL_TargetImp::GetClassName(CFX_WideString& wsClass) const {
  return FWL_ERR_Succeeded;
}
FX_DWORD CFWL_TargetImp::GetClassID() const {
  return 0;
}
FX_BOOL CFWL_TargetImp::IsInstance(const CFX_WideStringC& wsClass) const {
  return FALSE;
}
FWL_ERR CFWL_TargetImp::Initialize() {
  return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_TargetImp::Finalize() {
  return FWL_ERR_Succeeded;
}