Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IItemFamilySerializeStep.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* IItemFamilySerializeStep.h (C) 2000-2025 */
9/* */
10/* Interface for a step in the serialization of entity families. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IITEMFAMILYSERIALIZESTEP_H
13#define ARCANE_CORE_IITEMFAMILYSERIALIZESTEP_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
73class ARCANE_CORE_EXPORT IItemFamilySerializeStep
74{
75 public:
76
78 enum ePhase
79 {
80 PH_Item,
81 PH_Group,
82 PH_Variable
83 };
84
85 enum class eAction
86 {
88 AC_BeginPrepareSend,
90 AC_EndPrepareSend,
92 AC_BeginReceive,
94 AC_EndReceive,
95 };
96
97 public:
98
99 class NotifyActionArgs
100 {
101 public:
102
103 NotifyActionArgs(eAction aaction, Integer nb_message)
104 : m_action(aaction)
105 , m_nb_message(nb_message)
106 {}
107
108 public:
109
110 eAction action() const { return m_action; }
112 Integer nbMessage() const { return m_nb_message; }
113
114 private:
115
116 eAction m_action;
117 Integer m_nb_message;
118 };
119
120 public:
121
122 virtual ~IItemFamilySerializeStep() = default;
123
124 public:
125
127 virtual void initialize() = 0;
128
130 virtual void notifyAction(const NotifyActionArgs& args) = 0;
131
143 virtual void serialize(const ItemFamilySerializeArgs& args) = 0;
144
146 virtual void finalize() = 0;
147
149 virtual ePhase phase() const = 0;
150
152 virtual IItemFamily* family() const = 0;
153};
154
155/*---------------------------------------------------------------------------*/
156/*---------------------------------------------------------------------------*/
157
162class ARCANE_CORE_EXPORT IItemFamilySerializeStepFactory
163{
164 public:
165
166 virtual ~IItemFamilySerializeStepFactory() = default;
167
168 public:
169
177};
178
179/*---------------------------------------------------------------------------*/
180/*---------------------------------------------------------------------------*/
181
182} // namespace Arcane
183
184/*---------------------------------------------------------------------------*/
185/*---------------------------------------------------------------------------*/
186
187#endif
Declarations of Arcane's general types.
Factory for creating a step in the serialization of entity families.
virtual IItemFamilySerializeStep * createStep(IItemFamily *family)=0
Creates a step for the family family.
Integer nbMessage() const
Number of serialization messages.
Interface for a step in the serialization of entity families.
virtual void initialize()=0
Initializes the instance before the start of exchanges.
virtual IItemFamily * family() const =0
Associated family.
virtual void finalize()=0
Performs end-of-exchange processing.
virtual void notifyAction(const NotifyActionArgs &args)=0
Notifies the instance that we are entering a certain phase of the exchange.
virtual ePhase phase() const =0
Serialization phase where this instance is involved.
virtual void serialize(const ItemFamilySerializeArgs &args)=0
Serializes into/from buf.
Interface of an entity family.
Definition IItemFamily.h:83
Arguments for the serialization callbacks of entity families.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.