Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
MemoryAccessInfo.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/* MemoryAccessInfo.h (C) 2000-2006 */
9/* */
10/* Informations sur un accès mémoire. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_MEMORYACCESSINFO_H
13#define ARCANE_UTILS_MEMORYACCESSINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Numeric.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23ARCANE_BEGIN_NAMESPACE
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28enum eMemoryAccessMessage
29{
30 MAM_UnitializedMemoryRead,
31 MAM_MayBeUnitializedMemoryRead,
32 MAM_NotSyncRead
33};
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38class ARCANE_UTILS_EXPORT IMemoryAccessTrace
39{
40 public:
41 virtual ~IMemoryAccessTrace() {}
42 public:
43 virtual void notify(eMemoryAccessMessage message,Integer handle) =0;
44};
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49class ARCANE_UTILS_EXPORT MemoryAccessInfo
50{
51 public:
52
53 MemoryAccessInfo(Byte* info,IMemoryAccessTrace* trace,Integer handle)
54 : m_info(info), m_trace(trace), m_handle(handle) {}
56 : m_info(rhs.m_info), m_trace(rhs.m_trace), m_handle(rhs.m_handle) {}
57
58 public:
59
60 void setRead() const;
61 void setWrite() const;
62 void setWriteAndSync() const;
63 void setSync() const;
64 void setNeedSync(bool) const;
65 void setReadOrWrite() const;
66 void setCreate() const;
67
68 private:
69
70 Byte* m_info;
71 IMemoryAccessTrace* m_trace;
72 Integer m_handle;
73};
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78ARCANE_END_NAMESPACE
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83#endif
Déclarations des types utilisés dans Arcane.
unsigned char Byte
Type d'un octet.
Definition UtilsTypes.h:142