Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Materials::MeshMaterialBackup Class Reference

Saving/restoring material and medium values. More...

#include <arcane/materials/MeshMaterialBackup.h>

Inheritance diagram for Arcane::Materials::MeshMaterialBackup:
Collaboration diagram for Arcane::Materials::MeshMaterialBackup:

Classes

struct  VarData

Public Member Functions

 MeshMaterialBackup (IMeshMaterialMng *mm, bool use_unique_ids)
void setCompressorServiceName (const String &name)
 Name of the service used to compress the data.
const StringcompressorServiceName () const
void saveValues ()
void restoreValues ()
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const

Private Member Functions

void _save ()
void _restore ()
void _saveIds (IMeshComponent *component)
bool _isValidComponent (IMeshMaterialVariable *var, IMeshComponent *component)
 Indicates if the variable var is defined on the component component.
void _saveV1 ()
void _saveV2 ()
void _restoreV1 ()
void _restoreV2 ()

Private Attributes

IMeshMaterialMngm_material_mng
bool m_use_unique_ids
std::map< IMeshMaterialVariable *, VarData * > m_saved_data
std::map< IMeshComponent *, SharedArray< Int32 > > m_ids_array
std::map< IMeshComponent *, SharedArray< ItemUniqueId > > m_unique_ids_array
UniqueArray< IMeshMaterialVariable * > m_vars
bool m_use_v2 = false
String m_compressor_service_name

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Saving/restoring material and medium values.

Instances of this class can only be used for a single save and a single restore.

It is possible to specify the name of a compression service for the data before saving via the setCompressorServiceName() method. If this method is not called, the default value is that of IMeshMaterialMng::dataCompressorServiceName().

Definition at line 49 of file MeshMaterialBackup.h.

Constructor & Destructor Documentation

◆ MeshMaterialBackup()

Arcane::Materials::MeshMaterialBackup::MeshMaterialBackup ( IMeshMaterialMng * mm,
bool use_unique_ids )

Definition at line 62 of file MeshMaterialBackup.cc.

◆ ~MeshMaterialBackup()

Arcane::Materials::MeshMaterialBackup::~MeshMaterialBackup ( )

Definition at line 74 of file MeshMaterialBackup.cc.

Member Function Documentation

◆ _isValidComponent()

bool Arcane::Materials::MeshMaterialBackup::_isValidComponent ( IMeshMaterialVariable * var,
IMeshComponent * component )
private

Indicates if the variable var is defined on the component component.

Definition at line 114 of file MeshMaterialBackup.cc.

References Arcane::Materials::Environment, Arcane::Materials::IMeshComponent::isEnvironment(), Arcane::Materials::MaterialAndEnvironment, and Arcane::Materials::IMeshMaterialVariable::space().

Here is the call graph for this function:

◆ _restore()

void Arcane::Materials::MeshMaterialBackup::_restore ( )
private

Definition at line 251 of file MeshMaterialBackup.cc.

◆ _restoreV1()

void Arcane::Materials::MeshMaterialBackup::_restoreV1 ( )
private

Definition at line 278 of file MeshMaterialBackup.cc.

◆ _restoreV2()

void Arcane::Materials::MeshMaterialBackup::_restoreV2 ( )
private

Definition at line 302 of file MeshMaterialBackup.cc.

◆ _save()

void Arcane::Materials::MeshMaterialBackup::_save ( )
private

Definition at line 128 of file MeshMaterialBackup.cc.

◆ _saveIds()

void Arcane::Materials::MeshMaterialBackup::_saveIds ( IMeshComponent * component)
private

Definition at line 225 of file MeshMaterialBackup.cc.

◆ _saveV1()

void Arcane::Materials::MeshMaterialBackup::_saveV1 ( )
private

Definition at line 170 of file MeshMaterialBackup.cc.

◆ _saveV2()

void Arcane::Materials::MeshMaterialBackup::_saveV2 ( )
private

Definition at line 186 of file MeshMaterialBackup.cc.

◆ compressorServiceName()

const String & Arcane::Materials::MeshMaterialBackup::compressorServiceName ( ) const
inline

Definition at line 63 of file MeshMaterialBackup.h.

◆ restoreValues()

void Arcane::Materials::MeshMaterialBackup::restoreValues ( )

Definition at line 93 of file MeshMaterialBackup.cc.

◆ saveValues()

void Arcane::Materials::MeshMaterialBackup::saveValues ( )

Definition at line 84 of file MeshMaterialBackup.cc.

◆ setCompressorServiceName()

void Arcane::Materials::MeshMaterialBackup::setCompressorServiceName ( const String & name)

Name of the service used to compress the data.

Definition at line 102 of file MeshMaterialBackup.cc.

Member Data Documentation

◆ m_compressor_service_name

String Arcane::Materials::MeshMaterialBackup::m_compressor_service_name
private

Definition at line 79 of file MeshMaterialBackup.h.

◆ m_ids_array

std::map<IMeshComponent*, SharedArray<Int32> > Arcane::Materials::MeshMaterialBackup::m_ids_array
private

Definition at line 75 of file MeshMaterialBackup.h.

◆ m_material_mng

IMeshMaterialMng* Arcane::Materials::MeshMaterialBackup::m_material_mng
private

Definition at line 72 of file MeshMaterialBackup.h.

◆ m_saved_data

std::map<IMeshMaterialVariable*, VarData*> Arcane::Materials::MeshMaterialBackup::m_saved_data
private

Definition at line 74 of file MeshMaterialBackup.h.

◆ m_unique_ids_array

std::map<IMeshComponent*, SharedArray<ItemUniqueId> > Arcane::Materials::MeshMaterialBackup::m_unique_ids_array
private

Definition at line 76 of file MeshMaterialBackup.h.

◆ m_use_unique_ids

bool Arcane::Materials::MeshMaterialBackup::m_use_unique_ids
private

Definition at line 73 of file MeshMaterialBackup.h.

◆ m_use_v2

bool Arcane::Materials::MeshMaterialBackup::m_use_v2 = false
private

Definition at line 78 of file MeshMaterialBackup.h.

◆ m_vars

UniqueArray<IMeshMaterialVariable*> Arcane::Materials::MeshMaterialBackup::m_vars
private

Definition at line 77 of file MeshMaterialBackup.h.


The documentation for this class was generated from the following files: