Handle on a mesh. More...
#include <arcane/core/MeshHandle.h>
Classes | |
| class | MeshHandleRef |
Public Member Functions | |
| MeshHandle (const MeshHandle &) | |
| MeshHandle & | operator= (const MeshHandle &) |
| MeshHandle (MeshHandle &&) noexcept | |
| MeshHandle & | operator= (MeshHandle &&) noexcept |
| IMesh * | mesh () const |
| Associated mesh. | |
| bool | hasMesh () const |
| Indicates if the associated mesh has already been created (i.e.: mesh() is valid). | |
| IMesh * | meshOrNull () const |
| Returns the mesh associated with this instance. | |
| ISubDomain * | subDomain () const |
| Associated sub-domain. Null if isNull() is true. | |
| IMeshMng * | meshMng () const |
| Associated mesh manager. nullptr if isNull() is true. | |
| ITraceMng * | traceMng () const |
| Associated trace manager. nullptr if isNull() is true. | |
| IVariableMng * | variableMng () const |
| Associated variable manager. nullptr if isNull() is true. | |
| IApplication * | application () const |
| Associated application. nullptr if isNull() is true. | |
| IUserDataList * | meshUserDataList () const |
| Associated user data. | |
| String | meshName () const |
| bool | isNull () const |
| Indicates if the handle is null (it does not reference any existing mesh or not). | |
| IObservable * | onDestroyObservable () const |
| Observable to be notified of destruction. | |
| const void * | reference () const |
| void | _setMesh (IMesh *mesh) |
| void | _destroyMesh () |
| IMesh * | _internalMeshOrNull () const |
Private Member Functions | |
| MeshHandle (ISubDomain *sd, const String &name) | |
Private Attributes | |
| AutoRef2< MeshHandleRef > | m_ref |
Friends | |
| class | MeshMng |
Handle on a mesh.
This class uses reference counting semantics.
This class allows managing a reference to a mesh (IMesh) before it is explicitly created. This allows services and modules to specify which mesh they refer to during their construction.
It also allows associating user data with the mesh via meshUserDataList().
Definition at line 47 of file MeshHandle.h.
| Arcane::MeshHandle::MeshHandle | ( | ) |
Definition at line 176 of file MeshHandle.cc.
| Arcane::MeshHandle::~MeshHandle | ( | ) |
Definition at line 209 of file MeshHandle.cc.
| Arcane::MeshHandle::MeshHandle | ( | const MeshHandle & | x | ) |
Definition at line 182 of file MeshHandle.cc.
|
noexcept |
Definition at line 188 of file MeshHandle.cc.
|
private |
Definition at line 167 of file MeshHandle.cc.
| void Arcane::MeshHandle::_destroyMesh | ( | ) |
Definition at line 324 of file MeshHandle.cc.
| IMesh * Arcane::MeshHandle::_internalMeshOrNull | ( | ) | const |
Definition at line 331 of file MeshHandle.cc.
| void Arcane::MeshHandle::_setMesh | ( | IMesh * | mesh | ) |
Definition at line 317 of file MeshHandle.cc.
References mesh().
| IApplication * Arcane::MeshHandle::application | ( | ) | const |
Associated application. nullptr if isNull() is true.
Definition at line 285 of file MeshHandle.cc.
| bool Arcane::MeshHandle::hasMesh | ( | ) | const |
Indicates if the associated mesh has already been created (i.e.: mesh() is valid).
Definition at line 231 of file MeshHandle.cc.
Referenced by Arcane::VerifierService::_getVariables(), and Arcane::MeshMng::destroyMesh().
| bool Arcane::MeshHandle::isNull | ( | ) | const |
Indicates if the handle is null (it does not reference any existing mesh or not).
Definition at line 311 of file MeshHandle.cc.
Referenced by Arcane::TimeHistoryMngInternal::_addHistoryValue(), Arcane::TimeHistoryMngInternal::_dumpSummaryOfCurves(), Arcane::TimeHistoryMngInternal::_dumpSummaryOfCurvesLegacy(), Arcane::TimeHistoryMngInternal::dumpCurves(), Arcane::Materials::MeshMaterialVariableCommonStaticImpl< TrueType >::getReference(), Arcane::Materials::IMeshMaterialMng::getTrueReference(), Arcane::Materials::MeshMaterialVariableBuildTraits< TrueType >::getVariableReference(), Arcane::TimeHistoryMngInternal::iterationsAndValues(), and Arcane::TimeHistoryMngInternal::updateMetaData().
| IMesh * Arcane::MeshHandle::mesh | ( | ) | const |
Associated mesh.
It is forbidden to call this method if the mesh has not yet been created. Eventually, an exception will be raised in this case.
If we are not sure that the mesh exists, we can test its existence via hasMesh().
Definition at line 241 of file MeshHandle.cc.
References ARCANE_FATAL.
Referenced by Arcane::Hdf5VariableReaderHelper2::_createCorrespondance(), Arcane::VerifierService::_getVariables(), Arcane::mesh::DynamicMesh::_readFromDump(), _setMesh(), Arcane::MeshMng::destroyMesh(), and Arcane::mesh::ItemFamily::readFromDump().
| IMeshMng * Arcane::MeshHandle::meshMng | ( | ) | const |
Associated mesh manager. nullptr if isNull() is true.
Definition at line 222 of file MeshHandle.cc.
Referenced by Arcane::CaseOptions::_setMeshHandleAndCheckDisabled().
| String Arcane::MeshHandle::meshName | ( | ) | const |
Definition at line 305 of file MeshHandle.cc.
| IMesh * Arcane::MeshHandle::meshOrNull | ( | ) | const |
Returns the mesh associated with this instance.
Unlike mesh(), this can be called even if the associated mesh has not yet been created. In this case, a null pointer is returned.
Definition at line 258 of file MeshHandle.cc.
Referenced by Arcane::ICartesianMesh::getReference(), and Arcane::MeshUtils::markMeshConnectivitiesAsMostlyReadOnly().
| IUserDataList * Arcane::MeshHandle::meshUserDataList | ( | ) | const |
Associated user data.
Definition at line 300 of file MeshHandle.cc.
Referenced by Arcane::ICartesianMesh::getReference().
| IObservable * Arcane::MeshHandle::onDestroyObservable | ( | ) | const |
Observable to be notified of destruction.
Definition at line 294 of file MeshHandle.cc.
| MeshHandle & Arcane::MeshHandle::operator= | ( | const MeshHandle & | x | ) |
Definition at line 194 of file MeshHandle.cc.
|
noexcept |
Definition at line 202 of file MeshHandle.cc.
|
inline |
Definition at line 131 of file MeshHandle.h.
| ISubDomain * Arcane::MeshHandle::subDomain | ( | ) | const |
Associated sub-domain. Null if isNull() is true.
Definition at line 337 of file MeshHandle.cc.
| ITraceMng * Arcane::MeshHandle::traceMng | ( | ) | const |
Associated trace manager. nullptr if isNull() is true.
Definition at line 267 of file MeshHandle.cc.
| IVariableMng * Arcane::MeshHandle::variableMng | ( | ) | const |
Associated variable manager. nullptr if isNull() is true.
Definition at line 276 of file MeshHandle.cc.
|
friend |
Definition at line 52 of file MeshHandle.h.
|
private |
Definition at line 148 of file MeshHandle.h.