ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::container::stack_n::base_stack_t< T > 模板类 参考
类 elc::defs::container::stack_n::base_stack_t< T > 继承关系图:
[图例]
elc::defs::container::stack_n::base_stack_t< T > 的协作图:
[图例]

struct  data_t
 

Public 成员函数

constexpr base_stack_t () noexcept
 
void swap_with (this_t &a) noexcept
 
this_toperator= (this_t &&a) &noexcept
 
 base_stack_t (this_t &&a) noexcept
 
this_toperator= (const this_t &a) &noexcept(noexcept(((::std::declval< this_t >()).copy())))
 
 base_stack_t (const this_t &a) noexcept(noexcept(((::std::declval< this_t >()).copy())))
 
 ~base_stack_t () noexcept(unget.nothrow< data_t >)
 
void clear () noexcept(re_construct.nothrow< this_t >)
 
bool empty () const noexcept
 
template<typename U >
maybe_fail_reference< T > find (U &&a) noexcept(noexcept(((::std::declval< T & >())==a)))
 
bool in_stack (const T &a) const noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))
 
bool not_in_stack (const T &a) const noexcept(noexcept(((::std::declval< this_t >()).in_stack(a))))
 
size_t size () const noexcept
 
void add (const T &a) noexcept(add_nothrow)
 
template<typename T_ >
bool remove (const T_ &a) noexcept(remove_nothrow &&equal.nothrow< T_, T >)
 
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< T& >())) ;}))
void for_each (func_t &&func) noexcept(noexcept(((::std::declval< func_t >())((::std::declval< T & >())))))
 
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< const T& >())) ;}))
void for_each (func_t &&func) const noexcept(noexcept(((::std::declval< func_t >())((::std::declval< const T & >())))))
 
hash_t get_top_hash () noexcept(noexcept((hash((::std::declval< T & >())))))
 
void move_top_to (this_t &a) noexcept
 

静态 Public 属性

static constexpr bool add_nothrow =noexcept(get<data_t>((::std::declval< const T& >()),(::std::declval< data_t* >())))
 
static constexpr bool remove_nothrow =unget.nothrow<data_t>
 

Protected 成员函数

void add (data_t *a) noexcept
 

Protected 属性

struct elc::defs::container::stack_n::base_stack_t::data_t_m
 
size_t _size
 

详细描述

template<typename T>
class elc::defs::container::stack_n::base_stack_t< T >

在文件 all_defs.cpp25012 行定义.

构造及析构函数说明

◆ base_stack_t() [1/3]

template<typename T >
constexpr elc::defs::container::stack_n::base_stack_t< T >::base_stack_t ( )
inlineconstexprnoexcept

在文件 all_defs.cpp25037 行定义.

25037:_m(null_ptr),_size(0){}
struct elc::defs::container::stack_n::base_stack_t::data_t * _m

◆ base_stack_t() [2/3]

template<typename T >
elc::defs::container::stack_n::base_stack_t< T >::base_stack_t ( this_t &&  a)
inlinenoexcept

在文件 all_defs.cpp25046 行定义.

25046 :base_stack_t(){
25047 operator=(move(a));
25048 }
this_t & operator=(this_t &&a) &noexcept
constexpr T down_cast(U a) noexcept
向下转型至
constexpr struct elc::defs::memory::lifetime_n::move_t move

◆ base_stack_t() [3/3]

template<typename T >
elc::defs::container::stack_n::base_stack_t< T >::base_stack_t ( const this_t a)
inlinenoexcept

在文件 all_defs.cpp25052 行定义.

25052:base_stack_t(a.copy()){}

◆ ~base_stack_t()

template<typename T >
elc::defs::container::stack_n::base_stack_t< T >::~base_stack_t ( )
inlinenoexcept

在文件 all_defs.cpp25053 行定义.

25053 {
25054 push_and_disable_msvc_warning(26494);//未初始化警告diss
25055 data_t*tmp;
25057 while(_m!=null_ptr){
25058 tmp=_m;
25059 _m=_m->_next;
25060 unget(tmp);
25061 }
25062 }
#define pop_msvc_warning()
Definition all_defs.cpp:478
#define push_and_disable_msvc_warning(...)
Definition all_defs.cpp:479
constexpr struct elc::defs::memory::get_n::unget_t unget

成员函数说明

◆ add() [1/2]

template<typename T >
void elc::defs::container::stack_n::base_stack_t< T >::add ( const T &  a)
inlinenoexcept

在文件 all_defs.cpp25090 行定义.

25090 {
25091 _m=get<data_t>(a,_m);
25092 _size++;
25093 }

◆ add() [2/2]

template<typename T >
void elc::defs::container::stack_n::base_stack_t< T >::add ( data_t a)
inlineprotectednoexcept

在文件 all_defs.cpp25133 行定义.

25133 {
25134 a->_next=_m;
25135 _m=a;
25136 _size++;
25137 }

◆ clear()

template<typename T >
void elc::defs::container::stack_n::base_stack_t< T >::clear ( )
inlinenoexcept

在文件 all_defs.cpp25063 行定义.

25063 {
25064 re_construct(this);
25065 }
constexpr struct elc::defs::memory::lifetime_n::re_construct_t re_construct

◆ empty()

template<typename T >
bool elc::defs::container::stack_n::base_stack_t< T >::empty ( ) const
inlinenoexcept

在文件 all_defs.cpp25066 行定义.

25066 {
25067 return _m==null_ptr;
25068 }
constexpr struct elc::defs::base::null_ptr_n::null_ptr_t null_ptr

