Arcane
v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
GlibAdapter.h
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
/* GlibAdapter.h (C) 2000-2018 */
9
/* */
10
/* Classes utilitaires pour s'adapter aux différentes versions de la 'glib'. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCCORE_CONCURRENCY_GLIBADAPTER_H
13
#define ARCCORE_CONCURRENCY_GLIBADAPTER_H
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "arccore/concurrency/ConcurrencyGlobal.h"
18
19
/*---------------------------------------------------------------------------*/
20
/*---------------------------------------------------------------------------*/
21
22
namespace
Arccore
23
{
24
25
class
GlibCond;
26
27
/*---------------------------------------------------------------------------*/
28
/*---------------------------------------------------------------------------*/
29
/*!
30
* \internal
31
* \brief Encapsule un GMutex de la glib.
32
*/
33
class
ARCCORE_CONCURRENCY_EXPORT
GlibMutex
34
{
35
friend
class
GlibCond
;
36
public
:
37
class
Impl
;
38
public
:
39
class
Lock
40
{
41
public
:
42
Lock
(
GlibMutex
& x);
43
~Lock
();
44
Lock
() =
delete
;
45
Lock
(
const
Lock
&) =
delete
;
46
void
operator=(
const
Lock
&) =
delete
;
47
private
:
48
Impl
* m_mutex;
49
};
50
public
:
51
GlibMutex
() ARCCORE_NOEXCEPT;
52
~
GlibMutex
();
53
public:
54
void
lock();
55
void
unlock();
56
private:
57
Impl
* m_p;
58
};
59
60
/*---------------------------------------------------------------------------*/
61
/*---------------------------------------------------------------------------*/
62
/*!
63
* \internal
64
* \brief Encapsule un GPrivate de la glib.
65
*/
66
class ARCCORE_CONCURRENCY_EXPORT
GlibPrivate
67
{
68
public
:
69
class
Impl
;
70
public
:
71
GlibPrivate
();
72
~GlibPrivate
();
73
void
create();
74
void
setValue(
void
* value);
75
void
* getValue();
76
private
:
77
Impl
* m_p;
78
};
79
80
/*---------------------------------------------------------------------------*/
81
/*---------------------------------------------------------------------------*/
82
/*!
83
* \internal
84
* \brief Encapsule un GCond de la glib.
85
*/
86
class
ARCCORE_CONCURRENCY_EXPORT
GlibCond
87
{
88
public
:
89
class
Impl
;
90
public
:
91
GlibCond
();
92
~GlibCond
();
93
void
broadcast();
94
void
wait(
GlibMutex
* mutex);
95
private
:
96
Impl
* m_p;
97
};
98
99
/*---------------------------------------------------------------------------*/
100
/*---------------------------------------------------------------------------*/
101
102
}
// End namespace Arccore
103
104
/*---------------------------------------------------------------------------*/
105
/*---------------------------------------------------------------------------*/
106
107
#endif
Arccore::GlibCond::Impl
Definition
GlibAdapter.cc:145
Arccore::GlibCond
Definition
GlibAdapter.h:87
Arccore::GlibMutex::Impl
Definition
GlibAdapter.cc:41
Arccore::GlibMutex::Lock
Definition
GlibAdapter.h:40
Arccore::GlibMutex
Definition
GlibAdapter.h:34
Arccore::GlibPrivate::Impl
Definition
GlibAdapter.cc:95
Arccore::GlibPrivate
Definition
GlibAdapter.h:67
Arccore
Espace de nom de Arccore.
Definition
ArcaneTypes.h:24
arccore
concurrency
GlibAdapter.h
Généré le Lundi 18 Novembre 2024 02:56:57 pour Arcane par
1.9.8