Implementation of the reference to an instance. More...
Classes | |
| class | Deleter |
| class | BasicDeleter |
Public Types | |
| using | ThatClass = RefImpl<InstanceType, RefClassType, ImplTagId> |
| using | ImplType = RefTraitsTagId<InstanceType, ImplTagId>::ImplType |
Public Member Functions | |
| template<typename T, typename = _IsRefConstructible<typename RefImpl<T, Ref<T>, ImplTagId>::ImplType>> | |
| RefImpl (const Ref< T > &rhs) noexcept | |
| Constructs a reference from another reference of a compatible type. | |
| RefImpl (const ThatClass &rhs)=default | |
| ThatClass & | operator= (const ThatClass &rhs)=default |
| operator bool () const | |
| InstanceType * | get () const |
| Associated instance or nullptr if none. | |
| bool | isNull () const |
| Indicates if the counter references a non-null instance. | |
| InstanceType * | operator-> () const |
| void | reset () |
| Positions the instance to the null pointer. | |
| template<typename T = ThatClass, typename std::enable_if_t< T::RefType==REF_TAG_SHARED_PTR, bool > = true> | |
| InstanceType * | _release () |
| Releases the reference counter pointer without destroying it. This is only allowed if the implementation uses 'std::shared_ptr'. | |
| const ImplType & | _internalInstance () const |
Static Public Attributes | |
| static constexpr int | RefType = RefTraitsTagId<InstanceType, ImplTagId>::RefType |
Private Types | |
| template<typename... _Args> | |
| using | _IsRefConstructible = typename std::enable_if<std::is_constructible<ImplType, _Args...>::value>::type |
Private Member Functions | |
| RefImpl (InstanceType *t) | |
| RefImpl (InstanceType *t, Internal::ExternalRef handle) | |
| RefImpl (InstanceType *t, bool no_destroy) | |
| RefImpl (ImplType &&t) | |
Static Private Member Functions | |
| static Deleter | _createBasicDeleter (std::shared_ptr< InstanceType > *) |
| static BasicDeleterBase | _createBasicDeleter (impl::ReferenceCounterWrapper< InstanceType > *) |
| static Deleter * | _getDeleter (std::shared_ptr< InstanceType > &v) |
| static DeleterBase * | _getDeleter (impl::ReferenceCounterWrapper< InstanceType > &v) |
Private Attributes | |
| ImplType | m_instance |
Friends | |
| template<typename T> | |
| class | Ref |
| bool | operator== (const ThatClass &a, const ThatClass &b) |
| bool | operator!= (const ThatClass &a, const ThatClass &b) |
| bool | operator< (const ThatClass &a, const ThatClass &b) |
| bool | operator! (const ThatClass &a) |
Implementation of the reference to an instance.
Definition at line 131 of file arccore/src/base/arccore/base/Ref.h.
|
private |
Definition at line 146 of file arccore/src/base/arccore/base/Ref.h.
| using Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::ImplType = RefTraitsTagId<InstanceType, ImplTagId>::ImplType |
Definition at line 140 of file arccore/src/base/arccore/base/Ref.h.
| using Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::ThatClass = RefImpl<InstanceType, RefClassType, ImplTagId> |
Definition at line 139 of file arccore/src/base/arccore/base/Ref.h.
|
inlineexplicitprivate |
Definition at line 188 of file arccore/src/base/arccore/base/Ref.h.
|
inlineprivate |
Definition at line 191 of file arccore/src/base/arccore/base/Ref.h.
|
inlineprivate |
Definition at line 194 of file arccore/src/base/arccore/base/Ref.h.
|
inlineprivate |
Definition at line 200 of file arccore/src/base/arccore/base/Ref.h.
|
inlineexplicitnoexcept |
Constructs a reference from another reference of a compatible type.
Conversion is allowed if an instance of 'ImplType' can be constructed from an instance of Ref<T>::ImplType.
Definition at line 213 of file arccore/src/base/arccore/base/Ref.h.
|
inlinestaticprivate |
Definition at line 285 of file arccore/src/base/arccore/base/Ref.h.
|
inlinestaticprivate |
Definition at line 281 of file arccore/src/base/arccore/base/Ref.h.
|
inlinestaticprivate |
Definition at line 293 of file arccore/src/base/arccore/base/Ref.h.
|
inlinestaticprivate |
Definition at line 289 of file arccore/src/base/arccore/base/Ref.h.
|
inline |
Definition at line 273 of file arccore/src/base/arccore/base/Ref.h.
|
inline |
Releases the reference counter pointer without destroying it. This is only allowed if the implementation uses 'std::shared_ptr'.
Definition at line 261 of file arccore/src/base/arccore/base/Ref.h.
|
inline |
Associated instance or nullptr if none.
Definition at line 249 of file arccore/src/base/arccore/base/Ref.h.
Referenced by Arcane::MetisWrapper::_callMetisWith2Processors(), Arcane::VariableIOReaderMng::_checkHashFunction(), Arcane::Array2VariableT< T >::_compareVariable(), Arcane::VariableArrayT< T >::_compareVariable(), Arcane::VariableScalarT< T >::_compareVariable(), Arcane::mesh::FaceUniqueIdBuilder::_computeFacesUniqueIdsParallelV2(), Arcane::TimeLoopMng::_createModule(), Arcane::ModuleMng::addModule(), Arcane::MessagePassing::HybridParallelSuperMng::build(), Arcane::MessagePassing::SharedMemoryParallelSuperMng::build(), Arcane::MessagePassing::HybridParallelMng::createSubParallelMngRef(), Arcane::MessagePassing::SharedMemoryParallelMng::createSubParallelMngRef(), Arcane::ArcaneBasicVerifierService::doVerifFromReferenceFile(), Arcane::Application::getCodeService(), Arcane::Internal::ServiceFinderBase2T< InterfaceType >::getSingleton(), Arcane::ServiceLoader::loadModules(), Arcane::ServiceLoader::loadSingletonService(), Arcane::impl::BasicReader::read(), Arcane::MemoryDataReaderWriter::read(), Arcane::ModuleMng::removeModule(), and Arcane::MemoryDataReaderWriter::write().
|
inline |
Indicates if the counter references a non-null instance.
Definition at line 251 of file arccore/src/base/arccore/base/Ref.h.
Referenced by Arcane::SimpleCsvReaderWriter::setInternal(), Arcane::SimpleTableInternalMng::setInternal(), Arcane::SimpleTableInternalComparator::setInternalRef(), Arcane::SimpleTableInternalComparator::setInternalToCompare(), and Arcane::SimpleTableWriterHelper::setReaderWriter().
|
inline |
Definition at line 244 of file arccore/src/base/arccore/base/Ref.h.
|
inline |
Definition at line 252 of file arccore/src/base/arccore/base/Ref.h.
|
inline |
Positions the instance to the null pointer.
Definition at line 254 of file arccore/src/base/arccore/base/Ref.h.
Referenced by Arcane::VariableIOReaderMng::_checkHashFunction().
|
friend |
Definition at line 239 of file arccore/src/base/arccore/base/Ref.h.
|
friend |
Definition at line 229 of file arccore/src/base/arccore/base/Ref.h.
|
friend |
Definition at line 234 of file arccore/src/base/arccore/base/Ref.h.
|
friend |
Definition at line 224 of file arccore/src/base/arccore/base/Ref.h.
|
friend |
Definition at line 141 of file arccore/src/base/arccore/base/Ref.h.
|
private |
Definition at line 277 of file arccore/src/base/arccore/base/Ref.h.
|
staticconstexpr |
Definition at line 184 of file arccore/src/base/arccore/base/Ref.h.