Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::RefImpl< InstanceType, RefClassType, ImplTagId > Class Template Reference

Implementation of the reference to an instance. More...

#include <arccore/base/Ref.h>

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 ()
const ImplType & _internalInstance () const

Static Public Attributes

static constexpr int RefType = RefTraitsTagId<InstanceType, ImplTagId>::RefType

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)

Detailed Description

template<typename InstanceType, typename RefClassType, int ImplTagId>
class Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >

Implementation of the reference to an instance.

See also
Ref

Definition at line 131 of file arccore/src/base/arccore/base/Ref.h.

Member Typedef Documentation

◆ ImplType

template<typename InstanceType, typename RefClassType, int ImplTagId>
using Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::ImplType = RefTraitsTagId<InstanceType, ImplTagId>::ImplType

Definition at line 140 of file arccore/src/base/arccore/base/Ref.h.

◆ ThatClass

template<typename InstanceType, typename RefClassType, int ImplTagId>
using Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::ThatClass = RefImpl<InstanceType, RefClassType, ImplTagId>

Definition at line 139 of file arccore/src/base/arccore/base/Ref.h.

Constructor & Destructor Documentation

◆ RefImpl()

template<typename InstanceType, typename RefClassType, int ImplTagId>
template<typename T, typename = _IsRefConstructible<typename RefImpl<T, Ref<T>, ImplTagId>::ImplType>>
Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::RefImpl ( const Ref< T > & rhs)
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.

Member Function Documentation

◆ _internalInstance()

template<typename InstanceType, typename RefClassType, int ImplTagId>
const ImplType & Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::_internalInstance ( ) const
inline

Definition at line 273 of file arccore/src/base/arccore/base/Ref.h.

◆ _release()

template<typename InstanceType, typename RefClassType, int ImplTagId>
template<typename T = ThatClass, typename std::enable_if_t< T::RefType==REF_TAG_SHARED_PTR, bool > = true>
InstanceType * Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::_release ( )
inline

Definition at line 261 of file arccore/src/base/arccore/base/Ref.h.

◆ get()

template<typename InstanceType, typename RefClassType, int ImplTagId>
InstanceType * Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::get ( ) const
inline

◆ isNull()

template<typename InstanceType, typename RefClassType, int ImplTagId>
bool Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::isNull ( ) const
inline

Indicates if the counter references a non-null instance.

Definition at line 251 of file arccore/src/base/arccore/base/Ref.h.

◆ operator bool()

template<typename InstanceType, typename RefClassType, int ImplTagId>
Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::operator bool ( ) const
inline

Definition at line 244 of file arccore/src/base/arccore/base/Ref.h.

◆ operator->()

template<typename InstanceType, typename RefClassType, int ImplTagId>
InstanceType * Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::operator-> ( ) const
inline

Definition at line 252 of file arccore/src/base/arccore/base/Ref.h.

◆ reset()

template<typename InstanceType, typename RefClassType, int ImplTagId>
void Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::reset ( )
inline

Positions the instance to the null pointer.

Definition at line 254 of file arccore/src/base/arccore/base/Ref.h.

◆ operator!

template<typename InstanceType, typename RefClassType, int ImplTagId>
bool operator! ( const ThatClass & a)
friend

Definition at line 239 of file arccore/src/base/arccore/base/Ref.h.

◆ operator!=

template<typename InstanceType, typename RefClassType, int ImplTagId>
bool operator!= ( const ThatClass & a,
const ThatClass & b )
friend

Definition at line 229 of file arccore/src/base/arccore/base/Ref.h.

◆ operator<

template<typename InstanceType, typename RefClassType, int ImplTagId>
bool operator< ( const ThatClass & a,
const ThatClass & b )
friend

Definition at line 234 of file arccore/src/base/arccore/base/Ref.h.

◆ operator==

template<typename InstanceType, typename RefClassType, int ImplTagId>
bool operator== ( const ThatClass & a,
const ThatClass & b )
friend

Definition at line 224 of file arccore/src/base/arccore/base/Ref.h.

◆ Ref

template<typename InstanceType, typename RefClassType, int ImplTagId>
template<typename T>
friend class Ref
friend

Definition at line 141 of file arccore/src/base/arccore/base/Ref.h.

Member Data Documentation

◆ RefType

template<typename InstanceType, typename RefClassType, int ImplTagId>
int Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::RefType = RefTraitsTagId<InstanceType, ImplTagId>::RefType
staticconstexpr

Definition at line 184 of file arccore/src/base/arccore/base/Ref.h.


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