ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::memory::ptr_n 命名空间参考

struct  base_ptr_t
 
struct  ptr_t
 
struct  ref_able
 
class  ref_t
 
struct  root_ptr_t
 
struct  same_ptr_p_t
 
struct  same_ref_p_t
 
struct  weak_ref_able
 

类型定义

typedef size_t link_num_t
 
template<typename T >
using comn_ptr_t = base_ptr_t< T, ref_able< remove_cvref< T > >, true >
 
template<typename T >
using weak_ptr_t = base_ptr_t< T, weak_ref_able< remove_cvref< T > >, true >
 
template<typename T >
using nocheck_ptr_t = base_ptr_t< T, ref_able< remove_cvref< T > >, false >
 

函数

void the_waiting_for_destroy () noexcept=delete
 
template<typename T >
void waiting_for_destroy (T *a) noexcept
 
void the_destroy_and_free () noexcept=delete
 
template<typename T >
void destroy_and_free (T *a) noexcept
 
template<typename T >
link_num_t get_ref_num (const T *a) noexcept
 
template<typename T >
link_num_t get_weak_ref_num (const T *a) noexcept
 
template<class T , typename ref_type >
void swap (same_ref_p_t< T, ref_type > &a, same_ref_p_t< T, ref_type > &b) noexcept
 
template<typename T_ , typename T , typename ref_type , bool do_replace_check, class enable_state = ::std::enable_if_t< type_info<T_>.base_on<T> >>
auto operator== (const T_ *a, ptr_t< T, ref_type, do_replace_check > &b) noexcept(noexcept((b.operator==(static_cast< const T * >(a)))))
 
template<typename T , typename T_ >
requires (equal.able<T,T_>)
auto operator!= (T &&a, T_ &&b) noexcept(noexcept((!(a==b))))
 
template<class T , template< class >class ref_type, bool has_check>
 base_ptr_t (T *) -> base_ptr_t< remove_cvref< T >, ref_type< remove_cvref< T > >, has_check >
 
template<class T , template< class >class ref_type, bool has_check>
 base_ptr_t (same_ptr_p_t< T >) -> base_ptr_t< T, ref_type< remove_cvref< T > >, has_check >
 
void map_and_mark_for_gc () noexcept=delete
 
template<typename T >
void map_and_mark_for_gc (T *) noexcept
 
template<class T >
 root_ptr_t (T *) -> root_ptr_t< T >
 

变量

template<typename T >
constexpr bool was_ref_able =type_info<T>. template has_attribute_helper< ref_able >()
 
template<typename T >
constexpr bool was_weak_ref_able =type_info<T>. template has_attribute_helper< weak_ref_able >()
 

类型定义说明

◆ comn_ptr_t

◆ link_num_t

在文件 all_defs.cpp22607 行定义.

◆ nocheck_ptr_t

◆ weak_ptr_t

函数说明

◆ base_ptr_t() [1/2]

template<class T , template< class >class ref_type, bool has_check>
elc::defs::memory::ptr_n::base_ptr_t ( same_ptr_p_t< T >  ) -> base_ptr_t< T, ref_type< remove_cvref< T > >, has_check >
protected

◆ base_ptr_t() [2/2]

template<class T , template< class >class ref_type, bool has_check>
elc::defs::memory::ptr_n::base_ptr_t ( T *  ) -> base_ptr_t< remove_cvref< T >, ref_type< remove_cvref< T > >, has_check >
protected

◆ destroy_and_free()

template<typename T >
void elc::defs::memory::ptr_n::destroy_and_free ( T *  a)
protectednoexcept

在文件 all_defs.cpp22665 行定义.

22665 {
22667 return the_destroy_and_free(a);
22668 elseif constexpr(type_info<T>.has_attribute(build_by_get_only)&&type_info<T>.has_attribute(never_in_array))
22669 unget(a);
22670 else
22671 template_error("please overload the function the_destroy_and_free in the namespace where this type is defined.");
22672}
#define was_not_an_ill_form(...)
Definition all_defs.cpp:611
#define elseif
Definition all_defs.cpp:650
#define template_error(reason)
Definition all_defs.cpp:559
void the_destroy_and_free() noexcept=delete
函数调用图:
这是这个函数的调用关系图:

◆ get_ref_num()

template<typename T >
link_num_t elc::defs::memory::ptr_n::get_ref_num ( const T *  a)
protectednoexcept

在文件 all_defs.cpp22683 行定义.

22683 {
22684 if constexpr(!was_ref_able<T>)
22685 template_error("hey.");
22686 return attribute_ptr_cast<const ref_able>(a)->link_num();
22687}
函数调用图:
这是这个函数的调用关系图:

◆ get_weak_ref_num()

template<typename T >
link_num_t elc::defs::memory::ptr_n::get_weak_ref_num ( const T *  a)
protectednoexcept

在文件 all_defs.cpp22689 行定义.

22689 {
22690 if constexpr(!was_weak_ref_able<T>)
22691 template_error("hey.");
22692 return attribute_ptr_cast<const weak_ref_able>(a)->link_num();
22693}
函数调用图:
这是这个函数的调用关系图:

◆ map_and_mark_for_gc() [1/2]

void elc::defs::memory::ptr_n::map_and_mark_for_gc ( )
deletenoexcept
这是这个函数的调用关系图:

◆ map_and_mark_for_gc() [2/2]

template<typename T >
void elc::defs::memory::ptr_n::map_and_mark_for_gc ( T *  )
noexcept

在文件 all_defs.cpp26632 行定义.

26632 {
26633 template_error("this function should not be instantiated,please overload the function map_and_mark_for_gc in the namespace where this type is defined");
26634}
函数调用图:

◆ operator!=()

template<typename T , typename T_ >
requires (equal.able<T,T_>)
auto elc::defs::memory::ptr_n::operator!= ( T &&  a,
T_ &&  b 
)
inlineprotectednoexcept

在文件 all_defs.cpp23019 行定义.

23019 {
23020 return !(a==b);
23021}

◆ operator==()

template<typename T_ , typename T , typename ref_type , bool do_replace_check, class enable_state = ::std::enable_if_t< type_info<T_>.base_on<T> >>
auto elc::defs::memory::ptr_n::operator== ( const T_ a,
ptr_t< T, ref_type, do_replace_check > &  b 
)
inlineprotectednoexcept

在文件 all_defs.cpp23014 行定义.

23014 {
23015 return b.operator==(static_cast<const T*>(a));
23016}
函数调用图:

◆ root_ptr_t()

template<class T >
elc::defs::memory::ptr_n::root_ptr_t ( T *  ) -> root_ptr_t< T >

◆ swap()

template<class T , typename ref_type >
void elc::defs::memory::ptr_n::swap ( same_ref_p_t< T, ref_type > &  a,
same_ref_p_t< T, ref_type > &  b 
)
inlineprotectednoexcept

在文件 all_defs.cpp22894 行定义.

22894 {
22895 a.swap_with(b);
22896}
void swap_with(same_ref_p_t &a) noexcept
函数调用图:

◆ the_destroy_and_free()

void elc::defs::memory::ptr_n::the_destroy_and_free ( )
protecteddeletenoexcept
这是这个函数的调用关系图:

◆ the_waiting_for_destroy()

void elc::defs::memory::ptr_n::the_waiting_for_destroy ( )
protecteddeletenoexcept
这是这个函数的调用关系图:

◆ waiting_for_destroy()

template<typename T >
void elc::defs::memory::ptr_n::waiting_for_destroy ( T *  a)
protectednoexcept

在文件 all_defs.cpp22657 行定义.

22657 {
22659 return the_waiting_for_destroy(a);
22660 else
22661 template_error("this function should not be instantiated,please overload the function the_waiting_for_destroy in the namespace where this type is defined.");
22662}
void the_waiting_for_destroy() noexcept=delete
函数调用图:
这是这个函数的调用关系图:

变量说明

◆ was_ref_able

template<typename T >
constexpr bool elc::defs::memory::ptr_n::was_ref_able =type_info<T>. template has_attribute_helper< ref_able >()
constexprprotected

在文件 all_defs.cpp22678 行定义.

◆ was_weak_ref_able

template<typename T >
constexpr bool elc::defs::memory::ptr_n::was_weak_ref_able =type_info<T>. template has_attribute_helper< weak_ref_able >()
constexprprotected

在文件 all_defs.cpp22680 行定义.