◆ find()

template<typename T >
template<typename U >
maybe_fail_reference< T > elc::defs::container::stack_n::base_stack_t< T >::find ( U &&  a)
inlinenoexcept

在文件 all_defs.cpp25070 行定义.

25070 {
25071 data_t*tmp=_m;
25072 while(tmp!=null_ptr){
25073 if(tmp->_data==a)
25074 return tmp->_data;
25075 tmp=tmp->_next;
25076 }
25077 return note::fail;
25078 }
constexpr struct elc::defs::base::note_n::fail_t fail

◆ for_each() [1/2]

template<typename T >
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< const T& >())) ;}))
void elc::defs::container::stack_n::base_stack_t< T >::for_each ( func_t &&  func) const
inlinenoexcept

在文件 all_defs.cpp25124 行定义.

25124 {
25125 const data_t*tmp=_m;
25126 while(tmp!=null_ptr){
25127 func(tmp->_data);
25128 tmp=tmp->_next;
25129 }
25130 }

◆ for_each() [2/2]

template<typename T >
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< T& >())) ;}))
void elc::defs::container::stack_n::base_stack_t< T >::for_each ( func_t &&  func)
inlinenoexcept

在文件 all_defs.cpp25113 行定义.

25113 {
25114 data_t*tmp=_m;
25115 while(tmp!=null_ptr){
25116 func(tmp->_data);
25117 tmp=tmp->_next;
25118 }
25119 }

◆ get_top_hash()

template<typename T >
hash_t elc::defs::container::stack_n::base_stack_t< T >::get_top_hash ( )
inlinenoexcept

在文件 all_defs.cpp25139 行定义.

25139 {
25140 if(_m)
25141 return hash(_m->_data);
25142 else
25143 return hash(_m);
25144 }
#define hash

◆ in_stack()

template<typename T >
bool elc::defs::container::stack_n::base_stack_t< T >::in_stack ( const T &  a) const
inlinenoexcept

在文件 all_defs.cpp25079 行定义.

25079 {
25080 return remove_const(this)->find(a).not_fail();
25081 }
constexpr T & remove_const(const T &a) noexcept
对引用移除const
函数调用图:

◆ move_top_to()

template<typename T >
void elc::defs::container::stack_n::base_stack_t< T >::move_top_to ( this_t a)
inlinenoexcept

在文件 all_defs.cpp25145 行定义.

25145 {
25146 _size--;
25148 }
constexpr const T add_const_by_value(T a) noexcept
constexpr void swap(T1 &a, T2 &b)
函数调用图:

◆ not_in_stack()

template<typename T >
bool elc::defs::container::stack_n::base_stack_t< T >::not_in_stack ( const T &  a) const
inlinenoexcept

在文件 all_defs.cpp25082 行定义.

25082 {
25083 return not in_stack(a);
25084 }
bool in_stack(const T &a) const noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))

◆ operator=() [1/2]

template<typename T >
this_t & elc::defs::container::stack_n::base_stack_t< T >::operator= ( const this_t a) &
inlinenoexcept

在文件 all_defs.cpp25049 行定义.

25049 {
25050 return operator=(a.copy());
25051 }

◆ operator=() [2/2]

template<typename T >
this_t & elc::defs::container::stack_n::base_stack_t< T >::operator= ( this_t &&  a) &
inlinenoexcept

在文件 all_defs.cpp25042 行定义.

25042 {
25043 swap_with(a);
25044 return*this;
25045 }

◆ remove()

template<typename T >
template<typename T_ >
bool elc::defs::container::stack_n::base_stack_t< T >::remove ( const T_ a)
inlinenoexcept

在文件 all_defs.cpp25097 行定义.

25097 {//返回值:是否成功移除(容器里是否有此T)
25098 data_t*tmp=_m,**tmp_=&_m;
25099 while(tmp!=null_ptr){
25100 if(a==tmp->_data){
25101 _size--;
25102 *tmp_=tmp->_next;
25103 unget(tmp);
25104 return true;
25105 }
25106 tmp_=&tmp->_next;
25107 tmp=*tmp_;
25108 }
25109 return false;
25110 }

◆ size()

template<typename T >
size_t elc::defs::container::stack_n::base_stack_t< T >::size ( ) const
inlinenoexcept

在文件 all_defs.cpp25085 行定义.

25085 {
25086 return _size;
25087 }

◆ swap_with()

template<typename T >
void elc::defs::container::stack_n::base_stack_t< T >::swap_with ( this_t a)
inlinenoexcept

在文件 all_defs.cpp25038 行定义.

25038 {
25039 swap(_m,a._m);
25040 swap(_size,a._size);
25041 }
函数调用图:

类成员变量说明

◆ _m

◆ _size

template<typename T >
size_t elc::defs::container::stack_n::base_stack_t< T >::_size
protected

在文件 all_defs.cpp25022 行定义.

◆ add_nothrow

template<typename T >
constexpr bool elc::defs::container::stack_n::base_stack_t< T >::add_nothrow =noexcept(get<data_t>((::std::declval< const T& >()),(::std::declval< data_t* >())))
staticconstexpr

在文件 all_defs.cpp25089 行定义.

◆ remove_nothrow

template<typename T >
constexpr bool elc::defs::container::stack_n::base_stack_t< T >::remove_nothrow =unget.nothrow<data_t>
staticconstexpr

在文件 all_defs.cpp25095 行定义.


该类的文档由以下文件生成: