14#include "arcane/utils/Collection.h"
15#include "arcane/utils/Enumerator.h"
16#include "arcane/utils/NotImplementedException.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/TraceInfo.h"
19#include "arcane/utils/Ref.h"
21#include "arcane/IData.h"
22#include "arcane/IVariable.h"
23#include "arcane/VariableCollection.h"
25#include "arcane/impl/MemoryDataReaderWriter.h"
35MemoryDataReaderWriter::
36~MemoryDataReaderWriter()
44void MemoryDataReaderWriter::
47 m_vars_to_data.clear();
53void MemoryDataReaderWriter::
54beginWrite(
const VariableCollection& vars)
60 VarToDataMap vars_to_data = m_vars_to_data;
61 for( VariableCollection::Enumerator ivar(vars); ++ivar; ){
62 IVariable* var = *ivar;
63 VarToDataMap::iterator i = vars_to_data.find(var->fullName());
64 if (i!=vars_to_data.end())
65 vars_to_data.erase(i);
68 for( VarToDataMap::iterator i=vars_to_data.begin(); i!=vars_to_data.end(); ++i ){
70 m_vars_to_data.erase(i->first);
77void MemoryDataReaderWriter::
83 m_vars_to_data.insert(std::make_pair(
var->fullName(),
cdata));
93void MemoryDataReaderWriter::
98 warning() << A_FUNCNAME <<
": "
99 << String::format(
"can not find data for variable '{0}': variable will not be restored",
112 auto i = m_vars_to_data.find(
var->fullName());
113 if (i==m_vars_to_data.end())
virtual void copy(const IData *data)=0
Copie la donnée data dans l'instance courante.
virtual Ref< IData > cloneRef()=0
Clone la donnée.
Interface d'une variable.
Lecteur des fichiers de maillage via la bibliothèque LIMA.