Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ItemFamilyVariableSerializer.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/* ItemFamilyVariableSerializer.h (C) 2000-2016 */
9/* */
10/* Manages the serialization/deserialization of variables within a family. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_ITEMFAMILYVARIABLESERIALIZER_H
13#define ARCANE_MESH_ITEMFAMILYVARIABLESERIALIZER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
19#include "arcane/core/IItemFamilySerializeStep.h"
20
21#include "arcane/mesh/MeshGlobal.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28class IVariable;
30} // namespace Arcane
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35namespace Arcane::mesh
36{
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
44class ARCANE_MESH_EXPORT ItemFamilyVariableSerializer
45: public TraceAccessor
47{
48 public:
49
50 ItemFamilyVariableSerializer(IItemFamily* family);
51 ~ItemFamilyVariableSerializer();
52
53 public:
54
55 void initialize() override;
56 void notifyAction(const NotifyActionArgs&) override {}
57 void serialize(const ItemFamilySerializeArgs& args) override;
58 void finalize() override {}
59 ePhase phase() const override { return IItemFamilySerializeStep::PH_Variable; }
60 IItemFamily* family() const override { return m_item_family; }
61
62 protected:
63
64 IItemFamily* _family() const { return m_item_family; }
65
66 private:
67
68 IItemFamily* m_item_family;
76
77 private:
78
82};
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87} // namespace Arcane::mesh
88
89/*---------------------------------------------------------------------------*/
90/*---------------------------------------------------------------------------*/
91
92#endif
Interface for a step in the serialization of entity families.
Interface of an entity family.
Definition IItemFamily.h:83
Interface of a variable.
Definition IVariable.h:40
Arguments for the serialization callbacks of entity families.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
void _serializePartialVariable(IVariable *var, ISerializer *sbuf, Int32ConstArrayView local_ids)
Serialise une variable partielle.
void _checkSerializationVariable(ISerializer *sbuf, IVariable *var)
Serializes the variable name to verify that deserialization is correct.
void initialize() override
Initializes the instance before the start of exchanges.
void _checkSerialization(ISerializer *sbuf, Int32ConstArrayView local_ids)
Serializes a magic number and the number of entities to verify that deserialization is correct.
void finalize() override
Performs end-of-exchange processing.
ePhase phase() const override
Serialization phase where this instance is involved.
void notifyAction(const NotifyActionArgs &) override
Notifies the instance that we are entering a certain phase of the exchange.
UniqueArray< IVariable * > m_variables_to_exchange
List of variables to exchange.
IItemFamily * family() const override
Associated family.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482