Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Ref.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Ref.cc (C) 2000-2019 */
9/* */
10/* Gestion des références sur une instance. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/base/Ref.h"
15
16#include <iostream>
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29namespace Arccore
30{
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35bool RefBase::DeleterBase::
36_destroyHandleTrue(const void* instance,Internal::ExternalRef& handle)
37{
38 ARCCORE_UNUSED(instance);
39 //std::cerr << "DELETE SERVICE i=" << instance << " h=" << handle << "\n";
40 if (handle.isValid())
41 return true;
42 return false;
43}
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
48bool RefBase::DeleterBase::
49_destroyHandle(const void* instance,Internal::ExternalRef& handle)
50{
51 return _destroyHandleTrue(instance,handle);
52}
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
56
57bool RefBase::DeleterBase::
58_destroyHandle(void* instance,Internal::ExternalRef& handle)
59{
60 return _destroyHandleTrue(instance,handle);
61}
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66} // End namespace Arccore
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
Gestion des références à une classe C++.
Espace de nom de Arccore.
Definition ArcaneTypes.h:24